sendaifun/solana-new/debug-program
Claude Code and agent skill by sendaifun/solana-new
- community
Checking that the SKILL.md file is still in the repository.
Help a developer debug a failing Solana program or transaction. Use when a user says "debug my program", "program error", "transaction failed", "stuck", "help me fix", "why is this failing", "error code", or "instruction failed". Reads build-context.md if available.
Install
npx vskill@latest install sendaifun/solana-new/debug-programSKILL.md
Preamble (run first)
If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry. Use AskUserQuestion:
Help superstack get better! We track which skills get used and how long they take —no code, no file paths, no PII. Change anytime in~/.superstack/config.json.
Options:
- A) Sure, help superstack improve (anonymous)
- B) No thanks
If A: run this bash:
If B: run this bash:
This only happens once. If TEL_PROMPTED is yes, skip this entirely and proceed to the skill workflow.
Wrong skill? See SKILL_ROUTER.md for all available skills.
Debug Program
Overview
Systematically diagnose and fix Solana program errors and transaction failures. Instead of guessing, follow a structured debugging workflow: read the error, simulate the transaction, inspect program logs, check account state, and trace CPI chains. Covers the top 20 most common Solana dev mistakes and their fixes.
Workflow
- Check for
.superstack/build-context.mdfor context on what the user is building. If not found, gather context from the user and write.superstack/build-context.mdso future skills can use it. - Get the error: ask for the exact error message, transaction signature, or program logs.
- Read references/debug-workflow.md and follow the systematic debugging process.
- If the error matches a known pattern, check references/common-pitfalls.md for the exact cause and fix.
- Debug steps:
a. Parse the error message — identify error code, program, instruction index b. Simulate the transaction to get full logs: connection.simulateTransaction(tx) c. Inspect account state: check existence, ownership, balance, data d. If CPI involved, trace the call chain to find which program failed e. Apply the fix, test on devnet, confirm resolution
- If stuck after 3 attempts, suggest a different approach or escalate to a community resource.
Non-Negotiables
- Always get the exact error message or transaction signature first. Do not guess without data.
- Simulate transactions before sending — the simulation logs contain the actual error.
- Check the basics first: is the account initialized? Is the signer correct? Is there enough SOL?
- Never suggest "just retry" without understanding why the transaction failed.
- When debugging CPI errors, identify which program in the chain actually failed.
- Use Surfpool for reproducible debugging — fork the state, replay the transaction, inspect.
Phase Handoff
This skill is Phase 2 (Build) in the Idea → Build → Launch journey.
Reads: .superstack/build-context.md Writes/Updates: .superstack/build-context.md (creates if missing) with:
debug.issues_resolved: array of { error, cause, fix }debug.last_debug_session: ISO timestamp
When updating, deep-merge — don't overwrite existing fields.
See ../../data/specs/phase-handoff.md for the full JSON contract.
Quick Start
Decision Points
- Which RPC for debugging? Use Surfpool with
surfpool start --network mainnetto replay mainnet transactions locally. For a custom upstream RPC, usesurfpool start --rpc-url <RPC_URL>. - Can't read error code? Check Anchor error codes: 6000+ are custom program errors. 0x1 = insufficient funds. 0x0 = success.
- CPI error from another program? Check the inner instructions in transaction logs. The error comes from the CPI'd program, not yours.
Resources
references/
Telemetry (run last)
After the skill workflow completes (success, error, or abort), log the telemetry event. Determine the outcome from the workflow result: success if completed normally, error if it failed, abort if the user interrupted.
Run this bash:
Replace OUTCOME with success/error/abort based on the workflow result.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/build/debug-program/SKILL.md
Popularity
- Repository stars
- 144
- Repository forks
- 40
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sendaifun/solana-new/debug-program)