solana-development

Guide Solana program development with Anchor or native Rust.

32|2|Updated Nov 5, 2025
One-click install
npx skills add https://github.com/tenequm/claude-plugins --skill solana-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-development
Source: https://github.com/tenequm/claude-plugins/tree/main/solana/skills/solana-development
Command: npx skills add https://github.com/tenequm/claude-plugins --skill solana-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

A practical guide for building Solana programs with either the Anchor framework or native Rust, covering accounts, PDAs, CPIs, tests, and deployment.

Core Features & Use Cases

  • Side-by-side guidance for Anchor and native Rust approaches
  • Testing and deployment workflows
  • Core Solana concepts (PDAs, CPIs, accounts, token programs)

Quick Start

Install Anchor or set up a native Rust project and begin with a minimal program

Frequently Asked Questions about solana-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Solana program with Anchor or native Rust?

Building Solana programs with Anchor or native Rust starts by installing Anchor or setting up a native Rust project, then defining accounts, PDAs, and CPIs for your program logic. Anchor provides macros that simplify account handling and serialization, while native Rust offers lower-level control. Both approaches support token operations, DeFi, and NFT use cases with testing and deployment workflows included.

What are PDAs and CPIs, and why do I need them in Solana development?

PDAs (Program Derived Addresses) are deterministic accounts controlled by your program, enabling state management without private keys. CPIs (Cross-Program Invocations) allow your program to call other Solana programs. Both are core to building composable DeFi and NFT applications; Anchor abstracts much of their complexity through macros, while native Rust requires explicit account and instruction serialization.

Can I use Anchor for testing and deployment, or do I need separate tools?

Anchor includes built-in testing and deployment workflows within its framework. Both Anchor and native Rust projects support testing through Rust's standard test harness. Anchor's deployment tools handle on-chain verification; native Rust projects require manual CLI commands. Both approaches satisfy production deployment verification requirements.

When should I choose native Rust over Anchor for Solana development?

Choose native Rust when you need fine-grained control over account serialization, error handling, or have performance-critical code where macro overhead matters. Anchor is faster for rapid development and safer for complex account interactions. Native Rust is preferred for specialized security contexts or when integrating with existing Rust ecosystems that don't depend on Anchor.

How do I handle errors and security in Solana programs?

Error handling in Solana programs requires explicit validation of account ownership, lamport transfers, and instruction data. Anchor provides error enums and custom error codes; native Rust requires manual error type definitions. Both approaches must validate account types, check PDA derivation, and prevent unauthorized CPI calls to ensure security in token and DeFi operations.

Do I need to understand account serialization for Solana development?

Yes, account serialization is fundamental in Solana development. Anchor handles serialization through derive macros and the `Account` type, abstracting complexity. Native Rust requires manual serialization using `Borsh` or other formats. Understanding serialization is essential for designing state layouts, especially for token programs and multi-account transactions.