Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
hairyf avatar

Solana Anchor

  • 8 installs
  • 4 repo stars
  • Updated February 25, 2026
  • hairyf/blockchain-skills

Write and review Solana programs with the Anchor framework: program structure, account constraints, CPI, IDL, and TypeScript/Rust clients.

About

Reference for the Anchor Solana program framework covering the Rust eDSL macros, account validation constraints, IDL generation, CPI, and client integration. A developer uses it when implementing or reviewing Anchor programs and their TypeScript or Rust clients.

  • Covers declare_id, #[program], #[derive(Accounts)], PDAs, and CPI
  • Includes anchor-spl tokens, testing with Mollusk/LiteSVM, and Sealevel security

Solana Anchor by the numbers

  • 8 all-time installs (skills.sh)
  • Ranked #326 of 479 Web3 & Blockchain skills by installs in the Skillselion catalog
  • Data as of Jul 13, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hairyf/blockchain-skills --skill solana-anchor

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs8
repo stars4
Last updatedFebruary 25, 2026
Repositoryhairyf/blockchain-skills

What it does

Write and review Solana programs with the Anchor framework: program structure, account constraints, CPI, IDL, and TypeScript/Rust clients.

Files

SKILL.mdMarkdownGitHub ↗
Skill based on Anchor (Solana program framework), generated from sources/solana-anchor/docs/ at 2026-02-25.

Anchor is a Solana program framework: Rust eDSL with macros (declare_id, #[program], #[derive(Accounts)], #[account]), IDL generation, TypeScript/Rust clients, and CLI for build, test, and deploy. Use this skill when implementing or reviewing Anchor programs, CPIs, account validation, and client integration.

Core References

TopicDescriptionReference
Program Structuredeclare_id, #[program], #[derive(Accounts)], #[account], Context, discriminatorscore-program-structure
CPICross-program invocation, CpiContext, PDA signers, invoke/invoke_signedcore-cpi
IDLInterface Description Language, instructions/accounts/discriminators, client usecore-idl
PDAProgram Derived Addresses, seeds, bump, seeds::program, init, IDL resolutioncore-pda
Workspaceinit, new, program layout, build/test/deploy flowcore-workspace
ReallocResize accounts, realloc::payer, realloc::zerocore-realloc
Close Accountclose = target, rent reclamationcore-close-account
Remaining Accountsctx.remaining_accounts, variadic instructions, CPIcore-remaining-accounts

References (Program & Config)

TopicDescriptionReference
Account TypesAccount, Signer, Program, AccountLoader, UncheckedAccount, etc.references-account-types
Account Constraintsinit, mut, seeds/bump, has_one, close, realloc, SPL, #[instruction]references-account-constraints
Anchor.tomlprovider, scripts, workspace, programs, test, toolchain, hooksreferences-anchor-toml
CLIbuild, deploy, test, idl, keys, migrate, upgrade, verifyreferences-cli
SpaceAccount size calculation, InitSpace, type sizesreferences-space
Type ConversionRust ↔ TypeScript type mapping for IDL/clientreferences-type-conversion

Features

TopicDescriptionReference
Eventsemit!, emit_cpi!, addEventListener, decodingfeatures-events
Errors#[error_code], err!, require! and variantsfeatures-errors
Zero-CopyAccountLoader, load_init/load_mut/load, init vs zerofeatures-zero-copy
declare_program!IDL-based CPI and Rust client generationfeatures-declare-program
Tokens (SPL)anchor-spl, mints, token accounts, ATAs, Token 2022, InterfaceAccountfeatures-tokens
Token 2022 ExtensionsExtensionType, tlv_data, extension lifecycle, anchor-spl token_2022_extensionsfeatures-token-extensions
Example ProgramsCurated program-examples repo—Basics, Tokens, Token 2022—when to use eachfeatures-examples
TestingMollusk (Rust instruction harness), LiteSVM (Rust/TS/Python VM)features-testing
Upgrade and Migrateanchor upgrade, migrate script, upgrade authorityfeatures-upgrade-migrate

Clients

TopicDescriptionReference
TypeScriptProgram, methods, accounts, signers, rpc/transaction/instruction, fetchclients-typescript
Rustanchor-client, declare_program!, request/instructions/send, account fetchclients-rust

Best Practices

TopicDescriptionReference
SecuritySealevel attacks, constraints, UncheckedAccount usagebest-practices-security
Constraints and ValidationWhen to use which constraints, avoid UncheckedAccount pitfallsbest-practices-constraints

Advanced

TopicDescriptionReference
Verifiable Buildsanchor build --verifiable, verify, Dockeradvanced-verifiable-builds
AVMAnchor Version Manager, install, use, listadvanced-avm

Related skills

Web3 & Blockchainbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.