step-by-step-debug
Skill1 starsChanged 4 months agoMITView on GitHub
Activates /step-by-step-debug mode — a disciplined, iterative debugging mode where Claude interviews the user to understand the bug, requests screenshots for UI/UX issues, verifies and analyzes the root cause, agrees on findings with the user, then fixes it using the exact same step-by-step workflow (plan approval, atomic steps, optional review, test scenarios, change summary). Triggers when the user types /step-by-step-debug (alone or followed by a bug description). Also triggers on phrases like "help me debug", "track down this bug", "something is broken", "why is this failing", or "debug mode". Deactivates when the user types /done or "exit debug mode".
In this repositoryOne other file it gives its agents.
- step-by-stepSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Only then does it shift into the disciplined fix workflow.
- Distinctive: line 55
Never assume you understand the bug from the initial description.
- Distinctive: line 72
If the bug has any visual component (layout, styling, interaction, rendering, form behaviour, navigation, visual state), ask for a …
- Very specific: line 76
If the bug is purely backend/logic/data, skip this phase silently.
- Distinctive: line 82
Before theorising about root cause, read the relevant code, logs, and any screenshots.
- Very specific: line 110
Do not move to the fix until root cause is mutually agreed.
- Very specific: line 138
Always: check/create UBIQUITOUS_LANGUAGE.md before Phase 1.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/step-by-step-debug Mode
A structured debugging companion that refuses to guess. Before any code changes, Claude understands the bug, verifies it against evidence, and agrees on root cause with the user. Only then does it shift into the disciplined fix workflow. Six phases:
- Interview — question the user until the bug is fully understood
- Screenshot — request UI evidence if the issue is visual
- Verify — confirm the evidence matches the described symptoms
- Analyze — identify root cause, present findings, agree with the user
- Fix — plan → execute → optional review → test → summary
- (Fix reuses the full step-by-step workflow; see below.)
Activate: /step-by-step-debug (alone or with a bug description). Deactivate: /done,
"exit debug mode", "just fix it". On activation, confirm briefly, run the glossary check, then
start Phase 1: "Debug mode on. Let me get oriented before we dig in." When the fix begins
(Phase 5), ask for a pace exactly as /step-by-step does — Fine (every step), Balanced (every
3), or Fast (every 5); steps stay atomic, pace only sets how often Claude stops for sign-off.
Default Balanced.
Bundled Reference Files
references/ubiquitous-language.md— DDD glossary extractor. Load at activation.references/execution-and-review.md— fix-phase mechanics: atomic steps, optional reviewer subagent, broken-build handling, parallelism, mid-execution feedback. Load when entering Phase 5.references/context-management.md— leanness rules, SESSION STATE,/compactprompting.
Ubiquitous Language (at activation, before Phase 1)
Same as /step-by-step: check for UBIQUITOUS_LANGUAGE.md; if missing, generate it from
available context using references/ubiquitous-language.md and tell the user. Use canonical
terms in all phases, correct aliases gently, and note glossary updates in the summary.
Phase 1: Interview — Understand the Bug
Never assume you understand the bug from the initial description. Interview until every item is resolved. Ask 2–4 focused questions per round, wait, follow up on anything unclear. Be direct about vagueness. Escape valve: if the opening message already answers most items, only ask about genuine gaps.
- Symptom — exact observed behaviour (error/output/glitch/crash); expected behaviour; when it first appeared
- Reproduction — reliable repro steps; always/sometimes/conditional; environment (browser, OS, device, API version, data state)
- Scope — isolated or multiple places; all users/data or specific; reported by others or one-off
- Context — recent changes (deploys, config, deps, migrations); available logs/traces; prior fix attempts
Close by summarising: symptom, expected, reproduces, first seen, scope, key log/trace info.
Get confirmation before proceeding. Prompt /compact after the interview.
Phase 2: Screenshot — Visual Evidence
If the bug has any visual component (layout, styling, interaction, rendering, form behaviour, navigation, visual state), ask for a screenshot showing the problem — and a working "before" if one exists. Wait for it. If the user can't provide one, note the caveat and proceed.
If the bug is purely backend/logic/data, skip this phase silently.
Phase 3: Verify — Confirm the Issue
Before theorising about root cause, read the relevant code, logs, and any screenshots. Confirm: the code path that would produce this symptom exists; the described repro actually reaches the broken code; the screenshot matches the described symptom. If there's a discrepancy between what was described and what the evidence shows, surface it and resolve it before analysis:
⚠️ Before I dig into root cause: [discrepancy]. Could you clarify? I want to
make sure I'm investigating the right thing.Phase 4: Analyze — Root Cause and Findings
Investigate systematically; don't jump to the obvious explanation. Then present findings and get agreement before proposing a fix:
🔍 Root cause analysis:
**Immediate cause:** [the specific thing that directly produces the symptom]
**Underlying cause:** [why that thing exists / what allowed it]
**Contributing factors:** [anything compounding it, if any]
**Blast radius:** [other areas that may be affected]
**Proposed fix direction:** [high-level approach — not the implementation yet]
Does this match your understanding? Anything to add or correct before I plan the fix?Do not move to the fix until root cause is mutually agreed. Prompt /compact after agreement.
Phase 5: Fix — Step-by-Step Execution
From here the workflow is identical to /step-by-step. Load
references/execution-and-review.md and references/context-management.md, then:
- Plan — read the codebase for conventions, produce a full numbered step breakdown (title + one-sentence rationale), run parallelism analysis, get explicit approval before coding.
- Execute — one atomic change per step; announce → change → report. Checkpoint at the
chosen pace (Fine/Balanced/Fast): in Balanced/Fast, run the batch then present one
consolidated checkpoint with the optional review. Pause a batch early on a broken build,
a reviewer flag, or a step needing a user decision. Keep responses lean; follow the
SESSION STATE /
/compactrhythm per checkpoint. - Non-functional checkpoint — after the fix steps, ask whether error handling, logging, analytics/telemetry, or performance need attention for the changes made; add atomic steps for any the user picks.
- Test — derive scenarios from the actual fix (include a regression test for the bug itself), get scenario approval, ask review mode (per-test vs all-at-end), then write.
- Summary — full change summary including a one-line note on the original bug and its root cause, plus Deferred Review Items and Glossary updates if any.
Hard Rules
Always: check/create UBIQUITOUS_LANGUAGE.md before Phase 1; complete each phase before
the next (interview → screenshot → verify → analyze → fix); ask for a screenshot for any visual
bug; surface evidence discrepancies before theorising; get explicit agreement on root cause
before planning; include a regression test for the bug; apply the full step-by-step fix
workflow without shortcuts; keep steps atomic; get sign-off before advancing.
Never: skip the interview because the bug "seems obvious"; theorise about root cause before verifying evidence; propose a fix before root cause is agreed; skip the screenshot for a visual bug; bundle multiple concerns into one step; proceed without confirmation; compact mid-step.
Example (abridged)
User: /step-by-step-debug The checkout button stops working after applying a discount code
Claude: Debug mode on. Let me get oriented.
[glossary check] A few questions:
1. Does the button do nothing, show an error, or fail silently?
2. All discount codes or specific ones?
3. Anything in the console or network tab?
User: Goes grey and unclickable. All codes. Console: "TypeError: Cannot read
properties of undefined (reading 'total')". Started after yesterday's deploy.
Claude: [summarises bug, confirms] Since this is a UI issue, could you share a
screenshot of the greyed-out button?
User: [attaches screenshot]
Claude: [verifies code path against screenshot]
🔍 Root cause analysis:
**Immediate cause:** applyDiscount() omits `total` when a discount zeroes the cart.
**Underlying cause:** yesterday's refactor strips zero-value fields for payload size,
but checkout expects `total` to always exist.
**Contributing factors:** no type guard on cart.total; no 100%-discount test.
**Blast radius:** any component reading cart.total; order summary display.
**Proposed fix direction:** always return `total` (default 0), add a defensive guard.
Does this match your understanding?
User: Yes, let's fix it.
Claude: Here's the plan:
1. **Fix applyDiscount() response** — always include `total`, default 0
2. **Add guard in checkout component** — treat undefined total as 0
3. **Check order summary component** — apply the same guard if needed
⚡ Steps 2 & 3 can run in parallel (different components, no shared deps).
Does this breakdown look right?Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

