debugginglisted
Install: claude install-skill stuartshields/claude-setup
<!-- Last updated: 2026-04-08T00:00+11:00 -->
# Debugging & Investigation
## 4-Step Framework: Reproduce → Isolate → Fix → Validate
- **Never skip to Fix.** Most wrong fixes come from jumping straight to code changes.
- **Reproduce:** Run the faulty scenario. Note the exact error and conditions.
- **Isolate:** Narrow down the failing component. 80% of bugs live in recently modified code — start there. **Compare against working code.** Find similar functionality that works and diff against the broken code.
- **Validate:** Run the full test suite. Confirm the error is gone AND no regressions introduced.
## Validate Before Fixing
- **Confirm root cause before proposing code changes.** One hypothesis at a time — test the most likely first.
- **Explain root cause in writing** (file path, line number, actual vs expected behavior) before proposing code changes.
- **Test means run code, not reason in your head.** Execute a command, write a failing test, or check real output.
- **Read the user's evidence first.** Study screenshots/errors before forming hypotheses. The answer is usually visible.
- **Add `console.error` to trace actual behavior** when reasoning about what code "should" do isn't working. Reading code is not observing behavior.
- **Red flag phrases.** Catch yourself saying "This should work", "Let me just try...", or "Quick fix for now" — stop and re-evaluate. You're guessing.
## Anti-Loop Protocol
- **Each attempt MUST use a different diagnosis.** If attempt 1 failed