Skip to content
Skill

Bug

Guides the agent to reproduce a reported bug with a failing test before fixing it

Bug is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
19
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Bug

This skill walks an AI coding agent through fixing a concrete defect. It starts from a user-supplied reproducer, has the agent write a failing test that captures the bug, and only then changes code until that test passes. The test is kept afterward as a regression guard, and the agent is told not to weaken the test to make it pass.

The workflow asks the agent to read the failing code path and trace it with the project's structural code queries before editing, rather than guessing at the cause. Progress is tracked through the stages reported, reproduced, fixing and verified, and test runs are recorded against the full test node id. Durable changes are meant to be gated behind a human preview and approval.

The skill expects a reproducer or bug report from the user and a project where the mokata tooling is available. It is part of the mokata project, which also ships a matching /mokata:bug command, and it is packaged as a Claude Code plugin.

When your agent uses it

mokata · Start from a reproducer and a failing test, then fix.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (7 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 mokata plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/bug &&
cp -R "$tmp/src/mokata/skills/bug" ~/.claude/skills/bug &&
rm -rf "$tmp"

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

Claude Code docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/bug &&
cp -R "$tmp/src/mokata/skills/bug" ~/.agents/skills/bug &&
rm -rf "$tmp"

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

Codex docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/bug &&
cp -R "$tmp/src/mokata/skills/bug" ~/.cursor/skills/bug &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/bug inside it instead.

Cursor docs on skills

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

gemini skills install https://github.com/JasGujral/mokata-oss.git --path src/mokata/skills/bug

Or copy the folder to ~/.gemini/skills/bug yourself.

Gemini CLI docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/bug &&
cp -R "$tmp/src/mokata/skills/bug" ~/.copilot/skills/bug &&
rm -rf "$tmp"

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

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/JasGujral/mokata-oss.git

Then copy mokata-oss/src/mokata/skills/bug into your agent's skills folder as bug. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Reproducer first workflow
Requires a concrete reproducer and a failing test before any fix is made.
Root cause tracing
Directs the agent to read the failing path and trace callers and callees before changing code.
Regression test retention
Keeps the failing test in place as a guard against the bug returning.
Progress and test recording
Tracks the bug through reported, reproduced, fixing and verified stages with per-test run records.
Scope discipline
Limits changes to the reported bug and avoids altering unrelated behaviour.

Good for

  • Fix a bug from a user's report that includes steps to reproduce
  • Turn a known failing behaviour into a regression test and then a fix
  • Investigate a crash by tracing the failing code path before editing
  • Add a guarding test for a defect that was already fixed by hand

Bug FAQ

Does Bug need a reproducer to run?

Yes. The skill says it should not engage without a reproducer to start from, and a failing test must exist before any fix.

Can the agent change the test to make Bug pass?

No. The skill instructs the agent to fix the code and keep the test unchanged in intent, not weaken it to go green.

Which clients does Bug work with?

It is published as a Claude Code plugin through a plugin marketplace, so its listed platform support follows the shared agent skills format.

How do I install Bug in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/bug to use it in all your projects, or to .claude/skills/bug in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

Does Bug 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 Bug?

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

The closest alternatives to Bug are Debug, Bug fix, TDD, Reproduce bug and Bug reproduction brief.

Where this comes from

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

More from JasGujral/mokata-oss

  1. Makes the agent design API contracts first and check callers before changing them

    • Open source
    • 19 GitHub stars
    • Developer tools
  2. Gives an agent NestJS rules for guards, DTO validation, modules and tests

    • Open source
    • 19 GitHub stars
    • Developer tools
  3. Guides an agent through Socratic exploration of an approach before any spec or code

    • Open source
    • 19 GitHub stars
    • Developer tools
  4. Guides an agent to capture live browser console, network and page state for tests

    • Open source
    • 19 GitHub stars
    • Developer tools
  5. Guides an agent on CI/CD pipelines, release builds and pinned supply-chain posture

    • Open source
    • 19 GitHub stars
    • Developer tools
  6. Reproduces a failure, captures it in a failing test, then applies a minimal fix

    • Open source
    • 19 GitHub stars
    • Developer tools