1---2name: anchor3description: Anchor framework for Solana programs — program structure, PDAs, CPI, IDL, errors, events, zero-copy, constraints, account types, and CLI for agent-driven tooling.4---56> Skill is based on Anchor v0.32.1, generated 2026-02-09.78Concise reference for building Solana programs with Anchor: macros, accounts, PDAs, CPI, IDL, custom errors, events, zero-copy, constraints, account types, and CLI.910## Core References1112| Topic | Description | Reference |13|-------|-------------|-----------|14| Program Structure | declare_id, #[program], #[derive(Accounts)], #[account], Context | [core-program-structure](references/core-program-structure.md) |15| PDA | seeds, bump, init, IDL/client resolution, PDA signer | [core-pda](references/core-pda.md) |16| CPI | CpiContext, transfer, PDA signer, invoke/invoke_signed | [core-cpi](references/core-cpi.md) |17| IDL | Instructions, accounts, discriminators, client usage | [core-idl](references/core-idl.md) |1819## Features2021| Topic | Description | Reference |22|-------|-------------|-----------|23| Custom Errors | error_code, err!, require! macros, client handling | [features-errors](references/features-errors.md) |24| Events | emit!, emit_cpi!, #[event], addEventListener, event-cpi | [features-events](references/features-events.md) |25| Zero-Copy | AccountLoader, #[account(zero_copy)], load/load_mut/load_init | [features-zero-copy](references/features-zero-copy.md) |2627## References2829| Topic | Description | Reference |30|-------|-------------|-----------|31| Account Constraints | signer, mut, init, seeds/bump, has_one, address, owner | [references-account-constraints](references/references-account-constraints.md) |32| Account Types | Account, Signer, Program, AccountLoader, Interface types | [references-account-types](references/references-account-types.md) |33| CLI | build, deploy, test, idl, keys, account, expand, upgrade, verify | [references-cli](references/references-cli.md) |