Solana Dev Skill

👤 h4rkl 📦 v1.0.0 ⭐ 4.5 ⬇️ 2.7K 下載
💻 開發程式設計 免費

📖 技能介紹

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

    小蔥技能7w4.net有完整的技能分類。

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)

🤖 AI 評測

這個技能包質量不錯,涵蓋了 Solana 開發的主要方面。它的技術選型建議很明確,新手也能快速知道該用什麼工具。安全部分特別實用,能幫助避免常見的合約漏洞。不過某些領域講得不夠深入,例子也比較少,想學高階技巧可能還得自己找資料。總體來說是個合格的開發參考手冊,但別指望它能完全替代官方文件。

📊 多維度評分

適應性4.3
規範性4.6
有效性4.6
可靠性4.4
可信度4.4

📁 包含檔案 (11 個)

📄 SKILL.md 3.9 KB
📄 _meta.json 135 B
📄 frontend-framework-kit.md 3.1 KB
📄 idl-codegen.md 1.4 KB
📄 kit-web3-interop.md 2 KB
📄 payments.md 1.7 KB
📄 programs-anchor.md 7.6 KB
📄 programs-pinocchio.md 16.4 KB
📄 resources.md 3.2 KB
📄 security.md 7.8 KB
📄 testing.md 8.2 KB