Skip to content

Add anchor-idl-agent: meta-skill that turns any Anchor IDL into agent-callable tools#40

Open
Jay0xx wants to merge 1 commit into
solanabr:mainfrom
Jay0xx:add-anchor-idl-agent-skill
Open

Add anchor-idl-agent: meta-skill that turns any Anchor IDL into agent-callable tools#40
Jay0xx wants to merge 1 commit into
solanabr:mainfrom
Jay0xx:add-anchor-idl-agent-skill

Conversation

@Jay0xx

@Jay0xx Jay0xx commented Jun 25, 2026

Copy link
Copy Markdown

Adds anchor-idl-agent, a meta-skill that turns any deployed Anchor program on Solana into an agent-callable tool surface. Registered as a submodule under .claude/skills/ext/anchor-idl-agent.

Why this skill

Every other skill in the kit teaches an agent about one domain — payments, games, oracles, token extensions. This one is the meta layer: it lets an agent consume the long tail of thousands of deployed Anchor programs (or any new program shipped tomorrow) without per-program glue code. When the user names an arbitrary program ID — or a protocol the kit doesn't ship dedicated coverage for — this skill takes over.

What it does

  • IDL ingestion (on-chain / GitHub / file / Anchor.toml) — handles both v0.29 legacy and v0.30+ specs, with on-chain discriminator verification
  • Tool-schema generation — emits one JSON-schema tool per instruction, with accounts auto-bucketed into auto / resolved / user
  • Automatic account resolution — PDA derivation from IDL seeds, ATA derivation (incl. Token-2022), sysvar substitution, signer detection
  • Mandatory pre-flight simulation with CU surfacing, return-data decoding, account-diff, explicit confirmation
  • Anchor error decoding0x1771 → enum name → source line, with constraint-violation parsing
  • Safety rails — mainnet program allowlist, hard CU/fee caps, simulate-or-die, no auto-retry
  • Worked adapters for Jupiter V6, Drift V2, Kamino Lend, MarginFi v2, Squads v4 — incl. "propose-via-Squads" mode
  • Reference TypeScript impl at code/@solanabr/anchor-agent-toolkit — vitest + Surfpool harness

What this PR changes

  • .gitmodules — registers Jay0xx/anchor-idl-agent-skill as a submodule
  • .claude/skills/SKILL.md — new "Anchor IDL Runtime (meta)" section + Task Routing row
  • .claude/skills/ext/anchor-idl-agent — submodule pointer

Subagents: idl-tool-architect (opus), idl-adapter-engineer (sonnet). Commands: /ingest-idl, /explain-ix, /simulate-ix, /decode-error.

License: MIT.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@Jay0xx is attempting to deploy a commit to the STBR TRUE Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant