Skip to content

Add anchor-idl-agent-skill (meta-skill: any Anchor IDL → agent tools) #46

Description

@Jay0xx

Adds anchor-idl-agent-skill, a meta-skill that turns any deployed Anchor program on Solana into an agent-callable tool surface.

Where the existing skills teach an agent about one domain (payments, games, oracles, token extensions…), this one teaches it to consume the long tail of thousands of deployed Anchor programs. It covers:

  • IDL ingestion (on-chain / GitHub / file / Anchor.toml) — both v0.29 legacy and v0.30+ specs, with on-chain discriminator verification
  • Tool-schema generation — emits JSON-schema per instruction, with accounts auto-bucketed into auto / resolved / user so the LLM never invents PDAs or sysvar pubkeys
  • 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 display, and a confirmation flow before any send
  • Anchor error decoding0x1771 → enum name → source line, with constraint-violation parsing (Left/Right pair + caused-by account)
  • Safety rails — mainnet program allowlist, hard CU/fee caps, simulation-or-die, no auto-retry of failed sends
  • Worked adapters for Jupiter V6, Drift V2, Kamino Lend, MarginFi v2, Squads v4 — including a "propose-via-Squads" mode that wraps any other adapter's instruction into a Squads vault proposal for free
  • Reference TypeScript impl at code/@solanabr/anchor-agent-toolkit — with vitest suite and Surfpool-based smoke tests

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions