Solana Development Skill (framework-kit-first)
What this Skill is for
Use this Skill when the user asks for:
- Solana dApp UI work (React / Next.js)
- Wallet connection + signing flows
- Transaction building / sending / confirmation UX
- On-chain program development (Anchor or Pinocchio)
- Client SDK generation (typed program clients)
- Local testing (LiteSVM, Mollusk, Surfpool)
- Security hardening and audit-style reviews
- Confidential transfers (Token-2022 ZK extension)
- Toolchain setup, version mismatches, GLIBC errors, dependency conflicts
- Upgrading Anchor/Solana CLI versions, migration between versions
Default stack decisions (opinionated)
- UI: framework-kit first
- Use
@solana/client + @solana/react-hooks.
- Prefer Wallet Standard discovery/connect via the framework-kit client.
- SDK: @solana/kit first
- Start with
createClient / createLocalClient from @solana/kit-client-rpc for RPC + transaction sending.
- Use
@solana-program/* program plugins (e.g., tokenProgram()) for fluent instruction APIs.
- Prefer Kit types (
Address, Signer, transaction message APIs, codecs).
- Legacy compatibility: web3.js only at boundaries
- If you must integrate a library that expects web3.js objects (
PublicKey, Transaction, Connection),
use @solana/web3-compat as the boundary adapter.
- Do not let web3.js types leak across the entire app; contain them to adapter modules.
- Programs
- Default: Anchor (fast iteration, IDL generation, mature tooling).
- Performance/footprint: Pinocchio when you need CU optimization, minimal binary size,
zero dependencies, or fine-grained control over parsing/allocations.
- Testing
- Default: LiteSVM or Mollusk for unit tests (fast feedback, runs in-process).
- Use Surfpool for integration tests against realistic cluster state (mainnet/devnet) locally.
- Use solana-test-validator only when you need specific RPC behaviors not emulated by LiteSVM.
Operating procedure (how to execute tasks)
When solving a Solana task:
1. Classify the task layer
- UI/wallet/hook layer
- Client SDK/scripts layer
- Program layer (+ IDL)
- Testing/CI layer
- Infra (RPC/indexing/monitoring)
2. Pick the right building blocks
- UI: framework-kit patterns.
- Scripts/backends: @solana/kit directly.
- Legacy library present: introduce a web3-compat adapter boundary.
- High-performance programs: Pinocchio over Anchor.
3. Implement with Solana-specific correctness
Always be explicit about:
- cluster + RPC endpoints + websocket endpoints
- fee payer + recent blockhash
- compute budget + prioritization (where relevant)
- expected account owners + signers + writability
- token program variant (SPL Token vs Token-2022) and any extensions
4. Add tests
- Unit test: LiteSVM or Mollusk.
- Integration test: Surfpool.
- For "wallet UX", add mocked hook/provider tests where appropriate.
5. Deliverables expectations
When you implement changes, provide:
- exact files changed + diffs (or patch-style output)
- commands to install/build/test
- a short "risk notes" section for anything touching signing/fees/CPIs/token transfers
Solana MCP server (live docs + expert assistance)
The Solana Developer MCP gives you real-time access to the Solana docs corpus and Anchor-specific expertise. Use it before falling back to your training data.
Auto-install
Before starting any Solana task, check if the Solana MCP server is already available by looking for tools like mcp__solana-mcp-server__* in your tool list. If the tools are not available, install the MCP server on the fly:
claude mcp add --transport http solana-mcp-server https://mcp.solana.com/mcp
Run this command via the Bash tool at the start of the conversation. The MCP server becomes available immediately after adding it.
Available MCP tools
Once connected, you have access to these tools:
| Tool |
When to use |
| Solana Expert: Ask For Help |
How-to questions, concept explanations, API/SDK usage, error diagnosis |
| Solana Documentation Search |
Look up current docs for specific topics (instructions, RPCs, token standards, etc.) |
| Ask Solana Anchor Framework Expert |
Anchor-specific questions: macros, account constraints, CPI patterns, IDL, testing |
When to reach for MCP tools
- Always when answering conceptual questions about Solana (rent, accounts model, transaction lifecycle, etc.)
- Always when debugging errors you're unsure about — search docs first
- Before recommending API patterns — confirm they match the latest docs
- When the user asks about Anchor macros, constraints, or version-specific behavior
Progressive disclosure (read when needed)
- Solana Kit (@solana/kit): kit/overview.md — plugin clients, quick start, common patterns
- Kit Plugins & Composition: kit/plugins.md — ready-to-use clients, custom client composition, available plugins
- Kit Advanced: kit/advanced.md — manual transactions, direct RPC, building plugins, domain-specific clients
- UI + wallet + hooks: frontend-framework-kit.md
- Kit ↔ web3.js boundary: kit-web3-interop.md
- Anchor programs: programs-anchor.md
- Pinocchio programs: programs-pinocchio.md
- Testing strategy: testing.md
- IDLs + codegen: idl-codegen.md
- Payments: payments.md
- Confidential transfers: confidential-transfers.md
- Security checklist: security.md
- Reference links: resources.md
- Version compatibility: compatibility-matrix.md
- Common errors & fixes: common-errors.md
- Surfpool (local network): surfpool.md
- Surfpool cheatcodes: surfpool-cheatcodes.md
1---2name: skill3description: Solana Development Skill (framework-kit-first)4---5# Solana Development Skill (framework-kit-first)67## What this Skill is for8Use this Skill when the user asks for:9- Solana dApp UI work (React / Next.js)10- Wallet connection + signing flows11- Transaction building / sending / confirmation UX12- On-chain program development (Anchor or Pinocchio)13- Client SDK generation (typed program clients)14- Local testing (LiteSVM, Mollusk, Surfpool)15- Security hardening and audit-style reviews16- Confidential transfers (Token-2022 ZK extension)17- **Toolchain setup, version mismatches, GLIBC errors, dependency conflicts**18- **Upgrading Anchor/Solana CLI versions, migration between versions**1920## Default stack decisions (opinionated)211) **UI: framework-kit first**22- Use `@solana/client` + `@solana/react-hooks`.23- Prefer Wallet Standard discovery/connect via the framework-kit client.24252) **SDK: @solana/kit first**26- Start with `createClient` / `createLocalClient` from `@solana/kit-client-rpc` for RPC + transaction sending.27- Use `@solana-program/*` program plugins (e.g., `tokenProgram()`) for fluent instruction APIs.28- Prefer Kit types (`Address`, `Signer`, transaction message APIs, codecs).29303) **Legacy compatibility: web3.js only at boundaries**31- If you must integrate a library that expects web3.js objects (`PublicKey`, `Transaction`, `Connection`),32 use `@solana/web3-compat` as the boundary adapter.33- Do not let web3.js types leak across the entire app; contain them to adapter modules.34354) **Programs**36- Default: Anchor (fast iteration, IDL generation, mature tooling).37- Performance/footprint: Pinocchio when you need CU optimization, minimal binary size,38 zero dependencies, or fine-grained control over parsing/allocations.39405) **Testing**41- Default: LiteSVM or Mollusk for unit tests (fast feedback, runs in-process).42- Use Surfpool for integration tests against realistic cluster state (mainnet/devnet) locally.43- Use solana-test-validator only when you need specific RPC behaviors not emulated by LiteSVM.4445## Operating procedure (how to execute tasks)46When solving a Solana task:4748### 1. Classify the task layer49- UI/wallet/hook layer50- Client SDK/scripts layer51- Program layer (+ IDL)52- Testing/CI layer53- Infra (RPC/indexing/monitoring)5455### 2. Pick the right building blocks56- UI: framework-kit patterns.57- Scripts/backends: @solana/kit directly.58- Legacy library present: introduce a web3-compat adapter boundary.59- High-performance programs: Pinocchio over Anchor.6061### 3. Implement with Solana-specific correctness62Always be explicit about:63- cluster + RPC endpoints + websocket endpoints64- fee payer + recent blockhash65- compute budget + prioritization (where relevant)66- expected account owners + signers + writability67- token program variant (SPL Token vs Token-2022) and any extensions6869### 4. Add tests70- Unit test: LiteSVM or Mollusk.71- Integration test: Surfpool.72- For "wallet UX", add mocked hook/provider tests where appropriate.7374### 5. Deliverables expectations75When you implement changes, provide:76- exact files changed + diffs (or patch-style output)77- commands to install/build/test78- a short "risk notes" section for anything touching signing/fees/CPIs/token transfers7980## Solana MCP server (live docs + expert assistance)8182The **Solana Developer MCP** gives you real-time access to the Solana docs corpus and Anchor-specific expertise. Use it before falling back to your training data.8384### Auto-install8586Before starting any Solana task, check if the Solana MCP server is already available by looking for tools like `mcp__solana-mcp-server__*` in your tool list. If the tools are **not** available, install the MCP server on the fly:8788```bash89claude mcp add --transport http solana-mcp-server https://mcp.solana.com/mcp90```9192Run this command via the Bash tool at the start of the conversation. The MCP server becomes available immediately after adding it.9394### Available MCP tools9596Once connected, you have access to these tools:9798| Tool | When to use |99|------|-------------|100| **Solana Expert: Ask For Help** | How-to questions, concept explanations, API/SDK usage, error diagnosis |101| **Solana Documentation Search** | Look up current docs for specific topics (instructions, RPCs, token standards, etc.) |102| **Ask Solana Anchor Framework Expert** | Anchor-specific questions: macros, account constraints, CPI patterns, IDL, testing |103104### When to reach for MCP tools105- **Always** when answering conceptual questions about Solana (rent, accounts model, transaction lifecycle, etc.)106- **Always** when debugging errors you're unsure about — search docs first107- **Before** recommending API patterns — confirm they match the latest docs108- **When** the user asks about Anchor macros, constraints, or version-specific behavior109110## Progressive disclosure (read when needed)111- Solana Kit (@solana/kit): [kit/overview.md](references/kit/overview.md) — plugin clients, quick start, common patterns112- Kit Plugins & Composition: [kit/plugins.md](references/kit/plugins.md) — ready-to-use clients, custom client composition, available plugins113- Kit Advanced: [kit/advanced.md](references/kit/advanced.md) — manual transactions, direct RPC, building plugins, domain-specific clients114- UI + wallet + hooks: [frontend-framework-kit.md](references/frontend-framework-kit.md)115- Kit ↔ web3.js boundary: [kit-web3-interop.md](references/kit-web3-interop.md)116- Anchor programs: [programs-anchor.md](references/programs-anchor.md)117- Pinocchio programs: [programs-pinocchio.md](references/programs-pinocchio.md)118- Testing strategy: [testing.md](references/testing.md)119- IDLs + codegen: [idl-codegen.md](references/idl-codegen.md)120- Payments: [payments.md](references/payments.md)121- Confidential transfers: [confidential-transfers.md](references/confidential-transfers.md)122- Security checklist: [security.md](references/security.md)123- Reference links: [resources.md](references/resources.md)124- **Version compatibility:** [compatibility-matrix.md](references/compatibility-matrix.md)125- **Common errors & fixes:** [common-errors.md](references/common-errors.md)126- **Surfpool (local network):** [surfpool.md](references/surfpool.md)127- **Surfpool cheatcodes:** [surfpool-cheatcodes.md](references/surfpool-cheatcodes.md)