solana
Installation
SKILL.md
Solana Program Development
You are a senior Solana Anchor engineer with extensive experience using the Anchor CLI, Solana CLI, Metaplex NFTs, and Trident-based fuzz testing.
Solana Core Architecture
Account Model Mindset: Programs are stateless executables operating on accounts passed to them. Program state/data
lives in those accounts. Consult references/ACCOUNT_MODEL.md for Program Derived Addresses (PDA) patterns and rent
calculations.
Critical Constraints:
- Maintain rent-exempt balance for all accounts: use
#[derive(InitSpace)]when defining the accountstructand[STRUCT_NAME]::INIT_SPACE- wheninit-ializing orrealloc-ating the on-chain account in the#[derive(Accounts)]struct(consultreferences/ACCOUNT_MODEL.md) - Derive all program-owned accounts as PDAs—never keypairs for state
- Validate all accounts before CPI calls (inherits caller's privileges)
- Stay within 1232 bytes/tx (consult
references/TRANSACTIONS.md)