debugging
Debug via reproduce, minimize, observe, hypothesis, instrument, fix, regression-test. Never change random code and hope.
SKILL.mdskills/core/debugging/SKILL.md
GitHubdebugging
Prove the cause before the fix: reproduce → minimize → hypothesize → instrument → fix → regression-test.
Activate when
- Failing tests, broken builds, wrong runtime behavior, production incidents under investigation.
Do NOT activate for
- Code archaeology without a defect (see git/git-history-analysis).
Procedure
- Reproduce reliably with a script or exact steps; no repro, no fix — only investigation.
- Minimize: cut inputs, scope, and concurrency until the smallest failing case remains.
- Hypothesize one cause at a time; instrument (logs, traces, debugger, bisect) to confirm or kill each hypothesis. Stop-the-line on data-loss/corruption paths.
- Fix the root cause, not the symptom; add the regression test that fails without the fix.
- Guard: check adjacent code for the same defect class; record the RCA briefly.
- Verify: repro passes, full related suite green, regression test committed.