Superpowers Systematic Debugging
christopherarter/superpowers-reasonix
Any bug, failing or flaky test, or surprise behavior?. An agent skill from christopherarter/superpowers-reasonix.
Runs a reproduce, localize, hypothesize, test, fix and verify loop to find a bug's root cause, applies the minimal fix and hands off a regression test.
$ npx skills add jsmastery-pro/skills --skill debug -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jsmastery-pro/skills debug --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jsmastery-pro/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/debug .claude/skills/debug && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "debug" agent skill from https://github.com/jsmastery-pro/skills/tree/main/skills/debug into .claude/skills/debug/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jsmastery-pro/skills/tree/main/skills/debugType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jsmastery-pro/skills --skill debug -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jsmastery-pro/skills debug --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jsmastery-pro/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/debug .agents/skills/debug && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "debug" agent skill from https://github.com/jsmastery-pro/skills/tree/main/skills/debug into .agents/skills/debug/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jsmastery-pro/skills --skill debug -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jsmastery-pro/skills debug --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jsmastery-pro/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/debug .cursor/skills/debug && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "debug" agent skill from https://github.com/jsmastery-pro/skills/tree/main/skills/debug into .cursor/skills/debug/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jsmastery-pro/skills.git --path skills/debug--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jsmastery-pro/skills --skill debug -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jsmastery-pro/skills debug --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jsmastery-pro/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/debug .gemini/skills/debug && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "debug" agent skill from https://github.com/jsmastery-pro/skills/tree/main/skills/debug into .gemini/skills/debug/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jsmastery-pro/skills debugInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jsmastery-pro/skills --skill debug -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jsmastery-pro/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/debug .github/skills/debug && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "debug" agent skill from https://github.com/jsmastery-pro/skills/tree/main/skills/debug into .github/skills/debug/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jsmastery-pro/skills --skill debug -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jsmastery-pro/skills debug --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jsmastery-pro/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/debug .opencode/skills/debug && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "debug" agent skill from https://github.com/jsmastery-pro/skills/tree/main/skills/debug into .opencode/skills/debug/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
debugRuns a reproduce, localize, hypothesize, test, fix and verify loop to find a bug's root cause, applies the minimal fix and hands off a regression test.
Invoked with `/debug`, this skill treats a bug as a case to prove. The agent reproduces it on demand, narrows it to the smallest failing surface and changes one thing at a time, testing a single hypothesis at a time and confirming or rejecting each with evidence before touching the code. It resists patching the visible symptom, such as a null or a crash, before understanding why it appears.
It acts rather than asks, questioning you only when it cannot reproduce the bug, and then for exact steps, inputs, environment and observed versus expected behavior. The result is the smallest code fix for the proven cause, plus either a recommendation to run `/test` for the regression test or a failing-then-passing test written inline. It adds no features and refactors nothing unrelated, and if the bug reflects a flawed decision it points to `/architect`. Output is written in plain, simple language without dashes.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 43b69e4. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadGrepGlobWriteEditAgentFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Root Cause Debugging loads about 1.8k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 1,020 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, Grep, Glob, Write, Edit, AgentAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jsmastery-pro/skills at commit 43b69e4, republished under its MIT licence (© jsmastery-pro). 1,020 words, ~1,778 tokens.
.claude/skills/debug/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.<!-- OUTPUT-STYLE:START -->
Write everything this skill produces, files and messages alike, in plain simple language. Talk to the reader as you, warm and direct like a colleague, and present every step as a recommendation they may run or skip, never an order. Keep technical terms that carry real meaning; explain each in plain words. Never use a dash or a hyphen as punctuation: no em dash, no en dash, and no hyphenated compounds. Write read only, not read-only. Say it in simple words, or reword the sentence. Code, file paths, command flags, and values other skills match on keep their hyphens. Use short sentences, commas, or parentheses. Clear beats clever.
<!-- OUTPUT-STYLE:END -->
Your role: the investigator who trusts evidence over intuition. Treat a bug as a case to be proven: reproduce it on demand, narrow it to the smallest failing surface, and change one thing at a time so every result means something. Resist patching what you see (the null, the crash) before you understand why it's there; a fix you can't explain is a bug you haven't caught.
A structured root cause investigation, not a guess and check. Bugs are found by a loop: reproduce → localize → hypothesize → test the hypothesis → fix the root cause → verify. This skill runs that loop with discipline (one hypothesis at a time, each confirmed or rejected by evidence) until the cause is proven, then applies the smallest fix.
This is an internal investigation loop within a single run, not the
/loopskill (which runs a command again on a time interval). Reach for/looponly when you need to watch something over time, e.g. poll a flaky test across many runs.
Acts. It reproduces, investigates, and fixes. It asks only when it cannot reproduce the bug from what it's given, then it asks for exact steps, inputs, environment, and the observed vs expected behavior. It does not ask permission to investigate.
Writes the minimal code fix for the root cause. Recommends /test for the regression test (or writes a failing then passing test inline if that's the fastest proof). Does not add features, refactor unrelated code, or rewrite the spec. If the bug reveals a flawed decision (not just a coding mistake), it says so and points to /architect rather than papering over it.
Written for any Agent Skills client on macOS, Linux, or Windows. Commands are reference, use the project's real test/run commands and your agent's own tools. The investigation can run in a subagent (below) or inline if your tool has no subagent.
Pin down precisely, before touching code:
If any of these is unclear and you can't derive it, ask, you cannot debug what you can't reproduce.
Get a deterministic reproduction (a failing test, a command, a request) that triggers the bug on demand. If it's intermittent, find what makes it deterministic (timing, ordering, data, concurrency). A bug you can't reproduce on command, you can't prove you've fixed. If you truly can't reproduce it, add instrumentation to catch it and say so, do not "fix" blind.
Narrow the failure to the smallest possible surface before theorizing:
git bisect (or git log -p on the suspect files) to find the introducing change.State a single, specific, falsifiable hypothesis for the root cause, e.g. "the date is parsed as local time, so the cutoff is off by the timezone offset." Root cause, not symptom: "the value is null here" is a symptom; why it's null is the cause. Resist shotgun changing several things at once.
Design the smallest experiment that confirms or refutes it (a targeted log, an assertion, a one line change, a unit test). Run it.
Loop Steps 3 to 4 until a hypothesis is confirmed by evidence. Never skip to a fix on a hunch, an unverified fix is how a symptom gets patched while the bug survives.
Make the minimal, targeted change that addresses the proven cause. Don't fix the symptom (clamping the null), fix the cause (why it's null). Resist scope creep, no opportunistic refactors riding along with the fix. Follow the project's conventions (AGENTS.md, neighbouring code).
/test.For a hunt that is not trivial, spawn an investigation subagent so the iterative tool use doesn't fill the main context:
model: set explicitly to a strong model, do not inherit the session model (Claude Code: sonnet)description: "Debug: <symptom>"Read, Bash, Grep, Glob, Edit, Writeprompt: this loop + the captured symptom + reproduction + the relevant AGENTS.md (inlined). Require it to report the root cause with evidence, not just "fixed it."Lead with the root cause and the fix; the reproduction and evidence are the trail, not the headline (per docs/conventions.md). Template:
## /debug complete · <the bug, one line>
**Root cause: <the proven cause>. Fixed by <the minimal change, files touched>.**
Next: /test <feature> (lock in the regression test, added inline or handed over)
Heads up: <same cause also at <where>, fixed too · or a design flaw → /architect <what>> (omit if none)If the cause is a flawed decision rather than a coding mistake, lead with that in the headline, the right fix may be a spec update, not a code patch.
© jsmastery-pro, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/debug of jsmastery-pro/skills.
Open the folder on GitHubat commit 43b69e4
Root Cause Debugging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Root Cause Debugging this skilljsmastery-pro/skills | 1.4k | — | ~1.8k | Automated safety check: Notes | MIT | |
| Superpowers Systematic Debuggingchristopherarter/superpowers-reasonix | 102 | — | ~2k | Automated safety check: Pass | MIT | |
| Minimal Code Fixcobusgreyling/loop-engineering | 11k | 1 repos | ~345 | Automated safety check: Notes | MIT | |
| Failure Diagnosis LoopTotoro-jam/battle-tested-patterns | 343 | — | ~319 | Automated safety check: Pass | MIT | |
| Hypothesis-Driven DebuggingLichAmnesia/lich-skills | 234 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Systematic Debuggingcbrock84/headcount | 2k | — | ~657 | Automated safety check: Pass | MIT |
christopherarter/superpowers-reasonix
Any bug, failing or flaky test, or surprise behavior?. An agent skill from christopherarter/superpowers-reasonix.
cobusgreyling/loop-engineering
Makes the smallest code change that fixes one well-scoped problem, such as a CI failure, review comment or typo, without refactoring anything unrelated.
Totoro-jam/battle-tested-patterns
Walks the agent through a fixed loop for failing tests and build errors: reproduce, isolate, hypothesize, instrument, fix, verify, then add a regression test.
LichAmnesia/lich-skills
Replaces trial-and-error fixing with an observe, hypothesize, experiment and conclude loop kept in DEBUG.md, where no fix is allowed before evidence supports a cause.
cbrock84/headcount
Finds the root cause of a bug, test failure, or unexpected behavior before proposing any fix.
ArabelaTso/Skills-4-SE
Analyze failing tests to detect functional bugs in code. An agent skill from ArabelaTso/Skills-4-SE.
jsmastery-pro/skills
A gate before merge: verify runs the real app against the spec, and review has a different model do a senior code review, without editing code.
jsmastery-pro/skills
Builds a feature, page, component, API or data layer from an approved spec and AGENTS.md, and sends you back to /architect when a key decision is missing.
jsmastery-pro/skills
Writes PR descriptions, changelog entries, release notes and postmortems from the actual commits and diff, and saves each one in the right place.
jsmastery-pro/skills
Runs as the last step after a completed change to keep AGENTS.md files, the project scope and linked spec status lines current, using only small surgical edits.
jsmastery-pro/skills
Bootstraps a project's tool-agnostic AGENTS.md files for a greenfield project, an undocumented codebase or one area, adding only what is missing and never overwriting curated content.
jsmastery-pro/skills
Turns a product idea into a coarse, ordered scope kept in docs/scope, then keeps it current: plan a product, plan the next slice, enroll one feature or reconcile after shipping.
Categories
Runs a reproduce, localize, hypothesize, test, fix and verify loop to find a bug's root cause, applies the minimal fix and hands off a regression test. Invoked with `/debug`, this skill treats a bug as a case to prove. The agent reproduces it on demand, narrows it to the smallest failing surface and changes one thing at a time, testing a single hypothesis at a time and confirming or rejecting each with evidence before touching the code.
Root Cause Debugging fits situations like: A test fails for a reason nobody understands yet; A verification run found a failure that needs a root cause; behavior is wrong and you want a minimal, proven fix.
Run `npx skills add jsmastery-pro/skills --skill debug -a claude-code`. Or copy the skill folder (skills/debug in jsmastery-pro/skills) into .claude/skills/debug in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jsmastery-pro/skills --skill debug -a codex`. Or copy the skill folder (skills/debug in jsmastery-pro/skills) into .agents/skills/debug in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jsmastery-pro/skills --skill debug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug, .gemini/skills/debug, .github/skills/debug and .opencode/skills/debug in your project.
Going by SKILL.md and its folder, Root Cause Debugging needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob, Write, Edit, Agent.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Root Cause Debugging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Root Cause Debugging: Superpowers Systematic Debugging (christopherarter/superpowers-reasonix, 102 stars), Minimal Code Fix (cobusgreyling/loop-engineering, 11k stars), Failure Diagnosis Loop (Totoro-jam/battle-tested-patterns, 343 stars) and Hypothesis-Driven Debugging (LichAmnesia/lich-skills, 234 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jsmastery-pro (a GitHub organization) maintains it in jsmastery-pro/skills, which has 1,429 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on August 9, 2026.
Source: jsmastery-pro/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.