# Bugfix

> Bugfix is an open-source agent skill for developer tools. Reproduce, root-cause, fix test-first and verify a bug before shipping the change. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/duthaho/skillhub/tree/main/.claude/skills/bugfix
- **Repository:** https://github.com/duthaho/skillhub
- **GitHub stars:** 9
- **License:** MIT
- **Skill name:** bugfix
- **Collection:** https://github.com/duthaho/skillhub
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

Bugfix is a short debugging loop for an agent handling a reported failure. It insists on a deterministic reproduction that is run before any code changes, then asks the agent to rank falsifiable root-cause hypotheses and confirm one with evidence before fixing. The fix is expected to start from a failing test at the layer where the bug lives, and the original reproduction is re-run afterward as proof.

The skill also keeps a one-line-per-bug log in out/dev/bugfix-log.md, which it checks first so recurring problems in the same area are recognized. It includes guardrails against shotgun fixes, suppressing errors, and weakening tests, and it asks the agent to redact secrets from any output it shows. If the minimal fix grows into design work, the skill directs the agent to hand off to a separate feature workflow.

The skill is a single SKILL.md file with no bundled scripts. It relies on whatever test runner, shell and git tooling the project already has.

## When your agent uses it

> Lightweight bug-fixing loop — reproduce → root-cause → fix test-first → verify — deliberately separate from the heavyweight feature workflow so small fixes don't drag a spec-and-plan process behind them. Demands a deterministic reproduction before any code changes, a stated root-cause hypothesis confirmed with evidence (never a shotgun fix), a failing test that captures the bug, and the original repro re-run as proof. Keeps a one-line-per-bug log in out/dev/bugfix-log.md and checks it first, so recurring bugs get recognized instead of re-diagnosed. Use when the user reports something broken, failing, throwing, or flaky, or asks to fix a bug — e.g. "/bugfix login 500s on empty password", "fix this error", "this test is flaky", "why is X crashing". If the fix turns out to need real design work, hand off to feature; the shipping gate is done.

## What it can access

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

- [Instructions only, no scripts](https://github.com/duthaho/skillhub/tree/HEAD/.claude/skills/bugfix)
- [License: MIT](https://github.com/duthaho/skillhub/tree/HEAD/.claude/skills/bugfix)

## Features

- **Deterministic reproduction gate:** Requires a command that fails on demand to be run and its output captured before any code is changed.
- **Ranked root-cause hypotheses:** Lists falsifiable hypotheses and probes the top one with tagged debug output before changing code.
- **Test-first minimal fix:** Writes a failing test at the root-cause layer and applies the smallest change that resolves it.
- **Bug log memory:** Appends one line per bug to a log file and checks it so recurring root causes are spotted quickly.
- **Secret redaction rules:** Replaces credentials with placeholders in shown output and keeps them in environment variables.
- **Feature handoff path:** Routes fixes that need real design work to a separate feature workflow with the diagnosis attached.

## Good for

- Fix a login endpoint that returns a 500 error on empty input
- Track down why a test passes locally but fails intermittently in CI
- Diagnose a service that crashes after a recent deployment
- Find the root cause of a timezone bug and add a regression test
- Reproduce a reported error and verify the fix against the original steps

## Install

### Claude Code

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

```sh
/plugin marketplace add duthaho/skillhub
/plugin install coding-loop@skillhub
```

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

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

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

### Codex

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

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

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

### Cursor

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

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

For one project only, put the folder in `.cursor/skills/bugfix` 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/duthaho/skillhub.git --path .claude/skills/bugfix
```

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

### VS Code

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

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

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/duthaho/skillhub.git
```

Then copy `skillhub/.claude/skills/bugfix` into your agent's skills folder as `bugfix`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the skill need any scripts or extra tools installed?

No scripts are bundled. It uses the project's own test commands, shell, and git, and it notes that a git log check helps identify when a bug appeared.

### Where does the skill store its bug history?

It keeps a markdown table in out/dev/bugfix-log.md, creating the file if it does not exist, and checks it at the start of each run.

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

The skill stops, reports what was tried, asks for more information such as versions or environment details, and does not change code.

### When should I use a different workflow instead?

If the minimal fix grows into multiple files, behavior changes or design decisions, the skill says to hand off to a feature workflow using the diagnosis as input.

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

Copy the skill folder from GitHub to ~/.claude/skills/bugfix to use it in all your projects, or to .claude/skills/bugfix in one project. Or install the coding-loop plugin, which includes it: /plugin marketplace add duthaho/skillhub, then /plugin install coding-loop@skillhub.

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

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 Bugfix?

The closest alternatives to Bugfix are Fix bug, Debugging, Debug issue, Bug fix and Debug.

## Where this comes from

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

## Alternatives

- [Fix bug](https://ai-powered.com/skills/fix-bug): Fix bug 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.
- [Debug issue](https://ai-powered.com/skills/debug-issue): Debug issue 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.
- [Debug](https://ai-powered.com/skills/debug-tansuasici): Debug 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.
- [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.
- [Debug hypothesis](https://ai-powered.com/skills/debug-hypothesis): Debug hypothesis is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/bugfix
