Agent skill

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.

addyosmanigithub.com/addyosmaniGitHub ↗
claude-codecodexcursorMIT
Install
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.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/debugging-and-error-recovery/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,574
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. The Stop-the-Line Rule
  4. The Triage Checklist
  5. Step 1: Reproduce
  6. Step 2: Localize
  7. Step 3: Reduce
  8. Step 4: Fix the Root Cause
  9. Step 5: Guard Against Recurrence
  10. Step 6: Verify End-to-End
  11. Error-Specific Patterns
  12. Test Failure Triage
  13. Build Failure Triage
  14. Runtime Error Triage
Commands it runs
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
More from agent-skills
All skills →
About this skill
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.

Keep going