# Debug

> Debug is an open-source agent skill for developer tools. Guides an agent through a disciplined loop for diagnosing hard bugs and slow regressions. 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/evist0/okf-matt-skills/tree/main/debug
- **Repository:** https://github.com/evist0/okf-matt-skills
- **GitHub stars:** 18
- **License:** MIT
- **Skill name:** debug
- **Collection:** https://github.com/evist0/okf-matt-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill gives the agent a structured six-phase method for tracking down difficult bugs and performance regressions. Its central idea is to first build a fast, deterministic pass/fail signal that reproduces the user's exact symptom, then minimise that reproduction before forming and testing ranked hypotheses. The workflow covers ten ways to construct a feedback loop, from failing tests and curl scripts to differential runs and a bash template for human-in-the-loop steps.

Beyond the diagnosis itself, the skill sets rules for instrumentation: one variable at a time, debug logs tagged with a unique prefix so they can be removed with a single search, and a separate measure-first path for performance problems. It also covers the fix and cleanup, including writing a regression test only where a realistic seam exists and checking for leftover instrumentation before finishing.

The skill expects a codebase that can be run locally and, where present, reads an OKF knowledge bundle and architecture decision records before touching code. It recommends follow-up steps such as reconciling durable knowledge after a fix and handing structural problems to a separate architecture skill. Its helper is a bash script template for loops that need a person to act.

## When your agent uses it

> Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

## What it can access

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

- [Runs shell scripts](https://github.com/evist0/okf-matt-skills/tree/HEAD/debug)
- [No network calls found in its scripts](https://github.com/evist0/okf-matt-skills/tree/HEAD/debug)
- [License: MIT](https://github.com/evist0/okf-matt-skills/tree/HEAD/debug)

## Features

- **Feedback loop construction:** Ten ordered strategies for building a pass/fail signal, from failing tests to differential runs and captured traces.
- **Loop tightening guidance:** Advice on making a debugging loop faster, sharper and more deterministic before investigating causes.
- **Minimal reproduction:** Steps to shrink a failing scenario until every remaining element is required for the failure.
- **Falsifiable hypotheses:** Requires ranked, testable hypotheses with stated predictions before any change is tested.
- **Tagged instrumentation:** Tags debug logs with a unique prefix and changes one variable per probe to keep cleanup simple.
- **Performance baseline path:** Measures timing and query plans first, then bisects, instead of relying on logs for slowdowns.
- **Regression test and cleanup:** Writes a failing test at a realistic seam, verifies the fix, and checks that debug code is removed.

## Good for

- Diagnose why a checkout flow throws an error intermittently
- Find the commit that made an API endpoint slower
- Build a repeatable script that reproduces a failing test case
- Track down a race condition by raising its reproduction rate
- Write a regression test after fixing a bug in a service

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/debug` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/evist0/okf-matt-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/debug &&
cp -R "$tmp/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/evist0/okf-matt-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/debug &&
cp -R "$tmp/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/evist0/okf-matt-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/debug &&
cp -R "$tmp/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/evist0/okf-matt-skills.git --path 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/evist0/okf-matt-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/debug &&
cp -R "$tmp/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/evist0/okf-matt-skills.git
```

Then copy `okf-matt-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 triggers when the user says "diagnose" or "debug this", or reports something broken, throwing, failing or slow.

### Does Debug change my code automatically?

It guides the agent through a debugging method that includes instrumenting code, writing a regression test and making a fix, with cleanup steps before finishing.

### What does Debug need from the project?

A runnable environment for building a feedback loop. It reads an OKF knowledge bundle and ADRs when they exist in the project.

### Is Debug free to use?

The repository is released under the MIT license.

### 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.

### Does Debug run scripts?

Yes. It runs shell scripts. No network calls were found in its 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, 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 Debug?

The closest alternatives to Debug are Diagnosing bugs, Diagnose loop, Debug issue, Debug hypothesis and Debug.

## Where this comes from

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

## Alternatives

- [Diagnosing bugs](https://ai-powered.com/skills/diagnosing-bugs): Diagnosing bugs is an open-source agent skill for developer tools.
- [Diagnose loop](https://ai-powered.com/skills/diagnose-loop): Diagnose loop is an open-source agent skill for developer tools.
- [Debug issue](https://ai-powered.com/skills/debug-issue): Debug issue 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.
- [Debug](https://ai-powered.com/skills/debug-tansuasici): Debug is an open-source agent skill for developer tools.
- [Systematic Debugging](https://ai-powered.com/skills/systematic-debugging-joaoariedi): Systematic Debugging is an open-source agent skill for developer tools.
- [Debugging](https://ai-powered.com/skills/debugging): Debugging 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.

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