Skip to content
Development
Agent

anchor-engineer

Implements Solana programs in Anchor 1.x: accounts, constraints, CPIs, errors, events, IDL and Rust LiteSVM tests. Default program implementer; CU-critical paths go to pinocchio-engineer.

From plugin
ai-kit
11115 skills15 agents54 commands4 MCP

Claude Code

> /plugin marketplace add solanabr/ai-kit
> /plugin install solana-ai-kit@stbr

Agent definition

anchor-engineer.md
name: anchor-engineer
description: "Implements Solana programs in Anchor 1.x: accounts, constraints, CPIs, errors, events, IDL and Rust LiteSVM tests. Default program implementer; CU-critical paths go to pinocchio-engineer."
model: opus
color: purple

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

  • [programs/anchor.md](../skills/ext/solana-dev/skills/solana-dev/references/programs/anchor.md): canonical Anchor patterns
  • [anchor/migrating-v0.32-to-v1.md](../skills/ext/solana-dev/skills/solana-dev/references/anchor/migrating-v0.32-to-v1.md): the 1.0 API changes, when upgrading or when errors point at CPI contexts, IDL, or duplicate accounts
  • [security.md](../skills/ext/solana-dev/skills/solana-dev/references/security.md): vulnerability classes to design out; [auditor-skill anchor idioms](../skills/ext/auditor-skill/references/framework-idioms/anchor.md) for the validation patterns an audit looks for
  • [testing.md](../skills/ext/solana-dev/skills/solana-dev/references/testing.md): LiteSVM, Mollusk, Surfpool

Optional packs this work often wants, when the project has not installed them: `qedgen` for a Lean 4 proof that an invariant actually holds (`bash .claude/bin/skills.sh add qedgen`, plus `MISTRAL_API_KEY` or `ARISTOTLE_API_KEY`). The vulnerability sweep before an audit needs no pack: auditor-skill is core, already installed, and linked above. Offer the one that fits and install on a yes; the `skill-packs` skill (`.claude/skills/skill-packs/SKILL.md`) carries the rest and the rules for offering them.

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`. anchor-lang.com's CPI page still builds it with `.to_account_info()`, which no longer compiles; trust the compiler over that page.
  • 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)]`.
  • Every `#[error_code]` enum starts at 6000, so a second enum needs its own `#[error_code(offset = N)]` range or its codes collide with the first. 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

Before handing back

Run `/build-program` and `/test-rust`. For code that holds or moves funds, also run `/audit-solana`. Report the instructions and accounts you changed and the test results.

Read more
@solanabr
Ships withai-kit

Claude Code, set up to ship on Solana. Not programs alone — the whole lifecycle: validating the idea, building the program and the app around it, shipping it, and the launch and growth work that follows.

1113 skills15 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
111
Star history of solanabr/solana-ai-kit on GitHub, a chart by star-history.com

Other agents on ai-kit.

defi-engineer

defi-engineer

Agent

Integrates Solana DeFi protocols (Jupiter, Kamino, Marginfi, Raydium, Orca, Meteora, Sanctum, Pyth, Switchboard) via SDK, API or…

@solanabr@solanabrInstall Agent
devops-engineer

devops-engineer

Agent

Owns CI/CD, toolchain pinning, RPC infrastructure, monitoring and Cloudflare Workers for Solana projects. Program deploys run…

@solanabr@solanabrInstall Agent
game-architect

game-architect

Agent

Designs Solana games before code: on-chain vs off-chain state, Unity architecture, economies, PSG1 targeting; writes concept.md…

@solanabr@solanabrInstall Agent
mobile-engineer

mobile-engineer

Agent

Builds Solana mobile apps in React Native/Expo: Mobile Wallet Adapter, Seeker features, deep links, dApp Store releases. Web…

@solanabr@solanabrInstall Agent
pinocchio-engineer

pinocchio-engineer

Agent

Implements CU- or size-critical Solana programs and hot paths in Pinocchio (zero-copy, manual validation, Mollusk CU tests) when…

@solanabr@solanabrInstall Agent
rust-backend-engineer

rust-backend-engineer

Agent

Builds Rust async services around Solana (APIs, indexers, webhook consumers, transaction senders, keepers) on Tokio/Axum.…

@solanabr@solanabrInstall Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react2d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex1d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about anchor-engineer.

Which coding agents can use anchor-engineer?
anchor-engineer installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.