dragonked2/alphacode/debug
Claude Code and agent skill by dragonked2/alphacode
- community
Checking that the SKILL.md file is still in the repository.
Expert debugging methodology — systematic error diagnosis, root cause analysis, logging strategies, debugging tools, and problem-solving techniques that find bugs fast instead of guessing.
Install
npx vskill@latest install dragonked2/alphacode/debugSKILL.md
Debug — AlphaCode Edition
You are a detective investigating a crime scene. The bug is the crime. Your job is to find evidence, follow leads, and identify the root cause — not guess, not blame, not spray-and-pray fixes.
Core Principles
- Reproduce first — if you can't reproduce it, you can't fix it
- Read the error message — the answer is usually right there
- Change one thing at a time — scientific method, not shotgun debugging
- Use tools, not intuition — profilers, debuggers, logs, traces
- Fix the root cause, not the symptom — band-aids create more bugs
1. The Debugging Methodology
Step 1: Understand the Bug
Step 2: Gather Evidence
Step 3: Form a Hypothesis
- What could cause this specific behavior?
- What changed recently that could trigger it?
- What conditions must be true for this to happen?
Step 4: Test the Hypothesis
- Add logging/print statements at suspected locations
- Use debugger to step through code
- Change one variable and observe the result
Step 5: Fix and Verify
- Apply the minimal fix that addresses the root cause
- Verify the fix works
- Verify no regressions
- Add a test to prevent recurrence
2. Common Error Patterns
Null/Undefined Reference
Diagnosis: Something that should exist doesn't. Fix chain:
- Check where the variable comes from
- Check if the data source returns the expected shape
- Add null checks or default values
- Fix the upstream issue that returns null
Connection Errors
Diagnosis: Can't reach the service. Check list:
- Is the service running?
systemctl status <service>ordocker ps - Is the port correct?
netstat -tlnp | grep <port> - Is the hostname/IP correct?
ping <host> - Is there a firewall?
iptables -Lorufw status - Is the service listening on the right interface?
0.0.0.0vs127.0.0.1
Timeout Errors
Diagnosis: Request took too long. Check list:
- Is the server overloaded? Check CPU, memory, connections
- Is the query slow?
EXPLAIN ANALYZEthe database query - Is there network latency?
pingandtraceroute - Is the timeout too short? Increase and test
- Is there a deadlock? Check database locks
Memory Errors
Diagnosis: Ran out of RAM. Check list:
- Is there a memory leak? Check if memory grows over time
- Is the dataset too large? Paginate or stream
- Are large objects retained in memory? Use weak references
- Is there a circular reference preventing garbage collection?
3. Language-Specific Debugging
Rust
JavaScript/TypeScript
Python
Go
4. Logging Strategy
Log Levels
Structured Logging
What to Log
- Errors: Full stack trace, context variables, request ID
- Requests: Method, path, status code, duration
- Business events: User signup, payment, export
- Performance: Query duration, cache hit/miss, external API calls
What NOT to Log
- ❌ Passwords, API keys, tokens
- ❌ Full request/response bodies (may contain PII)
- ❌ Sensitive user data (SSN, credit card numbers)
- ❌ Logging in hot loops (kills performance)
5. Debugging Tools
Network Debugging
Process Debugging
Database Debugging
6. Preventing Future Bugs
Add Regression Tests
Add Defensive Checks
Add Monitoring
7. Debugging Checklist
When you find a bug:
- [ ] Can you reproduce it consistently?
- [ ] Have you identified the root cause (not just the symptom)?
- [ ] Is the fix minimal and targeted?
- [ ] Does the fix handle edge cases?
- [ ] Have you verified no regressions?
- [ ] Have you added a test to prevent recurrence?
- [ ] Have you checked for the same pattern elsewhere in the codebase?
- [ ] Have you documented the fix (commit message, PR description)?
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/alphacode_base/bundled_skills/debug/SKILL.md
Popularity
- 7-day trend score
- 0
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/dragonked2/alphacode/debug)