/debugging-diagnostics:systematic-debuggingfrom debugging-diagnostics
Systematically debugs any bug, test failure, or unexpected behavior by tracing root cause before proposing fixes.
Ships in debugging-diagnostics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Find the root cause of any bug before attempting a fix. Random fixes waste time and create new bugs. Symptom fixes are failure.
Core principle: ALWAYS find root cause before attempting fixes.
Use for ANY technical issue:
Use this especially when:
Do not skip when:
You MUST complete each phase before proceeding to the next.
Before attempting ANY fix:
Read error messages carefully — Don't skip past errors or warnings. Read stack traces completely. Note line numbers, file paths, error codes.
Reproduce consistently — Can you trigger it reliably? What are the exact steps? If not reproducible: gather more data, don't guess.
Check recent changes — What changed that could cause this? Git diff, recent commits, new dependencies, config changes, environmental differences.
Gather evidence in multi-component systems — When the system has multiple components (CI → build → signing, API → service → database):
For EACH component boundary:
- Log what data enters the component
- Log what data exits the component
- Verify environment/config propagation
- Check state at each layer
Run once to gather evidence showing WHERE it breaks.
Then analyze to identify the failing component.
Then investigate that specific component.
Trace data flow — Where does the bad value originate? What called this with the bad value? Keep tracing up until you find the source. Fix at source, not at symptom. See references/root-cause-tracing.md for the complete backward tracing technique.
Create a failing test case — Simplest possible reproduction. Automated test if possible. Must exist before fixing.
Implement a single fix — Address the root cause identified. One change at a time. No "while I'm here" improvements.
Verify the fix — Test passes? No other tests broken? Issue actually resolved?
If fix doesn't work — STOP. Count how many fixes you've tried.
If 3+ fixes failed: question the architecture — Each fix revealing new shared state or coupling elsewhere is a sign of an architectural problem, not a hypothesis failure. Stop and discuss with the team before attempting another fix.
Root cause: <what caused the bug — specific, not vague>
Evidence: <what you observed that confirmed the hypothesis>
Fix: <what was changed and where>
Test: <test added or updated>
Verification: <how fix was confirmed>
Red flags — STOP and return to Phase 1:
Common rationalizations:
| Excuse | Reality |
|---|---|
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is faster than guess-and-check thrashing. |
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
| "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
Techniques available in references/:
root-cause-tracing.md — Trace bugs backward through the call stack to find the original trigger.defense-in-depth.md — Add validation at multiple layers after finding the root cause.condition-based-waiting.md — Replace arbitrary timeouts with condition polling to fix flaky tests.find-polluter.sh — Bisection script to identify which test creates unwanted files or state.Example implementation in examples/:
condition-based-waiting-example.ts — Complete TypeScript implementation of condition-based waiting utilities.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub yeaight7/agent-powerups --plugin debugging-diagnostics8 skills in this plugin
/bug-huntUse when reproducing, isolating, and fixing a bug with the smallest safe change./failure-triageUse when confronted with an unknown failure in CI or production, before committing to a deep debugging approach./flaky-test-investigationUse when tests pass and fail intermittently without code changes, or a test passes alone but fails in the full suite./incident-readoutUse when a bug fix or complex debugging session concludes and a blameless post-mortem summary is needed for human review./log-driven-diagnosisUse when debugging complex runtime failures, distributed systems, or issues where a local debugger cannot be attached./minimal-reproductionUse when a bug must be isolated from a large application into a standalone, runnable script or single test case.Other plugins' skills for the same job