Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/solanabr/solana-ai-kitWrote 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.
[](https://agentmods.dev/commands/solanabr/solana-ai-kit/generate-idl-client)<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/generate-idl-client"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/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.
<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/generate-idl-client"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/generate-idl-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.00722 |
| Opus 5.5 | $0.00008 | $0.00289 |
| Sonnet 5.5 | $0.00004 | $0.00144 |
| Haiku 4.5 | $0.00002 | $0.00072 |
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 1mo 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.
Copies of this mod
2 near-identical copies found in the catalogue:
- generate-idl-client — 100% identical, 299 lines differ
- generate-idl-client — 100% identical, 299 lines differ
How it starts
The opening of the file, as written. The whole thing — 30 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate or refresh the client for a program. $ARGUMENTS can name the program, the IDL path, or the output directory.
Pipeline and repo layout: idl-codegen.md. Using the generated client: kit/codama.md.
Choose the generator
- Codama (default): renders a Kit-native TypeScript client, plus a Rust client if wanted, from an Anchor or Shank IDL. Use it for new clients,
@solana/kitfrontends, and every native or Pinocchio program. - Anchor TS client (
@anchor-lang/core): only when the app already builds onProgram/AnchorProvider. There is nothing to generate:anchor buildwritestarget/idl/<name>.jsonandtarget/types/<name>.ts, andnew Program(idl as MyProgram, provider)takes the address fromidl.address. - Rust client or CPI from another Anchor program:
declare_program!(<name>)readsidls/<name>.json. For a deployed program,anchor idl fetch -o idls/<name>.json <PROGRAM_ID>(Anchor 1.x reads the IDL from Program Metadata).
Steps
- Build the IDL from current code:
- Anchor:
NO_DNA=1 anchor buildwritestarget/idl/<name>.json. - Native or Pinocchio with Shank macros:
cargo install shank-cli, thenshank idl -r programs/<name> -o idl(-p <PROGRAM_ID>sets the address). Check that the IDL hasmetadata.origin: "shank": Codama reads Shank IDLs through its Anchor adapter and uses that field to pick 1-byte discriminators.
- Anchor:
- Generate with Codama:
- Anchor CLIs with the
codamasubcommand (checkanchor codama --help):anchor codama generate -l js -p clients target/idl/<name>.json, or set[clients] auto = trueandjs = truein Anchor.toml to regenerate on everyanchor build. - Codama CLI:
npx codama init(asks for the IDL path and renderers, writescodama.json, installs@codama/renderers-jsand, for Anchor or Shank IDLs,@codama/nodes-from-anchor), thennpx codama run js(or--all). - Script form, if the project already has one:
createFromRoot(rootNodeFromAnchor(idl)).accept(renderVisitor(outDir)), withcreateFromRootfromcodamaandrenderVisitorfrom@codama/renderers-js.
- Anchor CLIs with the
- Typecheck the consumers (
npx tsc --noEmit) and run the tests that use the client. - Commit generated code when consumers should not have to run codegen; otherwise wire generation into the build or CI. Regenerate after every instruction or account change.
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.
- 1mo ago Changed · -261 lines · +4 tokens per session 3cdbe9112862
- 1mo ago Changed 45b38fb4f909
- 1mo ago First seen · 291 lines · 15 tokens per session scan A 62e550308da7
generate-idl-client is a command published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 722 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
types
Hostile audit of the static type layer: assume every any, every suppression, and every unchecked cast is hiding a real type error until proven otherwise. The type checker is only as strong as the escape hatches punched through it — this command finds every hole.
nxt-api-route
Generates a Next.js App Router API route handler (route.ts) with proper TypeScript types, request validation, and error handling. Auto-detects auth patterns from the project.
nxt-component
Generates a Next.js + TypeScript + Tailwind component. Auto-detects project conventions (naming, folder structure, function style) from existing components.
format
Auto-format code and fix TypeScript issues.
/build-fix
Incrementally fix TypeScript and build errors one at a time, verifying each fix before moving on.
checklist
Generate a custom checklist for the current feature based on user requirements.