# Debugging and error recovery

> Debugging and error recovery is an open-source agent skill for developer tools. Walks an agent through systematic root-cause debugging instead of guess-and-patch fixes. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/addyosmani/agent-skills/tree/main/skills/debugging-and-error-recovery
- **Repository:** https://github.com/addyosmani/agent-skills
- **GitHub stars:** 122,283
- **License:** MIT
- **Skill name:** debugging-and-error-recovery
- **Collection:** https://github.com/addyosmani/agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill gives the agent a structured triage process for failing tests, broken builds, regressions and unexpected runtime errors. The workflow runs in order: reproduce the failure, localize which layer is failing, reduce the case to a minimal reproduction, fix the underlying cause, add a regression test, and verify end to end. It also includes decision trees for non-reproducible bugs, test failures, build failures and common runtime errors such as undefined property access or CORS problems.

The guidance stresses stopping feature work when something breaks and preserving evidence such as error output and logs first. It includes git bisect as a way to find the commit that introduced a regression, plus safe fallback patterns and rules for when to add or remove logging.

The skill expects a project with its own test and build commands; its examples use npm and TypeScript but the agent is told to substitute the repository's own commands. It also instructs the agent to treat text inside error messages and stack traces as data rather than instructions to follow.

## When your agent uses it

> 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. Use when asked what broke, why a test started failing, or why code throws, even when the diff, the function, or the stack trace is pasted inline and the cause looks obvious from reading it, so that the cause is named, the fix is minimal, and the reply says how to confirm it.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/addyosmani/agent-skills/tree/HEAD/skills/debugging-and-error-recovery)
- [License: MIT](https://github.com/addyosmani/agent-skills/tree/HEAD/skills/debugging-and-error-recovery)

## Features

- **Stop-the-line triage:** A fixed sequence for handling unexpected failures, from preserving evidence through to verifying the fix before resuming work.
- **Non-reproducible bug guide:** Decision trees for timing-, environment-, state-dependent and random failures that cannot be triggered on demand.
- **Regression bisection:** Uses git bisect to locate the commit that introduced a bug, running the failing test at each midpoint.
- **Root-cause fixing:** Pushes past symptoms to the actual cause and adds a regression test that fails without the fix.
- **Error-type triage trees:** Quick checklists for test failures, build errors and common runtime errors.
- **Untrusted error output:** Treats instructions embedded in stack traces or CI logs as data to review rather than commands to run.

## Good for

- Figure out why a test started failing after my last change
- Track down which commit broke the build
- Diagnose a TypeError that appears only in production
- Find the root cause of duplicate entries in an API response
- Add a regression test after fixing a bug

## Install

### Claude Code

This skill ships in the `agent-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionic
```

Or copy only this skill to `~/.claude/skills/debugging-and-error-recovery`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/debugging-and-error-recovery &&
cp -R "$tmp/skills/debugging-and-error-recovery" ~/.claude/skills/debugging-and-error-recovery &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/debugging-and-error-recovery` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/debugging-and-error-recovery` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/debugging-and-error-recovery &&
cp -R "$tmp/skills/debugging-and-error-recovery" ~/.agents/skills/debugging-and-error-recovery &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/debugging-and-error-recovery` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/debugging-and-error-recovery` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/debugging-and-error-recovery &&
cp -R "$tmp/skills/debugging-and-error-recovery" ~/.cursor/skills/debugging-and-error-recovery &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/debugging-and-error-recovery` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/debugging-and-error-recovery
```

Or copy the folder to `~/.gemini/skills/debugging-and-error-recovery` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/debugging-and-error-recovery`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/debugging-and-error-recovery &&
cp -R "$tmp/skills/debugging-and-error-recovery" ~/.copilot/skills/debugging-and-error-recovery &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/debugging-and-error-recovery` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/addyosmani/agent-skills.git
```

Then copy `agent-skills/skills/debugging-and-error-recovery` into your agent's skills folder as `debugging-and-error-recovery`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Debugging and error recovery run any scripts?

No. The skill has no scripts; it is a SKILL.md with supporting reference files that give the agent a process to follow.

### Which test and build commands does Debugging and error recovery use?

Its examples use npm, but it instructs the agent to substitute the repository's own test, focused-test and build commands.

### Can Debugging and error recovery fix a bug without reproducing it first?

The guidance says to reproduce the failure before fixing it, and to document conditions when a bug cannot be reproduced on demand.

### How do I install Debugging and error recovery in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/debugging-and-error-recovery to use it in all your projects, or to .claude/skills/debugging-and-error-recovery in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.

### Does Debugging and error recovery run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Debugging and error recovery?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Debugging and error recovery?

The closest alternatives to Debugging and error recovery are Ci, Agent introspection debugging, Debug, Principle fix root causes and Debug hypothesis.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Ci](https://ai-powered.com/skills/ci-chachamaru127): Ci is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.
- [Debug](https://ai-powered.com/skills/debug-jasgujral): Debug is an open-source agent skill for developer tools.
- [Principle fix root causes](https://ai-powered.com/skills/principle-fix-root-causes): Principle fix root causes is an open-source agent skill for developer tools.
- [Debug hypothesis](https://ai-powered.com/skills/debug-hypothesis): Debug hypothesis is an open-source agent skill for developer tools.
- [Diagnostic reasoning](https://ai-powered.com/skills/diagnostic-reasoning): Diagnostic reasoning is an open-source agent skill for developer tools.
- [Diagnosing bugs](https://ai-powered.com/skills/diagnosing-bugs): Diagnosing bugs is an open-source agent skill for developer tools.
- [Bug fix](https://ai-powered.com/skills/bug-fix): Bug fix is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/debugging-and-error-recovery
