# Debug

Run /debug to find and fix a bug's root cause: a test failing for an unclear reason...

- Repository: https://github.com/jsmastery-pro/skills (1584 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-08-09
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add jsmastery-pro/skills --skill debug -g -a claude-code -y`
Codex: `npx skills add jsmastery-pro/skills --skill debug -g -a codex -y`
Cursor: `npx skills add jsmastery-pro/skills --skill debug -g -a cursor -y`
Gemini CLI: `npx skills add jsmastery-pro/skills --skill debug -g -a gemini-cli -y`

## Description

Run /debug to find and fix a bug's root cause: a test failing for an unclear reason, /check verify finding a failure, or behavior being wrong. Runs a reproduce, localize, hypothesize, test, fix, verify loop, makes the minimal fix, and hands a regression test to /test. No features, no extra refactors.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## Output style (plain words, no dashes, no hyphens)

<!-- 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 -->

## What this skill does

**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 `/loop` skill (which runs a command again on a time interval). Reach for `/loop` only when you need to watch something over time, e.g. poll a flaky test across many runs.

## Asks vs acts

The rest: https://github.com/jsmastery-pro/skills/blob/HEAD/skills/debug/SKILL.md
