Crunch Protocol:AI 竞赛管理 - Openclaw Skills
作者:互联网
2026-04-17
什么是 Crunch Protocol CLI 技能?
Crunch Protocol CLI 技能充当了人类语言与 Crunch Protocol 生态系统技术命令之间的高级桥梁。通过利用 Openclaw Skills,开发人员和协调者可以管理“crunch”的整个生命周期——从创建和奖励存入到检查点管理——而无需手动构建复杂的 CLI 字符串。它通过将对话短语直接映射到底层的 crunch-cli 工具,简化了区块链交互。
该技能旨在通过本地配置文件处理特定环境的配置来提高生产力。无论您是在 Solana 主网上操作还是在测试网上进行测试,您的 Openclaw Skills 库中的这一新增功能都能确保自动处理浅包路径、RPC URL 和多签地址,从而以开发者友好的方式无缝执行管理和运营任务。
下载入口:https://github.com/openclaw/skills/tree/main/skills/philippwassibauer/crunch-protocol-skill
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install crunch-protocol-skill
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 crunch-protocol-skill。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Crunch Protocol CLI 技能 应用场景
- 通过“显示 crunch Synth”等简单查询坚控竞赛状态和奖池。
- 在不同的网络环境中管理协调者配置和证书更新。
- 在竞赛结束期间自动分配奖励并清理代币账户。
- 提供专门为 Slack 和 Discord 等团队沟通工具格式化的实时竞赛更新。
- 在无需手动输入标志的情况下,为去中心化财库管理提议多签交易。
- 用户输入自然语言命令,例如“列出 devnet 的 crunches”。
- 技能识别动作和目标,然后引用本地 profiles.json 以查找匹配的网络配置。
- 它根据解析出的配置文件自动添加必要的 RPC URL、浅包路径和多签地址。
- 使用高速直接映射表将请求映射到特定的 crunch-cli 命令。
- 命令在系统 shell 中执行,并与 Crunch Protocol 智能合约交互。
- 捕获原始 CLI 输出,并将其重新格式化为用户要求的介质(如 T@elegrimm、Discord 或纯文本)后返回。
Crunch Protocol CLI 技能 配置指南
要在您的 Openclaw Skills 环境中使用此技能,请先确保您的系统已全局安装官方 CLI:
npm install -g @crunchdao/crunch-cli
通过检查版本来验证安装:
crunch-cli --version
您还必须在技能目录中配置 profiles.json 文件,以便将您的 Solana 浅包和 RPC 端点映射到易于使用的别名。
Crunch Protocol CLI 技能 数据架构与分类体系
该技能通过基于 JSON 的配置文件系统管理持久化配置。这使得 Openclaw Skills 能够在不同的区块链环境中保持上下文。
| 属性 | 描述 | 示例 |
|---|---|---|
url |
RPC 端点或网络代号 | https://api.mainnet-beta.solana.com |
wallet |
Solana 密钥对的本地文件路径 | /path/to/keypair.json |
multisigAddress |
用于提案的 Squads 多签地址 | 9WzDX... |
coordinatorWallet |
协调者的所有者地址 | 5abc... |
name: crunch-protocol-skill
description: Natural language interface for Crunch Protocol CLI. Maps user requests to CLI commands for managing coordinators, competitions (crunches), rewards, and checkpoints. Supports output formatting for Slack, T@elegrimm, Discord, or plain text.
Crunch Protocol CLI Skill
This skill translates natural language queries into crunch-cli CLI commands and formats outputs for various mediums.
Setup
Ensure the CLI is installed globally:
npm install -g @crunchdao/crunch-cli
Verify installation:
crunch-cli --version
Profiles
Profiles are stored in profiles.json (next to this file). Each profile maps a short name to a set of CLI flags so users can say things like "list crunches for m-jeremy" instead of typing full addresses every time.
Profile file format
{
"profiles": {
"m-jeremy": {
"url": "https://mainnet.helius-rpc.com/?api-key=...",
"wallet": "/path/to/keypair.json",
"multisigAddress": "9WzDXwBbmkg8...",
"coordinatorWallet": "5abc..."
},
"devnet": {
"url": "devnet",
"wallet": "/path/to/dev-keypair.json",
"coordinatorWallet": ""
}
}
}
Profile fields → CLI flags
| Profile field | CLI flag | Notes |
|---|---|---|
url |
-u |
RPC URL or moniker: mainnet-beta, devnet, testnet, localhost |
wallet |
-w |
Path to Solana keypair. Only used in multisig mode when the wallet is a proposer. |
multisigAddress |
-m |
Squads multisig address (not the vault). |
coordinatorWallet |
appended to coordinator get |
The coordinator owner address. When set, default to this coordinator's context (e.g. listing its crunches). |
How to resolve a profile
When a user references a profile name:
- Read
profiles.jsonfrom the skill directory. - Look up the profile by name (case-insensitive match).
- Map each non-empty field to its CLI flag (see table above).
- Prepend the flags to whatever command is being built.
Example: User says "list crunches for m-jeremy"
- Load profile
mainnet-proposer→{ url: "https://mainnet...", wallet: "/path/...", multisigAddress: "9WzDX..." } - Build:
crunch-cli -u "https://mainnet..." -w "/path/..." -m "9WzDX..." crunches list
Example: User says "show coordinator for devnet"
- Load profile
devnet→{ url: "devnet" } - Build:
crunch-cli -u devnet coordinator get
Managing profiles
- Users can ask to add, update, or remove profiles. When they do, read the current
profiles.json, apply the change, and write it back. - If
profiles.jsondoesn't exist yet, create it with the structure above. - When a user says "set profile to m-jeremy" or "use profile m-jeremy", remember it for the rest of the conversation and apply those flags to all subsequent commands automatically.
Command Mapping Rules
IMPORTANT: Direct Phrase Mapping
For speed and consistency, map these phrases directly to CLI commands without LLM interpretation:
| User Phrase Pattern | CLI Command |
|---|---|
get info about crunch |
crunch-cli crunch get " |
get crunch |
crunch-cli crunch get " |
show crunch |
crunch-cli crunch get " |
crunch details |
crunch-cli crunch get " |
get coordinator |
crunch-cli coordinator get "" |
show coordinator |
crunch-cli coordinator get |
my coordinator |
crunch-cli coordinator get |
list crunches |
crunch-cli crunches list |
list my crunches |
crunch-cli crunches list |
show all crunches |
crunch-cli crunches list |
get config |
crunch-cli coordinator get-config |
coordinator config |
crunch-cli coordinator get-config |
checkpoint for |
crunch-cli crunch checkpoint-get-current " |
current checkpoint |
crunch-cli crunch checkpoint-get-current " |
set certificate |
crunch-cli coordinator cert set |
set cert |
crunch-cli coordinator cert set |
update certificate |
crunch-cli coordinator cert set |
get certificate |
crunch-cli coordinator cert get |
get cert |
crunch-cli coordinator cert get |
show certificate |
crunch-cli coordinator cert get |
my certificate |
crunch-cli coordinator cert get |
sweep tokens |
crunch-cli crunch sweep-token-accounts " |
sweep token accounts |
crunch-cli crunch sweep-token-accounts " |
check prize accounts |
crunch-cli crunch check-prize-atas " |
check atas |
crunch-cli crunch check-prize-atas " |
map cruncher addresses |
crunch-cli crunch map-cruncher-addresses |
emission checkpoint add |
crunch-cli crunch emission-checkpoint-add |
Name Extraction Rules
- When a crunch name is provided, wrap it in quotes in the CLI command
- Common competition names: Crunch, Competition, Tournament, Challenge
Execution Pattern
-
Parse the user request to identify:
- The action (get, create, start, end, list, etc.)
- The target (crunch, coordinator, checkpoint, etc.)
- The name/identifier if applicable
- Any additional parameters
-
Map to CLI command using the direct mapping table above
-
Execute the command:
crunch-cli [options][arguments] -
Format The output of the CLI should be kept as close as possible, except if the user told you to post process the data. But map the output for the specified medium (see Output Formatting below as reference to use)
Available Commands Reference
Coordinator Commands
| Command | Description | Usage |
|---|---|---|
coordinator get [owner] |
Get coordinator details | crunch-cli coordinator get [address] |
coordinator get-config |
Get coordinator configuration | crunch-cli coordinator get-config |
coordinator register |
Register new coordinator | crunch-cli coordinator register "Name" |
coordinator reset-hotkey |
Reset SMP hotkey | crunch-cli coordinator reset-hotkey |
coordinator set-emission-config |
Set emission percentages | crunch-cli coordinator set-emission-config |
Certificate Commands
| Command | Description | Usage |
|---|---|---|
coordinator cert set |
Set certificate hash | crunch-cli coordinator cert set "MIIBIjAN..." [--slot 0|1] |
coordinator cert get [owner] |
Get certificate info | crunch-cli coordinator cert get [address] |
Crunch Commands (Competition Management)
| Command | Description | Usage |
|---|---|---|
crunch get |
Get crunch details | crunch-cli crunch get "Synth" |
crunches list [wallet] |
List all crunches | crunch-cli crunches list |
crunch create |
Create new crunch | crunch-cli crunch create "Name" |
crunch start |
Start competition | crunch-cli crunch start "Name" |
crunch end |
End competition | crunch-cli crunch end "Name" |
crunch deposit-reward |
Deposit USDC | crunch-cli crunch deposit-reward "Name" |
crunch margin |
Execute margin payout | crunch-cli crunch margin "Name" |
crunch drain |
Drain remaining USDC | crunch-cli crunch drain "Name" |
crunch get-cruncher |
Get cruncher details | crunch-cli crunch get-cruncher "CrunchName" |
crunch sweep-token-accounts |
Sweep tokens to vault | crunch-cli crunch sweep-token-accounts "Name" |
crunch check-prize-atas |
Check USDC accounts | crunch-cli crunch check-prize-atas "Name" |
crunch map-cruncher-addresses |
Map cruncher addresses | crunch-cli crunch map-cruncher-addresses "CoordName" |
crunch emission-checkpoint-add |
Add emission checkpoint | crunch-cli crunch emission-checkpoint-add "CoordName" |
Checkpoint Commands
| Command | Description | Usage |
|---|---|---|
crunch checkpoint-create |
Create checkpoint | crunch-cli crunch checkpoint-create "Name" prizes.json [--dryrun] |
crunch checkpoint-get-current |
Current checkpoint | crunch-cli crunch checkpoint-get-current "Name" |
crunch checkpoint-get |
Get checkpoint by index | crunch-cli crunch checkpoint-get "Name" |
Global Options
-u, --url- Network: mainnet-beta, devnet, localhost (default: from config)-w, --wallet- Wallet keypair file path-o, --output json- Output as JSON (useful for parsing)-m, --multisig- Create multisig proposal instead of direct execution
Output Formatting
Medium Detection
Detect output medium from user request:
- "for slack" / "slack format" → Slack
- "for telegram" / "telegram format" → T@elegrimm
- "for discord" / "discord format" → Discord
- Default → Plain text / Markdown
Slack Format
*?? Crunch: Synth*
━━━━━━━━━━━━━━━━━
? *Status:* Active
? *Participants:* 142
? *Prize Pool:* 10,000 USDC
? *Checkpoint:* 5
* *Funds:* 3000USDC
T@elegrimm Format
?? Crunch: Synth
?? Status: Active
?? Participants: 142
?? Prize Pool: 10,000 USDC
?? Checkpoint: 5
?? Funds: 3000USDC
Discord Format
## ?? Crunch: Synth
**Status:** Active
**Participants:** 142
**Prize Pool:** 10,000 USDC
**Checkpoint:** 5
Plain Text / Default
Crunch: Synth
Status: Active
Participants: 142
Prize Pool: 10,000 USDC
Checkpoint: 5
Funds: 3000USDC
Error Handling
If a command fails:
- Show user-friendly error message
- Suggest possible fixes:
- Wrong network? Add
-u devnetor-u mainnet-beta - Missing wallet? Add
-w /path/to/wallet.json - Crunch not found? List available crunches with
crunches list
- Wrong network? Add
Example Workflows
"Get me info about crunch Synth"
crunch-cli crunch get "Synth"
"Show my coordinator on mainnet"
crunch-cli -u mainnet-beta coordinator get
"List all crunches for slack"
crunch-cli crunches list
Then format output for Slack.
"What's the current checkpoint for the Chaos competition?"
crunch-cli crunch checkpoint-get-current "Chaos"
Reference Documentation
For full CLI documentation, see references/cli-reference.md.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
Rey Developer:自主编程最佳实践 - Openclaw Skills
MetaMask 钱包:AI 驱动的加密支付与 DeFi - Openclaw Skills
LinkedIn 海报生成器:专业算法优化 - Openclaw 技能
Human Security:高级交互保护 - Openclaw Skills
GitHub 个人主页 README 生成器:自定义开发者主页 - Openclaw Skills
Fiverr 卖家:自动化自由职业服务与销售 - Openclaw Skills
邮件营销文案撰写专家:高转化序列 - Openclaw Skills
数字产品创作助手:构建并扩展数字资产 - Openclaw Skills
DeepSeek Trader:混合 AI 加密货币信号引擎 - Openclaw Skills
加密货币模拟器:回测交易策略 - Openclaw Skills
AI精选
