anchor-engineer

anchor-engineer is an agent for Claude Code from solanabr/solana-ai-kit. It costs 51 tokens per session (647 once invoked), scanned A, original, MIT.

A specialist guide for building Solana programs with Anchor, a Rust framework that provides standard patterns for blockchain programs. It covers account checks, error handling, tests, interface descriptions, and calls between programs.

In plain words
What is it for?
Use it for new Solana programs, prototypes, team projects, account validation, custom errors, Rust tests, interface description generation, and cross-program calls.
Why use it?
It helps developers build Solana programs quickly while applying consistent account validation and security patterns. It also reduces the amount of repeated setup needed for teams and clients.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it for new Solana programs, prototypes, team projects, account validation, custom errors, Rust tests, interface description generation, and cross-program calls.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/solanabr/solana-ai-kit/anchor-engineer
Install

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.

Clone the repo
git clone --depth 1 https://github.com/solanabr/solana-ai-kit

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 anchor-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/anchor-engineer/github.svg)](https://agentmods.dev/agents/solanabr/solana-ai-kit/anchor-engineer)
Your own site
<a href="https://agentmods.dev/agents/solanabr/solana-ai-kit/anchor-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/anchor-engineer/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 anchor-engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/solanabr/solana-ai-kit/anchor-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/anchor-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 647 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 original No closer match found 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.00051 $0.00647
Opus 5.5 $0.00020 $0.00259
Sonnet 5.5 $0.00010 $0.00129
Haiku 4.5 $0.00005 $0.00065

Measured 26d ago against content hash ecaec48569ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

anchor-engineer 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 26d 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

Copies of this mod

2 near-identical copies found in the catalogue:

.claude/agents/anchor-engineer.md · 37 lines

How it starts

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

You implement Solana programs with Anchor 1.x (Solana 3.x / Agave toolchain). Lean on Anchor's constraint system instead of hand-written checks, and keep each instruction small enough to audit.

Read before coding

Anchor 1.x details older habits get wrong

  • CpiContext::new and new_with_signer take the program Pubkey (ctx.accounts.token_program.key()), not an AccountInfo.
  • SPL transfers use anchor_spl::token_interface::transfer_checked with InterfaceAccount/Interface types, so the same code serves Token and Token-2022.
  • Account space is T::DISCRIMINATOR.len() + T::INIT_SPACE with #[derive(InitSpace)].
  • One #[error_code] enum per program. Duplicate mutable accounts are rejected unless marked dup.
  • The TS client package is @anchor-lang/core. IDLs live in Program Metadata and are consumed with declare_program!.
  • anchor init scaffolds Rust LiteSVM tests under programs/<name>/tests/, and anchor test runs against Surfpool. Rebuild before testing, because the .so is embedded at test-compile time.
  • Validate stored PDAs with bump = account.bump rather than re-deriving the bump.

Handoffs

  • Account model, PDA scheme, or multi-program split still open: solana-architect
  • CU-bound hot paths or binary-size limits: pinocchio-engineer
  • Token-2022 extensions and token launches: token-engineer
  • Test suites, fuzzing, CU benchmarks: solana-qa-engineer

Read the full file on GitHub · 37 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. 26d ago Changed · -477 lines · -26 tokens per session ecaec48569ae
  2. 27d ago Changed e39170a0429f
  3. 1mo ago First seen · 514 lines · 77 tokens per session scan A 2468ca0001b9

Subscribe to this mod's changes

anchor-engineer is an agent published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 26d ago), licensed MIT. It adds 51 tokens to every session and 647 once invoked, about $0.0002 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.