softspark/ai-toolkit/debug
Claude Code and agent skill by softspark/ai-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Systematic debugging via logs, health checks, hypothesis-driven investigation. Triggers: debug, error, trace root cause, fix bug, reproduce symptom, investigation.
Install
npx vskill@latest install softspark/ai-toolkit/debugSKILL.md
The same SKILL.md was published earlier as softspark/ai-toolkit/debug.
Debug Helper
$ARGUMENTS
Systematic debugging for application issues.
Project context
- Recent logs: !
docker compose logs --tail 20 2>/dev/null || tail -20 logs/*.log 2>/dev/null || echo "no-logs-found"
Automated Error Parsing
Pipe error output through the error parser for structured diagnosis:
The script outputs JSON with:
- language: detected language (python/node/go/php)
- error_type: extracted error class (e.g., ModuleNotFoundError)
- message: the error message text
- category: classification (import, reference, type, connection, timeout, memory, permission, syntax)
- stack_frames: parsed file/line/function from the stack trace
- files_to_check: unique files from the trace, ordered by relevance
- common_causes: likely root causes for this error category
Use the parsed output to focus investigation on the right files and hypotheses.
Methodology — The Iron Law
Random fixes waste time and create new bugs. Quick patches mask underlying issues. Complete each phase before proceeding to the next.
Phase 1 — Root Cause Investigation
Start at the entry point the user actually used. Record one command, its fixture and environment, what should happen, and the observation that identifies this symptom. A failing exit code alone can mean the setup failed. For example, a CLI test for truncated output should compare the expected last record with stdout. Keep the original command and input when reducing the case. Each reduction must still show the same symptom. Use synthetic data or redact logs before sharing.
For an intermittent failure, choose a bounded number of trials and record failures / attempts, with the seed, concurrency or timing when relevant. If the original environment is unavailable, record the exact observation still needed and identify which evidence came from the reporter.
Check recent code, dependency and configuration changes. For a multi-service failure, trace the same input across boundaries to find where results diverge.
Phase 2 — Pattern Analysis
Find similar working code in the same codebase. Compare against references completely, not skimming. List every difference, however small.
Phase 3 — Hypothesis & Testing
Form a single hypothesis ("X is the root cause because Y"). Test minimally — smallest possible change, one variable at a time. Verify before continuing — if it didn't work, form a NEW hypothesis. Don't stack fixes on top of fixes.
Phase 4 — Implementation
Turn the failing case into a regression test and fix its cause. Rerun both the regression test and the original command with its original fixture. Report the observed result before and after. For an intermittent case repeat the same trial budget and conditions; a run with zero failures measures that sample. If the original scenario remains unverified, say which check passed and which still needs to run.
"5 Whys" — depth gate
Ask "Why?" at least 5 times to find the real issue. Stop at the first plausible answer = symptom fixing. Example: crash → null pointer → user object null → API 404 → invalid user ID → frontend allowed negative IDs (root cause).
Architecture escalation (3+ failed fixes)
If three hypotheses failed and each fix reveals new shared state in different places, the architecture is wrong, not your hypothesis. STOP. Discuss with user before more attempts.
Debugging Workflow
1. Check Logs
2. Check Service Health
3. Interactive Debug
4. Database Checks
Common Debug Scenarios
API Returns 500
Slow Performance
Connection Issues
Parallel Hypothesis Debugging (Agent Teams)
For complex bugs (open >1h, unclear root cause), spawn teammates to investigate competing hypotheses:
Common Rationalizations
| Excuse | Why It's Wrong | |
|---|---|---|
| "It works on my machine" | Environment differences are the #1 cause of production bugs — reproduce in prod-like env | |
| "It must be a library bug" | 95% of the time it's your code — exhaust local hypotheses first | |
| "I'll just add more logging and wait" | Passive debugging wastes hours — form a hypothesis and test it actively | |
| "The error message says X, so it must be X" | Error messages often describe symptoms, not root causes — trace the full chain | |
| "It only happens sometimes, probably a fluke" | Intermittent bugs are race conditions or state leaks — they get worse, not better |
Debug Checklist
- [ ] Identified error/symptom
- [ ] Checked relevant logs
- [ ] Verified service health
- [ ] Recorded the original command or user action, fixture and symptom
- [ ] Formed hypothesis
- [ ] Reran the original scenario and the regression test; recorded failures / attempts for intermittent cases
Rules
- MUST form a testable hypothesis before changing code
- NEVER apply fixes without first reproducing the symptom
- CRITICAL: trace from symptom to root cause — do not stop at the first plausible explanation
- For intermittent cases, preserve a deterministic reproduction when one is available and report the measured failure counts.
- MUST finish collecting evidence (logs, health, recent diff, error-parser output) before forming the hypothesis — an investigation that halts at the first error found reports what the user already saw and misses the one they did not
Gotchas
docker compose logswith no--sinceshows logs from the current container lifecycle plus anything buffered. After a restart you may read stale logs that look like the current error. Always filter:docker compose logs --since 5m.tail -fstops emitting after a log rotation unless you pass-F(GNU) or--follow=name— the file descriptor points at the renamed inode. On rotated logs, always use-F.curl -f <url>exits non-zero on 4xx/5xx but discards the response body — you lose the exact error. Debug withcurl -s -o /tmp/body -w 'HTTP %{http_code}\n'and then inspect/tmp/body.- Stack traces from uvicorn/gunicorn/WSGI show framework frames first; the first few frames are almost always irrelevant. Scroll past framework internals and find the first frame inside your own package.
- A 500 with "Internal Server Error" and no body usually means the error happened before the logger was initialized — check service start-up logs, not request logs.
When NOT to Use
- For triaging an unreported bug without a known symptom — use
/triage-issueinstead - For writing a fix once the cause is already known — use
/fix - For performance-specific investigation — use
/performance-profilingor/analyze --type=complexity - For a live production incident — use
/workflow incident-response(coordinated response)
Related Skills
- Bug fixed? →
/reviewto verify the fix quality - Need a regression test? →
/tddto write it test-first - Performance issue? →
/analyze --type=complexityfor hotspot analysis - Incident in production? →
/workflow incident-responsefor full response
Security
- Security scanPassed, 100 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 repositoryCheckingapp/skills/debug/SKILL.md
Popularity
- Repository stars
- 162
- Repository forks
- 21
- Repository npm downloads, 7 days
- 1,403
- 7-day trend score
- 43
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 4 Oct 2026, a month ago.
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/softspark/ai-toolkit/debug)