crunch-protocol-skill

Verified·Scanned 2/18/2026

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, Telegram, Discord, or plain text.

from clawhub.ai·v965567e·17.8 KB·0 installs
Scanned from 0.1.0 at f2059b2 · Transparency log ↗
$ vett add clawhub.ai/philippwassibauer/crunch-protocol-skill

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 fieldCLI flagNotes
url-u <value>RPC URL or moniker: mainnet-beta, devnet, testnet, localhost
wallet-w <value>Path to Solana keypair. Only used in multisig mode when the wallet is a proposer.
multisigAddress-m <value>Squads multisig address (not the vault).
coordinatorWalletappended to coordinator getThe 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:

  1. Read profiles.json from the skill directory.
  2. Look up the profile by name (case-insensitive match).
  3. Map each non-empty field to its CLI flag (see table above).
  4. Prepend the flags to whatever command is being built.

Example: User says "list crunches for m-jeremy"

  1. Load profile mainnet-proposer{ url: "https://mainnet...", wallet: "/path/...", multisigAddress: "9WzDX..." }
  2. Build: crunch-cli -u "https://mainnet..." -w "/path/..." -m "9WzDX..." crunches list

Example: User says "show coordinator for devnet"

  1. Load profile devnet{ url: "devnet" }
  2. 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.json doesn'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 PatternCLI Command
get info about crunch <name>crunch-cli crunch get "<name>"
get crunch <name>crunch-cli crunch get "<name>"
show crunch <name>crunch-cli crunch get "<name>"
crunch details <name>crunch-cli crunch get "<name>"
get coordinator <address>crunch-cli coordinator get "<address>"
show coordinatorcrunch-cli coordinator get
my coordinatorcrunch-cli coordinator get
list crunchescrunch-cli crunches list
list my crunchescrunch-cli crunches list
show all crunchescrunch-cli crunches list
get configcrunch-cli coordinator get-config
coordinator configcrunch-cli coordinator get-config
checkpoint for <name>crunch-cli crunch checkpoint-get-current "<name>"
current checkpoint <name>crunch-cli crunch checkpoint-get-current "<name>"
set certificatecrunch-cli coordinator cert set
set certcrunch-cli coordinator cert set
update certificatecrunch-cli coordinator cert set
get certificatecrunch-cli coordinator cert get
get certcrunch-cli coordinator cert get
show certificatecrunch-cli coordinator cert get
my certificatecrunch-cli coordinator cert get
sweep tokens <name>crunch-cli crunch sweep-token-accounts "<name>"
sweep token accounts <name>crunch-cli crunch sweep-token-accounts "<name>"
check prize accounts <name>crunch-cli crunch check-prize-atas "<name>"
check atas <name>crunch-cli crunch check-prize-atas "<name>"
map cruncher addressescrunch-cli crunch map-cruncher-addresses
emission checkpoint addcrunch-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

  1. 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
  2. Map to CLI command using the direct mapping table above

  3. Execute the command:

    crunch-cli [options] <command> [arguments]
    
  4. 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

CommandDescriptionUsage
coordinator get [owner]Get coordinator detailscrunch-cli coordinator get [address]
coordinator get-configGet coordinator configurationcrunch-cli coordinator get-config
coordinator register <name>Register new coordinatorcrunch-cli coordinator register "Name"
coordinator reset-hotkeyReset SMP hotkeycrunch-cli coordinator reset-hotkey
coordinator set-emission-configSet emission percentagescrunch-cli coordinator set-emission-config <coord%> <staker%> <fund%>

Certificate Commands

CommandDescriptionUsage
coordinator cert set <pubkey> [--slot N]Set certificate hashcrunch-cli coordinator cert set "MIIBIjAN..." [--slot 0|1]
coordinator cert get [owner]Get certificate infocrunch-cli coordinator cert get [address]

Crunch Commands (Competition Management)

CommandDescriptionUsage
crunch get <name>Get crunch detailscrunch-cli crunch get "Synth"
crunches list [wallet]List all crunchescrunch-cli crunches list
crunch createCreate new crunchcrunch-cli crunch create "Name" <payoutUSDC> [maxModels]
crunch start <name>Start competitioncrunch-cli crunch start "Name"
crunch end <name>End competitioncrunch-cli crunch end "Name"
crunch deposit-rewardDeposit USDCcrunch-cli crunch deposit-reward "Name" <amount>
crunch margin <name>Execute margin payoutcrunch-cli crunch margin "Name"
crunch drain <name>Drain remaining USDCcrunch-cli crunch drain "Name"
crunch get-cruncherGet cruncher detailscrunch-cli crunch get-cruncher "CrunchName" <wallet>
crunch sweep-token-accountsSweep tokens to vaultcrunch-cli crunch sweep-token-accounts "Name"
crunch check-prize-atasCheck USDC accountscrunch-cli crunch check-prize-atas "Name"
crunch map-cruncher-addressesMap cruncher addressescrunch-cli crunch map-cruncher-addresses "CoordName"
crunch emission-checkpoint-addAdd emission checkpointcrunch-cli crunch emission-checkpoint-add "CoordName" <amount>

Checkpoint Commands

CommandDescriptionUsage
crunch checkpoint-createCreate checkpointcrunch-cli crunch checkpoint-create "Name" prizes.json [--dryrun]
crunch checkpoint-get-currentCurrent checkpointcrunch-cli crunch checkpoint-get-current "Name"
crunch checkpoint-getGet checkpoint by indexcrunch-cli crunch checkpoint-get "Name" <index>

Global Options

  • -u, --url <network> - Network: mainnet-beta, devnet, localhost (default: from config)
  • -w, --wallet <path> - Wallet keypair file path
  • -o, --output json - Output as JSON (useful for parsing)
  • -m, --multisig <addr> - 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" → Telegram
  • "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

Telegram Format

🏆 <b>Crunch: Synth</b>

📊 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:

  1. Show user-friendly error message
  2. Suggest possible fixes:
    • Wrong network? Add -u devnet or -u mainnet-beta
    • Missing wallet? Add -w /path/to/wallet.json
    • Crunch not found? List available crunches with crunches list

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.