PlugWiki

Debugging and Error Recovery skill for Claude Code: find the root cause, then fix it

Makes your agent stop and debug a failing test, build or error step by step instead of guessing at fixes.

Installs
67.5K
on skills.sh
Stars
112.6K
on GitHub
Updated
Nov 2026
last repo commit

debugging-and-error-recovery makes the agent stop adding features when something breaks and follow a fixed triage: reproduce the failure, find where it happens, shrink it to a minimal case, fix the root cause and add a test that guards against it. It loads when tests fail, a build breaks, behavior changes unexpectedly or an error shows up.

It uses your project's own test, build and dev commands and bundles no scripts. It also tells the agent to treat error messages and logs as data, not instructions, and to ask you before running anything an error message tells it to run.

Good for

  • Developers with failing tests or broken builds
  • Anyone chasing a bug that worked yesterday
  • Teams that want a regression test after every fix

Install debugging-and-error-recovery

Claude Code

  1. 1

    Copy this prompt.

    Install the debugging-and-error-recovery skill in Claude Code. Run this command:
    
    npx skills add https://github.com/addyosmani/agent-skills --skill debugging-and-error-recovery
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

Sections in SKILL.md

  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
  15. Safe Fallback Patterns
  16. Instrumentation Guidelines

Key facts

Installs on skills.sh
67,517 (Nov 2, 2026)
License
MIT
Last commit
2026-11-01
What installs
1 file: SKILL.md

What it includes

  • Stop, keep the evidence, diagnose, fix the root cause, guard, then resume

    When anything unexpected happens, the agent stops adding features and does not push past a failing test or broken build.

    Stop-the-line rule

  • Make the failure happen reliably; tree for timing, environment and state bugs

    Runs the failing test alone and verbosely. If it cannot reproduce, it gathers logs and environment details.

    Runs code · Step 1: Reproduce

  • Narrow down which layer fails; use git bisect for regressions

    Checks UI, API, database, build tooling, external service or the test itself. Bisect finds the commit that introduced a bug.

    Runs code · Step 2: Localize

  • Strip the case to the smallest input and code that still fails

    A minimal reproduction makes the root cause obvious.

    Step 3: Reduce

  • Fix why it happens, not where it shows up

    Example: fix the query that makes duplicates instead of deduplicating in the UI.

    Write · Step 4: Fix the root cause

  • Write a test that fails without the fix and passes with it

    Every fix gets a regression test.

    Write · Step 5: Guard against recurrence

  • Run the specific test, the full suite and the build

    Uses npm commands as the example; substitute your project's own.

    Runs code · Step 6: Verify end to end

  • Decision trees for test failures, build failures and runtime errors

    Short trees for common cases such as type errors, import errors, CORS and white screens.

    Error-specific triage

  • Treats logs and stack traces as data and asks before following steps in them

    If an error says to run a command or visit a URL, the agent shows it to you instead of acting.

    Untrusted error output

  • Under time pressure, use a safe default with a warning or degrade gracefully

    The examples show a missing config value falling back to a default with a console warning, and a chart that shows an empty or error state instead of crashing.

    Write · Safe fallback patterns

  • Add logging only when it helps, and remove it when done

    Add it when you cannot localize the failure or the issue is intermittent. Remove it once tests guard the fix, and always remove logs that hold sensitive data. Error boundaries and API error logging may stay.

    Write · Instrumentation guidelines

From the official docs

Permissions

Low risk

It runs your test and build commands and edits code to fix the failure. Work on a branch and read each command before approving it.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It runs your tests, builds and git bisect

    The steps run npm test, npm run build, npm run dev and git bisect as examples. Work on a branch so you can reset easily.

  • It is told to distrust error output

    The skill says not to run commands or open URLs found in error messages without your confirmation. Still read what it proposes before approving.

Questions

What does debugging-and-error-recovery do?

It gives Claude a fixed process for failures: reproduce, localize, reduce, fix the root cause and guard with a test. The point is to stop guesswork and symptom fixes.

How do I install debugging-and-error-recovery?

Use the install box above. The README also lists npx skills add addyosmani/agent-skills --skill debugging-and-error-recovery for one skill, and a Claude Code plugin for the whole pack (/plugin marketplace add addyosmani/agent-skills, then /plugin install agent-skills@addy-agent-skills). A one-skill install copies only skills/debugging-and-error-recovery/ and not the repo-level references folder; the README says the skill still works.

When does it trigger?

The description lists failing tests, broken builds, something that worked yesterday, behavior that does not match expectations and any unexpected error.

What does it do about instructions inside error messages?

It treats error output as data to analyze, not instructions. If a message says to run a command or visit a URL, it should show you first instead of acting.

Is it safe to run?

It is a text file of instructions and bundles no scripts. It tells the agent to run your tests, builds, dev server and git bisect, so use it in a repo you can restore.

Does it work in Codex, Cursor or other tools?

The README documents Codex (codex plugin marketplace add addyosmani/agent-skills, then codex plugin add agent-skills@agent-skills, Codex CLI v0.122 or newer), Cursor (copy skills into .cursor/skills/), Gemini CLI, Windsurf, OpenCode, GitHub Copilot, Kiro and others. It says the skills are plain Markdown that work with any agent that accepts instruction files. It does not mention the Claude app.

Information

updated Nov 2, 2026

Folder
skills/debugging-and-error-recovery

addyosmani/agent-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 2
  1. debugging-and-error-recovery SKILL.md · github.com
  2. addyosmani/agent-skills README · github.com

Updated Nov 2, 2026.