
Debug
Reproduces a failure, captures it in a failing test, then applies a minimal fix
Debug is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 19
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Debug
This skill guides an agent through root-causing a failure, error, crash or unexpected behaviour before any code is changed. The agent is asked to reproduce the problem first, record it as a failing test, and then trace the real code path to a cause rather than guessing at one.
The workflow is built around a gate: no fix is applied until the failure is reproduced and its root cause identified. The skill asks the agent to use structural code queries such as callers, callees and definitions to walk the failing path, and to read the source lines those queries point to. It also tracks repeated failed fix attempts and, after three at the same failure, stops and asks for a new approach instead of trying further guesses.
The skill is part of the mokata project and is written for Claude Code, relying on mokata's command-line tools for queries, progress tracking and approvals. It expects a codebase the agent can read and a test suite it can run to capture the reproduced failure.
When your agent uses it
mokata · Reproduce first, capture in 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 (9 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@mostackOr copy only this skill to ~/.claude/skills/debug:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/debug &&
cp -R "$tmp/src/mokata/skills/debug" ~/.claude/skills/debug &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/debug inside it instead.
Copy the skill folder to ~/.agents/skills/debug 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/debug &&
cp -R "$tmp/src/mokata/skills/debug" ~/.agents/skills/debug &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/debug inside it instead.
Copy the skill folder to ~/.cursor/skills/debug 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/debug &&
cp -R "$tmp/src/mokata/skills/debug" ~/.cursor/skills/debug &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/debug inside it instead.
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/debugOr copy the folder to ~/.gemini/skills/debug yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/debug:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/debug &&
cp -R "$tmp/src/mokata/skills/debug" ~/.copilot/skills/debug &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/debug inside it instead.
Get the folder:
git clone --depth 1 https://github.com/JasGujral/mokata-oss.gitThen copy mokata-oss/src/mokata/skills/debug into your agent's skills folder as debug. Agents that support SKILL.md read one folder per skill.
What it does
- Reproduce before fixing
- Requires the failure to be reproduced and captured in a failing test before any change is made.
- Root-cause tracing
- Walks the failing path through callers and callees, then reads the matching source before forming a conclusion.
- Minimal fix scope
- Limits changes to the reproduced failure rather than widening the edit to unrelated code.
- Fix attempt breaker
- Counts failed fix attempts at the same failure and halts after three to force a new approach.
- Regression guard
- Keeps the captured failing test in place afterwards so the bug stays covered.
Good for
- Find why a function throws an error in production
- Track down the cause of a crash in a service
- Investigate behaviour that differs from what the user expects
- Fix a failing test without weakening its assertions
Debug FAQ
When does Debug trigger?
It engages when a failure, error, crash or unexpected behaviour needs root-causing, or when the user reports something broken and asks why. It does not apply to adding new features.
What does the agent need to use Debug?
The skill expects a reproducer it can build into a failing test, and it relies on mokata's command-line tools for code queries and progress tracking.
Does Debug change the code by itself?
It asks the agent to make only a minimal fix for the reproduced failure, and durable writes are human-gated through mokata's approval flow.
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 mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.
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 Bug, Principle fix root causes, Bug fix, TDD and Develop.
Where this comes from
- Description: from the skill's own SKILL.md.
More from JasGujral/mokata-oss

Makes the agent design API contracts first and check callers before changing them
- Open source
- 19 GitHub stars
- Developer tools

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

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

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

Guides the agent to reproduce a reported bug with a failing test before fixing it
- Open source
- 19 GitHub stars
- Developer tools

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



