# Debug

> Debug is an open-source agent skill for developer tools. Guides the agent through root-cause debugging with reproduction, hypotheses. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/tansuasici/claude-code-kit/tree/main/.claude/skills/debug
- **Repository:** https://github.com/tansuasici/claude-code-kit
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** debug
- **Collection:** https://github.com/tansuasici/claude-code-kit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through a structured debugging session for bugs, failing tests, crashes and unexpected behavior. It requires a reliable reproduction before any investigation, then asks the agent to form a small set of ranked hypotheses and test them one at a time, recording evidence for each. A root cause must be written down and must explain every observed symptom before any change is made.

The fix phase is deliberately constrained: one focused change per commit, a check for the same pattern elsewhere, and a full test run. The skill also includes a stop rule for cases where two fixes have already failed against the same reproduction, requiring the agent to test the shared assumption before attempting a third fix. A regression test that fails without the fix and passes with it is part of the expected output, and the skill ends with a standard debug report template.

The skill references a language-specific error-patterns file that is loaded only when an error message matches one of its categories. It mentions a loop-detection hook in the wider kit, which is a separate component. Nothing in the content indicates that it requires particular languages or external services beyond git for checking recent changes.

## When your agent uses it

> Systematic root-cause debugging with evidence-before-fix enforcement and regression-test generation. Use when chasing a bug, failing test, error, crash, or unexpected behavior — before attempting a fix.

## What it can access

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

- [Instructions only, no scripts](https://github.com/tansuasici/claude-code-kit/tree/HEAD/.claude/skills/debug)
- [License: MIT](https://github.com/tansuasici/claude-code-kit/tree/HEAD/.claude/skills/debug)

## Features

- **Reproduce before fixing:** Establishes a reliable reproduction of the symptom, the trigger and whether the failure is intermittent.
- **Ranked hypothesis testing:** Forms two or three hypotheses and checks them one at a time, gathering evidence for each.
- **Root cause documentation:** Requires a written root cause covering what, where, why, when and the evidence behind it.
- **Failed-fix stop rule:** After two failed fixes for the same bug, the agent must test the shared premise before trying again.
- **Regression test generation:** Guides writing a test that fails without the fix, passes with it and covers an edge case.
- **Debug report template:** Provides a markdown report format covering symptom, investigation, root cause, fix and related issues.

## Good for

- Track down why a test started failing after recent changes
- Find the root cause of a crash before patching it
- Investigate an intermittent bug and add instrumentation to gather data
- Write a regression test for a bug that was just fixed
- Produce a structured debug report for a reported issue

## Install

### Claude Code

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

```sh
/plugin marketplace add tansuasici/claude-code-kit
/plugin install claude-code-kit@claude-code-kit
```

Or copy only this skill to `~/.claude/skills/debug`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/debug &&
cp -R "$tmp/.claude/skills/debug" ~/.claude/skills/debug &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/debug` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/debug` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/debug &&
cp -R "$tmp/.claude/skills/debug" ~/.agents/skills/debug &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/debug` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/debug` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/debug &&
cp -R "$tmp/.claude/skills/debug" ~/.cursor/skills/debug &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/debug` 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/tansuasici/claude-code-kit.git --path .claude/skills/debug
```

Or copy the folder to `~/.gemini/skills/debug` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/debug`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/debug &&
cp -R "$tmp/.claude/skills/debug" ~/.copilot/skills/debug &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/debug` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git
```

Then copy `claude-code-kit/.claude/skills/debug` into your agent's skills folder as `debug`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Debug trigger?

It is meant for chasing a bug, failing test, error, crash or unexpected behavior, before attempting a fix. It can also be invoked directly with /debug.

### What does Debug change in the code?

The skill instructs the agent to investigate without changing code, then make one focused fix per commit and add a regression test. It does not include scripts of its own.

### Does Debug include scripts or extra files?

The folder contains the SKILL.md plus a reference file of error patterns that is loaded only when an error message matches a listed category.

### What happens if the bug cannot be reproduced?

The skill says not to guess at fixes and instead to add logging or instrumentation to gather more data.

### How do I install Debug in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/debug to use it in all your projects, or to .claude/skills/debug in one project. Or install the claude-code-kit plugin, which includes it: /plugin marketplace add tansuasici/claude-code-kit, then /plugin install claude-code-kit@claude-code-kit.

### Does Debug 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 Debug?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Debug?

The closest alternatives to Debug are Debug hypothesis, Diagnostic reasoning, Debug, Principle fix root causes and Bug fix.

## Where this comes from

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

## Alternatives

- [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.
- [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.
- [Bug fix](https://ai-powered.com/skills/bug-fix): Bug fix 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.
- [Debugging and error recovery](https://ai-powered.com/skills/debugging-and-error-recovery): Debugging and error recovery is an open-source agent skill for developer tools.
- [Interactive debugging](https://ai-powered.com/skills/interactive-debugging): Interactive debugging is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/debug-tansuasici
