debugging-and-error-recovery
Guides systematic root-cause debugging. Use when tests fail, builds break, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need a systematic approach to finding and fixing the root cause rather than guessing.
npx skills add addyosmani/agent-skills --skill debugging-and-error-recovery --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Debugging and Error Recovery ## Overview Systematic debugging with structured triage. When something breaks, stop adding features, preserve evidence, and follow a structured process to find and fix the root cause. Guessing wastes time. The triage checklist works for test failures, build errors, runtime bugs, and production incidents. ## When to Use - Tests fail after a code change - The build breaks - Runtime behavior doesn't match expectations - A bug report arrives - An error appears in logs or console - Something worked before and stopped working ## The Stop-the-Line Rule When anything unexpected happens: ``` 1. STOP adding features or making changes 2. PRESERVE evidence (error output, logs, repro steps) 3. DIAGNOSE using the triage checklist 4. FIX the root cause 5. GUARD against recurrence 6. RESUME only after verification passes ``` **Don't push past a failing test or broken build to work on the next feature.** Errors compound. A bug in Step 3 that goes unfixed makes Steps 4-6 wrong. ## The Triage Checklist Work through these steps in order. Do not skip steps. ### Step 1: Reproduce Make the failure happen reliably. If you can't reproduce it, you can't fix it with confidence
- Overview
- When to Use
- The Stop-the-Line Rule
- The Triage Checklist
- Step 1: Reproduce
- Step 2: Localize
- Step 3: Reduce
- Step 4: Fix the Root Cause
- Step 5: Guard Against Recurrence
- Step 6: Verify End-to-End
- Error-Specific Patterns
- Test Failure Triage
- Build Failure Triage
- Runtime Error Triage
Run the specific failing test npm test -- --grep "test name" Run with verbose output npm test -- --verbose Run in isolation (rules out test pollution) npm test -- --testPathPattern="specific-file" --runInBand Find which commit introduced the bug git bisect start git bisect bad # Current commit is broken git bisect good <known-good-sha> # This commit worked
What does the debugging-and-error-recovery skill do?
Guides systematic root-cause debugging. Use when tests fail, builds break, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need a systematic approach to finding and fixing the root cause rather than guessing.
How do I install it?
Run `npx skills add addyosmani/agent-skills --skill debugging-and-error-recovery --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From addyosmani/agent-skills, a repository with 81,574 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
