solana-vault-standard: Command for Claude Code

.claude/commands/generate-idl-client.md

generate-idl-client is a command for Claude Code from solanabr/solana-vault-standard. It costs 15 tokens per session (2,178 once invoked), scanned A, a copy of generate-idl-client, MIT.

Príkaz na vytvorenie TypeScriptového klienta zo Solana IDL. IDL je súbor, ktorý opisuje rozhranie blockchainového programu, a klient je kód, ktorý s týmto programom komunikuje.

In plain words
What is it for?
Hľadá IDL z Anchoru, Shanku alebo Codamy, spúšťa príslušný generátor a kontroluje kompiláciu výsledného klienta.
Why use it?
Odstraňuje ručné prepisovanie rozhrania programu do TypeScriptu a overuje, či vygenerovaný kód funguje pri kompilácii.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is solanabr/solana-vault-standard's own configuration. It tells Claude Code how to work on solana-vault-standard itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything solana-vault-standard configures →

Reuse

Borrowing it

Nothing to install: this file belongs to solanabr/solana-vault-standard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/solanabr/solana-vault-standard/main/.claude/commands/generate-idl-client.md
Clone the repo
git clone --depth 1 https://github.com/solanabr/solana-vault-standard

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-idl-client

README.md
[![agentmods](https://agentmods.dev/badge/commands/solanabr/solana-vault-standard/generate-idl-client/github.svg)](https://agentmods.dev/commands/solanabr/solana-vault-standard/generate-idl-client)
Your own site
<a href="https://agentmods.dev/commands/solanabr/solana-vault-standard/generate-idl-client"><img src="https://agentmods.dev/badge/commands/solanabr/solana-vault-standard/generate-idl-client/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-idl-client

Your own site · 80×15
<a href="https://agentmods.dev/commands/solanabr/solana-vault-standard/generate-idl-client"><img src="https://agentmods.dev/badge/commands/solanabr/solana-vault-standard/generate-idl-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.02178
Opus 5 $0.00008 $0.01089
Sonnet 5 $0.00003 $0.00436
Haiku 4.5 $0.00002 $0.00218

Measured 11d ago against content hash 62e550308da7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

generate-idl-client scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to generate-idl-client — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/generate-idl-client.md · 291 lines

How it starts

The opening of the file, as written. The whole thing — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are generating a TypeScript client from a Solana program's IDL. Detect the IDL source and generator, run the appropriate pipeline, and verify the output compiles.

Step 1: Detect IDL Source

echo "Detecting IDL source..."
echo ""

# Check for Anchor IDL
if ls target/idl/*.json 2>/dev/null; then
    echo "Found Anchor IDL(s) in target/idl/"
    IDL_SOURCE="anchor"
    ls -la target/idl/*.json
fi

# Check Anchor.toml for program names
if [ -f "Anchor.toml" ]; then
    echo ""
    echo "Anchor.toml programs:"
    grep -A 10 '\[programs' Anchor.toml
fi

# Check for Shank-annotated programs
if grep -r "ShankInstruction\|ShankAccount\|shank" --include="*.rs" programs/ src/ 2>/dev/null | head -5; then
    echo ""
    echo "Shank annotations detected"
    IDL_SOURCE="${IDL_SOURCE:-shank}"
fi

# Check for Codama config
if [ -f "codama.json" ] || [ -f "codama.config.ts" ] || [ -f "codama.config.js" ]; then
    echo ""
    echo "Codama config found"
    IDL_SOURCE="${IDL_SOURCE:-codama}"
fi

# Check for existing IDL files in other locations
if ls idl/*.json 2>/dev/null || ls *.idl.json 2>/dev/null; then
    echo ""
    echo "Found IDL files in project root or idl/ directory"
fi

echo ""
echo "IDL source: ${IDL_SOURCE:-unknown}"

Step 2: Generate IDL (if needed)

Anchor IDL Generation

if [ "$IDL_SOURCE" = "anchor" ] || [ -f "Anchor.toml" ]; then
    echo "Generating Anchor IDL..."

    # Build IDL
    anchor build

    if [ $? -ne 0 ]; then
        echo "Anchor build failed. Fix errors before generating client."
        exit 1
    fi

    echo ""
    echo "Generated IDL files:"
    ls -la target/idl/*.json

    # Show IDL summary
    for idl in target/idl/*.json; do
        PROGRAM=$(basename "$idl" .json)
        INSTRUCTIONS=$(grep -c '"name"' "$idl" | head -1)
        echo "  $PROGRAM: $(cat "$idl" | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'{len(d.get(\"instructions\",[]))} instructions, {len(d.get(\"accounts\",[]))} accounts')" 2>/dev/null || echo "parsed")"
    done
fi

Read the full file on GitHub · 291 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 291 lines · 15 tokens per session scan A 62e550308da7

Subscribe to this mod's changes

generate-idl-client is a command published in the GitHub repository solanabr/solana-vault-standard (24 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 2,178 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to generate-idl-client, differing in 0 lines, and is treated as a copy.