toolly
登录/注册
返回

skill

⛓️ 区块链
访问 GitHub

面向 Solana 生态的全栈开发支持,覆盖 React/Next.js 前端集成、Wallet Standard 钱包连接与交易签名、Anchor 或 Pinocchio 智能合约开发、IDL 驱动…

简介

面向 Solana 生态的全栈开发支持,覆盖 React/Next.js 前端集成、Wallet Standard 钱包连接与交易签名、Anchor 或 Pinocchio 智能合约开发、IDL 驱动…

核心能力速览
✓所属分类:⛓️ 区块链
✓通过 Agent Skills 协议,将「能力」封装为可复用、可安装的 AI 组件
✓支持按需加载领域知识与工具,让通用模型转变为特定任务的专家
适用场景

适用于「⛓️ 区块链」相关场景,可作为可复用的 AI 能力组件,接入支持 Agent Skills 的 AI 客户端(如 Claude、Cursor、Cline 等),按需调用以扩展模型能力。

Skills.MD

Solana Development Skill

<p align="center"> <img src="assets/banner.png" alt="solana-dev — npx skills add solana-dev — skill installed, 8 agents" width="100%" /> </p>

A comprehensive Agent Skill for modern Solana development (July 2026 best practices). Works with every coding agent that has direct Agent Skills support: Claude Code, OpenAI Codex / ChatGPT desktop, GitHub Copilot (CLI + coding agent), Gemini CLI, Cursor, Windsurf, Cline, OpenCode, and anything else that reads SKILL.md.

Overview

This skill gives your coding agent deep knowledge of the current Solana development ecosystem:

  • SDK: @solana/kit v7 plugin clients (createClient() + .use())
  • UI: Wallet Standard connection via @solana/kit-plugin-wallet + @solana/react
  • Legacy Interop: web3.js v3 (RC) — the classic API rebuilt on Kit internals, as the migration target for v1 codebases
  • Programs: Anchor 1.1.x (default), Pinocchio 0.11+ for high-performance needs
  • Testing: Surfpool for integration tests (mainnet forking, cheatcodes, embedded SDK), LiteSVM/Mollusk for unit tests
  • Codegen: Codama-first IDL and client generation
  • Security: Comprehensive vulnerability patterns and prevention
  • Toolchain: Version compatibility, common errors, and troubleshooting guides

Installation

Quick install (any agent, via skills.sh)

npx skills add solana-foundation/solana-dev-skill

The skills CLI detects your installed agents and installs (or symlinks) the skill for each of them.

Install script

git clone https://github.com/solana-foundation/solana-dev-skill
cd solana-dev-skill
./install.sh            # user-level: ~/.agents/skills + ~/.claude/skills
./install.sh --project  # project-level: .agents/skills + .claude/skills
./install.sh --link     # symlink instead of copy (auto-updates with git pull)

Manual install

Copy (or symlink) skills/solana-dev/ into your agent's skills directory:

Agent Project directory Personal directory
Claude Code .claude/skills/ ~/.claude/skills/
OpenAI Codex / ChatGPT desktop .agents/skills/ ~/.agents/skills/
GitHub Copilot (CLI, coding agent, VS Code) .github/skills/ or .agents/skills/ ~/.copilot/skills/ or ~/.agents/skills/
Gemini CLI .gemini/skills/ or .agents/skills/ ~/.gemini/skills/ or ~/.agents/skills/
Cursor .cursor/skills/ or .agents/skills/ ~/.cursor/skills/ or ~/.agents/skills/
Windsurf .windsurf/skills/ or .agents/skills/ ~/.codeium/windsurf/skills/
Cline .cline/skills/ or .claude/skills/ ~/.cline/skills/
OpenCode .opencode/skills/ or .agents/skills/ ~/.config/opencode/skills/

.agents/skills/ (cross-agent convention) plus .claude/skills/ together cover all of the above.

Skill Structure

skills/solana-dev/
├── SKILL.md                         # Main skill definition (required)
└── references/
    ├── kit/                         # @solana/kit: overview, plugins, react, codecs, accounts, codama, gotchas, advanced, programs/
    ├── frontend.md                  # UI patterns (Kit wallet plugin + @solana/react)
    ├── kit-web3-interop.md          # Legacy web3.js routing (v3 RC + migration skill)
    ├── testing.md                   # Testing (Surfpool/LiteSVM/Mollusk)
    ├── idl-codegen.md               # IDL and client generation
    ├── payments.md                  # Payments (Kit, Solana Pay, Kora)
    ├── security.md                  # Security vulnerabilities & prevention
    ├── concepts.md                  # Runtime concepts (rent, PDAs, entrypoint, wire format)
    ├── resources.md                 # Curated reference links
    ├── compatibility-matrix.md      # Version compatibility tables (Anchor/Solana/Rust/GLIBC)
    ├── common-errors.md             # Error message → solution mappings
    ├── confidential-transfers.md    # Confidential transfers (Token-2022 ZK)
    ├── rpc-quick-lookups.md         # One-shot RPC reads via curl
    ├── transactions-v1.md           # Transaction v1 / larger transactions (SIMD-0385)
    ├── programs/
    │   ├── anchor.md                # Anchor program development
    │   ├── design-patterns.md       # Program architecture, CU/CPI limits, account lifecycle
    │   └── pinocchio.md             # Pinocchio (high-performance native)
    ├── anchor/
    │   └── migrating-v0.32-to-v1.md # Anchor v1 migration
    └── surfpool/
        ├── overview.md              # Surfpool local network guide
        ├── kit-plugin.md            # @solana/surfpool/kit — embedded surfnet behind a Kit client
        └── cheatcodes.md            # Surfpool cheatcodes reference (26 surfnet_* methods)

Usage

Once installed, your agent will automatically use this skill when you ask about:

  • Solana dApp UI work (React / Next.js)
  • Wallet connection and signing flows
  • Transaction building, sending, and confirmation UX
  • Transaction v1 / larger transactions (SIMD-0385) — sending, reading, indexing
  • On-chain program development (Anchor or Pinocchio)
  • Client SDK generation (typed program clients)
  • Local testing (Surfpool, LiteSVM, Mollusk)
  • Security hardening and audit-style reviews
  • Surfpool local network setup and cheatcodes
  • Toolchain issues (version mismatches, GLIBC errors, dependency conflicts)
  • Migration between Anchor/Solana CLI versions, and web3.js v1 → v3

Example Prompts

"Help me set up a Next.js app with Solana wallet connection"
"Create an Anchor program for a simple escrow"
"Convert this Anchor program to Pinocchio for better CU efficiency"
"Migrate this web3.js v1 script to web3.js v3"
"Write Surfpool integration tests for my token transfer flow"
"Review this program for security issues"
"I'm getting GLIBC_2.39 not found when running anchor"
"Help me upgrade from Anchor 0.32 to 1.1"
"What versions of Solana CLI work with Anchor 1.1?"
"Run Surfpool and create an account with 100 SOL and USDC"

Stack Decisions

This skill encodes opinionated best practices:

Layer Default Choice Alternative
Client SDK @solana/kit v7 (plugin clients) web3.js v3 RC (legacy migration target)
Wallet / UI @solana/kit-plugin-wallet + @solana/react Wallet Standard hooks directly
Program Framework Anchor 1.1.x Pinocchio 0.11+ (performance)
Unit Testing LiteSVM / Mollusk —
Integration Testing Surfpool (CLI or embedded @solana/surfpool) solana-test-validator
Client Generation Codama —

Content Sources

This skill incorporates best practices from:

Progressive Disclosure

The skill follows the Agent Skills progressive disclosure pattern: the main SKILL.md provides core guidance, and agents read the specialized markdown files under references/ only when needed for specific tasks.

Benchmarks

tests/run.ts contains a small benchmark suite that checks skill trigger matching and MCP auto-install behavior:

cd tests && npm install && npx tsx run.ts

Contributing

Contributions are welcome! Please ensure any updates reflect current Solana ecosystem best practices.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License - see LICENSE for details.

快捷安装

在终端执行以下命令,即可将本 Skill 安装到本地 AI 客户端:

npx skills add solana-foundation/solana-dev-skill

相关推荐