Debug
Run /debug to find and fix a bug's root cause: a test failing for an unclear reason...
Install
npx skills add jsmastery-pro/skills --skill debug -g -a claude-code -y- Repository
- jsmastery-pro/skills1.6k
- Category
- Testing
- Updated
- 3mo ago
- License
- MIT
- Context cost
- Mediumabout 1,678 tokens
- Runs scripts
- No, instructions only
What it does
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.
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.
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
/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.


