
Bug fix
Walks an agent through diagnosing, proving and fixing a reported bug with a regression
Bug fix is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- Python
- Platforms
- Claude Code
- GitHub stars
- 6
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Bug fix
This skill gives the agent a staged lifecycle for reported defects: it records the bug, forms several competing hypotheses, establishes a root cause, checks whether the bug still reproduces on fresh main, and writes a regression test that must fail before the fix and pass after. A bundled Python helper (bug.py) manages the bug record and enforces these checks, so the agent cannot skip to a patch without the evidence.
The workflow can stop once the root cause is recorded, or continue through the fix and review passes to completion. It also sorts work by size: trivial one-liners are sent to a separate test-driven loop, while cross-layer or security-relevant bugs get the full set of gates. Bugs that turn out to be missing behaviour can be escalated into a spec.
It expects a Python 3 environment and a git repository with an origin/main branch, and uses a project test command or auto-detected test runner for the red-to-green check. Review passes rely on other reviewer skills when they are installed.
When your agent uses it
Drive the teeth-gated lifecycle for reported defects: diagnose root cause, prove it, and prevent regression through REPORTED → DIAGNOSING → ROOT_CAUSED → FIXING → REVIEWED → DONE, with VERIFIED, ESCALATED, and RESOLVED_ON_MAIN paths where needed. Auto-fires on fix this bug, debug this, root-cause this, this regressed, this broke again, why is this failing, diagnose before fixing, or investigate this failure. Two modes: `diagnose` stops at ROOT_CAUSED; `diagnose_and_fix` runs through DONE. Uses a durable bug record, multiple hypotheses, a fresh-main recheck, and a witnessed red→green test. Do not use for spec-shaped work (use `spec-workflow`) — including a pure visual design-fidelity gap against an agreed mockup, which is spec-shaped, not a bug (see "Design-fidelity triage" below) — or trivial one-liners (use `tdd-loop`).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Runs Python scripts(see the files on GitHub)
- Network calls found in its scripts(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 2 files (83 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the jig plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add ramboz/jig
/plugin install jig@jigOr copy only this skill to ~/.claude/skills/bug-fix:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ramboz/jig.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/bug-fix &&
cp -R "$tmp/hosts/claude/skills/bug-fix" ~/.claude/skills/bug-fix &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/bug-fix inside it instead.
Copy the skill folder to ~/.agents/skills/bug-fix to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ramboz/jig.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/bug-fix &&
cp -R "$tmp/hosts/claude/skills/bug-fix" ~/.agents/skills/bug-fix &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/bug-fix inside it instead.
Copy the skill folder to ~/.cursor/skills/bug-fix to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ramboz/jig.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/bug-fix &&
cp -R "$tmp/hosts/claude/skills/bug-fix" ~/.cursor/skills/bug-fix &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/bug-fix inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/ramboz/jig.git --path hosts/claude/skills/bug-fixOr copy the folder to ~/.gemini/skills/bug-fix yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/bug-fix:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ramboz/jig.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/bug-fix &&
cp -R "$tmp/hosts/claude/skills/bug-fix" ~/.copilot/skills/bug-fix &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/bug-fix inside it instead.
Get the folder:
git clone --depth 1 https://github.com/ramboz/jig.gitThen copy jig/hosts/claude/skills/bug-fix into your agent's skills folder as bug-fix. Agents that support SKILL.md read one folder per skill.
What it does
- Staged bug lifecycle
- Moves a defect through recorded states from report to done, with named back-edges for failed reviews.
- Root-cause diagnosis
- Requires multiple candidate hypotheses and a leading explanation before a root cause is accepted.
- Fresh-main recheck
- Confirms the bug still reproduces on origin/main so duplicate fixes are avoided.
- Red-to-green regression test
- Machine-checks that a regression test fails before the fix and passes after it.
- Repository closure inventory
- Asks for a recorded search of existing helpers and call sites before the fix is written.
- Proportional triage
- Routes trivial fixes away from the record and gates, keeping heavier rigor for complex bugs.
Good for
- Diagnose why a login test started failing after a recent change
- Find the root cause of a regression before deciding on a fix
- Fix a reported crash and add a test that proves it stays fixed
- Decide whether a reported defect is really a missing feature needing a spec
- Investigate an intermittent failure and record the evidence for each hypothesis
Bug fix FAQ
What does the skill need to run?
It uses a Python 3 helper script and a git repository. The regression test is run through a test command, which can be set in a .jig/test-command file for stacks that are not auto-detected.
When does Bug fix trigger?
It is meant for requests such as fix this bug, debug this, root-cause this, this regressed, or why is this failing. Feature work and trivial one-line changes are routed to other workflows.
Does Bug fix change my code without asking?
Its two modes differ: diagnose stops at the recorded root cause, while diagnose_and_fix continues through the fix and review steps.
Can I skip the checks?
Each gate can be bypassed with a specific environment variable, which the instructions describe as a deliberate escape rather than the default.
How do I install Bug fix in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/bug-fix to use it in all your projects, or to .claude/skills/bug-fix in one project. Or install the jig plugin, which includes it: /plugin marketplace add ramboz/jig, then /plugin install jig@jig.
Does Bug fix run scripts?
Yes. It runs Python scripts. Its scripts contain network calls. 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 Bug fix?
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 Bug fix?
The closest alternatives to Bug fix are Bug, Debug, Principle fix root causes, Patching bugs and TDD.
Where this comes from
- Description: from the skill's own SKILL.md.
More from ramboz/jig

Runs a six-category ambiguity audit on a spec and asks up to five questions
- Open source
- 6 GitHub stars
- Developer tools

Runs a static lint pass on Python or Node projects and reports normalized findings
- Open source
- 6 GitHub stars
- Developer tools

Recommends the right contract artifact and validator for each external API surface
- Open source
- 6 GitHub stars
- Developer tools

Builds a standardized prompt for a fresh reviewer subagent to check work against its spec
- Open source
- 6 GitHub stars
- Developer tools

Persists session terms, learnings and lightweight decisions into a project memory layer
- Open source
- 6 GitHub stars
- Knowledge and memory

Inventories an existing spec-driven project and migrates it to jig's conventions
- Open source
- 6 GitHub stars
- Developer tools




