← 返回
安全合规 中文

Solana Dev Skill

End-to-end Solana development playbook (Jan 2026). Prefer Solana Foundation framework-kit (@solana/client + @solana/react-hooks) for React/Next.js UI. Prefer @solana/kit for all new client/RPC/transaction code. When legacy dependencies require web3.js, isolate it behind @solana/web3-compat (or @solana/web3.js as a true legacy fallback). Covers wallet-standard-first connection (incl. ConnectorKit), Anchor/Pinocchio programs, Codama-based client generation, LiteSVM/Mollusk/Surfpool testing, and se
Solana端到端开发手册(2026年1月)。React/Next.js UI首选Solana Foundation框架套件(@solana/client + @solana/react-hooks);新客户端/RPC/交易代码首选@solana/kit。若旧依赖需web3.js,将其隔离于@solana/web3-compat之后(或以@solana/web3.js作为兜底)。内容涵盖wallet-standard优先连接(含ConnectorKit)、Anchor/Pinocchio程序、Codama客户端生成、LiteSVM/Mollusk/Surfpool测试及安全检查清单。
h4rkl
安全合规 clawhub v1.0.0 1 版本 99959 Key: 无需
★ 3
Stars
📥 2,379
下载
💾 73
安装
1
版本
#blockchain#dev#latest#programming#rust#solana#wallet#web3

概述

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

Default stack decisions (opinionated)

1) UI: framework-kit first

  • Use @solana/client + @solana/react-hooks.
  • Prefer Wallet Standard discovery/connect via the framework-kit client.

2) SDK: @solana/kit first

  • Prefer Kit types (Address, Signer, transaction message APIs, codecs).
  • Prefer @solana-program/* instruction builders over hand-rolled instruction data.

3) 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.

4) 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.

5) 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

Progressive disclosure (read when needed)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 14:59 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,718
security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,168
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,506