install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/debug" ~/.claude/skills/comeonoliver-skillshub-debug && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/debug/SKILL.mdsource content
dot-skills Debugging Best Practices
Comprehensive debugging methodology guide for software engineers, containing 54 rules across 10 categories prioritized by impact. Based on research from Andreas Zeller's "Why Programs Fail" and academic debugging curricula.
When to Apply
Reference these guidelines when:
- Investigating a bug or unexpected behavior
- Debugging code during development
- Code produces wrong results or crashes
- Performance issues need root cause analysis
- Triaging incoming bug reports and prioritizing fixes
- Conducting root cause analysis for incidents
- Reviewing debugging approaches or code for common bug patterns
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Problem Definition | CRITICAL | |
| 2 | Hypothesis-Driven Search | CRITICAL | |
| 3 | Observation Techniques | HIGH | |
| 4 | Root Cause Analysis | HIGH | |
| 5 | Tool Mastery | MEDIUM-HIGH | |
| 6 | Bug Triage and Classification | MEDIUM | |
| 7 | Common Bug Patterns | MEDIUM | |
| 8 | Fix Verification | MEDIUM | |
| 9 | Anti-Patterns | MEDIUM | |
| 10 | Prevention & Learning | LOW-MEDIUM | |
Quick Reference
1. Problem Definition (CRITICAL)
- Reproduce the bug before investigatingprob-reproduce-before-debug
- Create minimal reproduction casesprob-minimal-reproduction
- Document symptoms preciselyprob-document-symptoms
- Separate symptoms from causesprob-separate-symptoms-causes
- State expected vs actual behaviorprob-state-expected-actual
- Check recent changes firstprob-recent-changes
2. Hypothesis-Driven Search (CRITICAL)
- Apply the scientific methodhypo-scientific-method
- Use binary search to localize bugshypo-binary-search
- Test one hypothesis at a timehypo-one-change-at-time
- Find WHERE before asking WHAThypo-where-not-what
- Rule out obvious causes firsthypo-rule-out-obvious
- Explain the problem aloudhypo-rubber-duck
3. Observation Techniques (HIGH)
- Use strategic loggingobs-strategic-logging
- Log function inputs and outputsobs-log-inputs-outputs
- Use breakpoints strategicallyobs-breakpoint-strategy
- Read stack traces bottom to topobs-stack-trace-reading
- Use watch expressions for stateobs-watch-expressions
- Trace data flow through systemobs-trace-data-flow
4. Root Cause Analysis (HIGH)
- Use the 5 Whys techniquerca-five-whys
- Trace fault propagation chainsrca-fault-propagation
- Find the last known good staterca-last-known-good
- Question your assumptionsrca-question-assumptions
- Examine system boundariesrca-examine-boundaries
5. Tool Mastery (MEDIUM-HIGH)
- Use conditional breakpointstool-conditional-breakpoints
- Use logpoints instead of modifying codetool-logpoints
- Master step over/into/outtool-step-commands
- Navigate the call stacktool-call-stack-navigation
- Inspect memory and object statetool-memory-inspection
- Use exception breakpointstool-exception-breakpoints
6. Bug Triage and Classification (MEDIUM)
- Separate severity from prioritytriage-severity-vs-priority
- Assess user impact before prioritizingtriage-user-impact-assessment
- Factor reproducibility into triagetriage-reproducibility-matters
- Identify and ship quick wins firsttriage-quick-wins-first
- Detect and link duplicate bug reportstriage-duplicate-detection
7. Common Bug Patterns (MEDIUM)
- Recognize null pointer patternspattern-null-pointer
- Spot off-by-one errorspattern-off-by-one
- Identify race condition symptomspattern-race-condition
- Detect memory leak patternspattern-memory-leak
- Watch for type coercion bugspattern-type-coercion
- Catch async/await error handling mistakespattern-async-await-errors
- Recognize timezone and date bugspattern-timezone-issues
8. Fix Verification (MEDIUM)
- Verify with original reproductionverify-reproduce-fix
- Check for regressionsverify-regression-check
- Understand why fix worksverify-understand-why-fix-works
- Add test to prevent recurrenceverify-add-test
9. Anti-Patterns (MEDIUM)
- Avoid shotgun debugginganti-shotgun-debugging
- Avoid quick patches without understandinganti-quick-patch
- Avoid tunnel vision on initial hypothesisanti-tunnel-vision
- Recognize debugging fatigueanti-debug-fatigue
- Don't blame the tool too quicklyanti-blame-tool
10. Prevention & Learning (LOW-MEDIUM)
- Document bug solutionsprev-document-solution
- Conduct blameless postmortemsprev-postmortem
- Add defensive code at boundariesprev-defensive-coding
- Improve error messagesprev-improve-error-messages
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
- Example rules: prob-reproduce-before-debug, hypo-binary-search
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md