anchor

Installation
SKILL.md

Skill is based on Anchor v0.32.1, generated 2026-02-09.

Concise reference for building Solana programs with Anchor: macros, accounts, PDAs, CPI, IDL, custom errors, events, zero-copy, constraints, account types, and CLI.

Core References

Topic Description Reference
Program Structure declare_id, #[program], #[derive(Accounts)], #[account], Context core-program-structure
PDA seeds, bump, init, IDL/client resolution, PDA signer core-pda
CPI CpiContext, transfer, PDA signer, invoke/invoke_signed core-cpi
IDL Instructions, accounts, discriminators, client usage core-idl

Features

Topic Description Reference
Custom Errors error_code, err!, require! macros, client handling features-errors
Events emit!, emit_cpi!, #[event], addEventListener, event-cpi features-events
Zero-Copy AccountLoader, #[account(zero_copy)], load/load_mut/load_init features-zero-copy

References

Topic Description Reference
Account Constraints signer, mut, init, seeds/bump, has_one, address, owner references-account-constraints
Account Types Account, Signer, Program, AccountLoader, Interface types references-account-types
CLI build, deploy, test, idl, keys, account, expand, upgrade, verify references-cli
Weekly Installs
2
GitHub Stars
3
First Seen
Feb 28, 2026
Installed on
mcpjam2
claude-code2
replit2
junie2
windsurf2
zencoder2