From rolepod
Use when something is broken — error appears, test fails, build breaks, output is wrong, regression returns. Reproduce, trace upstream to root cause, write a failing test, ship a minimal fix. Phase = Build / Debug.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rolepod:debug-issueWhen to use
when an error appears, a test that was green is red, a build broke, output is wrong, something worked before and stopped, the same bug keeps recurring, or a fix made one error vanish while a similar one appeared nearby
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Canonical debug workflow. Replace guess-and-check with disciplined narrowing: reproduce → trace upstream to root → write failing test → minimal fix → verify regression-clean.
Canonical debug workflow. Replace guess-and-check with disciplined narrowing: reproduce → trace upstream to root → write failing test → minimal fix → verify regression-clean.
?. / null-check / try-catch without knowing whyOwns:
Does not own:
Return / hand off:
write-spec.write-plan.check-work.Capture the exact error, the throw site, and the stack trace before editing. The real cause is often mid-stack, not at the top.
One command, same failure every time. Pytest: pytest path/test_x.py::name -v. API: exact failing curl. UI: steps + browser + console. Intermittent: raise the rate first — loop the trigger, add stress, inject sleeps — until you have a 50%+ signal. A 1% flake is not yet debuggable. For the flake cause decision tree, see references/flake-triage.md.
If you cannot repro locally, reproduce in CI / staging. Do not fix what you cannot see fail.
If the bug appeared right after your change, undo first. Confirm green. Re-apply piece by piece.
If the bug predates your changes and the last-good commit is unknown, git bisect run <test> finds the breaking commit automatically.
When 2+ plausible causes exist, list 2-3 candidates with the cheapest falsifier per row, recommend which to test first, and let the user pick if the choice is non-obvious. Then state the chosen hypothesis: <variable / state / condition> is <value> because <upstream cause>. Test the cheapest falsifier first — log, breakpoint, read the called function, check the fixture. Don't spray fixes. Tag every debug log with a unique prefix ([DBG-a4f2]) so cleanup is one grep.
Track experiments in templates/hypothesis-ledger.md — one row each. A new hypothesis must hold against every prior row, not just the last run.
Symptom → caller → caller's caller, until one of:
Stop at one of those, not at the first place the value looks wrong. For the upstream-walk technique and the symptom-vs-root distinction, see references/root-cause-tracing.md.
The test you wish had existed. It must fail before your fix and pass after. Tighten until a one-character regression would break it.
Smallest change that turns the failing test green without breaking the rest of the suite. No "while I'm here" refactor.
Run the full module suite (or full suite for high-risk surfaces). Confirm no new red.
Delegate to the closest specialist:
qa-tester for failing-test design and flake analysissecurity-engineer if the symptom is auth / token / injectionperformance-engineer for latency / memory regressionsdevops-sre for infra / deploy / CI failuresBrief: exact error, stack, repro command, hypothesis, files touched since last green.
Execute as Lead with this minimum viable checklist:
The debug report is the canonical artifact: templates/debug-report.md. It carries the error, repro, root cause, the failing test, the fix, and verification. Do not restate the report shape here; the template is the single source.
Non-blocking — read only when unsure whether a fix reaches the root:
examples/debug-examples.md — a symptom-vs-root fix and a retry-hack-vs-triaged flake fix, each a good/bad pair with a "why good wins" table. Read the whole file; the contrast is the lesson.Load only when the task needs it:
references/root-cause-tracing.md — the upstream walk: trace a bad value to where it is bornreferences/flake-triage.md — diagnose an intermittent test instead of retrying itFull Rolepod improves this phase by adding the qa-tester floor for test depth, hooks that flag silenced exceptions, and the adversarial reviewer pattern for fixes on high-risk surfaces.
check-work is available, continue there to verify the fix with evidence.check-work is not available, attach the test command output, the diff, and any UI / log evidence directly to the user response.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub nuttaruj/rolepod --plugin rolepod