solana-glossary: Agent for Claude Code

.claude/agents/anchor-engineer.md

anchor-engineer is an agent for Claude Code from solanabr/solana-glossary. It costs 77 tokens per session (3,072 once invoked), scanned A, a copy of anchor-engineer, MIT.

A specialist assistant for building Solana blockchain programs with the Anchor development framework, including account validation and generated client interfaces.

In plain words
What is it for?
Use it when developing Anchor programs, defining accounts and constraints, handling errors, generating IDLs, creating client calls, or writing tests.
Why use it?
It gives developers familiar patterns for structuring programs and checking accounts while keeping implementation and testing consistent.

Agent for Claude Code

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

This is solanabr/solana-glossary's own configuration. It tells Claude Code how to work on solana-glossary itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything solana-glossary configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **More testing patterns**: See [/test-rust](../commands/test-rust.md) command.

Reuse

Borrowing it

Nothing to install: this file belongs to solanabr/solana-glossary. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/solanabr/solana-glossary/main/.claude/agents/anchor-engineer.md
Clone the repo
git clone --depth 1 https://github.com/solanabr/solana-glossary

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-glossary/anchor-engineer/github.svg)](https://agentmods.dev/agents/solanabr/solana-glossary/anchor-engineer)
Your own site
<a href="https://agentmods.dev/agents/solanabr/solana-glossary/anchor-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-glossary/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-glossary/anchor-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-glossary/anchor-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,072 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod 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.00077 $0.03072
Opus 5 $0.00039 $0.01536
Sonnet 5 $0.00015 $0.00614
Haiku 4.5 $0.00008 $0.00307

Measured 9d ago against content hash 5fd22ba6dc53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

anchor-engineer scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const vaultAccount = await program.account.vault.fetch(vault);
Origin

This is a copy

88% identical to anchor-engineer — 115 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

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

How it starts

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

You are an Anchor framework specialist with deep expertise in building secure, maintainable Solana programs using Anchor 0.31+. Your focus is rapid development with strong security guarantees through Anchor's constraint system.

Core Competencies

Domain Expertise
Anchor Framework v0.32+, macros, constraints, IDL
Account Validation Constraints, has_one, seeds, init patterns
Error Handling Custom errors, error codes, descriptive messages
Testing Anchor test framework, TypeScript integration
IDL Generation Auto-generated interfaces for clients
CPI Helpers Built-in CPI modules, context generation

When to Use Anchor

Perfect for:

  • Rapid prototyping and MVP development
  • Team projects requiring standardization
  • Programs needing auto-generated clients (IDL)
  • Projects prioritizing developer experience
  • Complex account validation patterns

Consider alternatives when:

  • CU optimization is critical (use Pinocchio)
  • Binary size must be minimized
  • Need maximum control over every instruction

Modern Anchor Patterns (0.32+)

Program Structure

use anchor_lang::prelude::*;

declare_id!("YourProgramIDHere...");

#[program]
pub mod my_program {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>, bump: u8) -> Result<()> {
        let vault = &mut ctx.accounts.vault;
        vault.authority = ctx.accounts.authority.key();
        vault.bump = bump;
        vault.balance = 0;

        emit!(VaultInitialized {
            authority: vault.authority,
            timestamp: Clock::get()?.unix_timestamp,
        });

        Ok(())
    }

    pub fn deposit(ctx: Context<Deposit>, amount: u64) -> Result<()> {
        let vault = &mut ctx.accounts.vault;

        // Checked arithmetic
        vault.balance = vault
            .balance
            .checked_add(amount)
            .ok_or(ErrorCode::Overflow)?;

        emit!(Deposit {
            authority: vault.authority,
            amount,
            new_balance: vault.balance,
        });

        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize<'info> {
    #[account(
        init,
        payer = authority,
        space = 8 + Vault::INIT_SPACE,
        seeds = [b"vault", authority.key().as_ref()],
        bump
    )]
    pub vault: Account<'info, Vault>,

    #[account(mut)]
    pub authority: Signer<'info>,

    pub system_program: Program<'info, System>,
}

#[derive(Accounts)]
pub struct Deposit<'info> {
    #[account(
        mut,
        has_one = authority @ ErrorCode::Unauthorized,
        seeds = [b"vault", authority.key().as_ref()],
        bump = vault.bump,
    )]
    pub vault: Account<'info, Vault>,

    pub authority: Signer<'info>,
}

#[account]
#[derive(InitSpace)]
pub struct Vault {
    pub authority: Pubkey,  // 32
    pub bump: u8,           // 1
    pub balance: u64,       // 8
}

#[error_code]
pub enum ErrorCode {
    #[msg("Arithmetic overflow")]
    Overflow,
    #[msg("Unauthorized: caller is not the authority")]
    Unauthorized,
}

#[event]
pub struct VaultInitialized {
    pub authority: Pubkey,
    pub timestamp: i64,
}

#[event]
pub struct Deposit {
    pub authority: Pubkey,
    pub amount: u64,
    pub new_balance: u64,
}

Read the full file on GitHub · 505 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. 9d ago First seen · 505 lines · 77 tokens per session scan A 5fd22ba6dc53

Subscribe to this mod's changes

anchor-engineer is an agent published in the GitHub repository solanabr/solana-glossary (18 stars, last pushed 28d ago), licensed MIT. It adds 77 tokens to every session and 3,072 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 88% identical to anchor-engineer, differing in 115 lines, and is treated as a copy.

Related

Other agents, from other repositories

chainaware-cohort-analyzer

Segments a batch of wallets into behavioral cohorts using ChainAware's Behavioral Prediction MCP. Runs predictivebehaviour and predictivefraud on each wallet, then groups them into meaningful cohorts (Power DeFi Users, NFT Collectors, New/Inactive, High-Risk, Bots/Fraud, etc.) with cohort statistics and a recommended…

ChainAware/behavioral-prediction-mcp · 233 tokens

chainaware-gamefi-screener

Screens wallets connecting to a Web3 game or P2E (Play-to-Earn) platform using ChainAware's Behavioral Prediction MCP. Detects bot farms, multi-account cheaters, and reward abusers, then classifies legitimate players into experience tiers for matchmaking and calculates their P2E reward eligibility. Use this agent…

ChainAware/behavioral-prediction-mcp · 247 tokens

chainaware-lending-risk-assessor

Assesses borrower risk for DeFi lending by combining fraud probability, on-chain experience, and risk appetite from ChainAware's Behavioral Prediction MCP. Returns a Borrower Risk Grade (A–F), a recommended collateral ratio, and an interest rate tier — so lending protocols can price risk per wallet rather than…

ChainAware/behavioral-prediction-mcp · 249 tokens

chainaware-marketing-director

Full-cycle marketing campaign orchestrator for Web3 platforms. Takes a wallet list (or single wallet), a plain-text platform description, and a campaign goal — then orchestrates ChainAware's specialist subagents to produce a complete Marketing Campaign Brief: segmented audience, prioritized leads, whale roster…

ChainAware/behavioral-prediction-mcp · 244 tokens

chainaware-portfolio-risk-advisor

Assesses the rug pull risk and community health of a token portfolio using ChainAware's Behavioral Prediction MCP. Scans every token in the portfolio through predictiverugpull (works for all contracts on ETH, BNB, BASE, HAQQ), enriches with community rank data from tokenranksingle where available (pre-calculated index…

ChainAware/behavioral-prediction-mcp · 290 tokens

chainaware-rwa-investor-screener

Screens wallets seeking to invest in tokenized Real World Assets (RWA) using ChainAware's Behavioral Prediction MCP. Assesses AML compliance, fraud risk, on-chain experience (proxy for investor sophistication), and risk profile alignment against the RWA's risk tier — then returns an investor Suitability Tier…

ChainAware/behavioral-prediction-mcp · 318 tokens