.github_gpt/skills/systematic-debugging/SKILL.md
Use when debugging unexpected errors during implementation -- provides a structured 4-phase methodology instead of trial-and-error
npx skillsauth add the-rabak/compound-engineering-plugin systematic-debuggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Diagnose unexpected errors through a disciplined four-phase workflow instead of trial-and-error guessing.
docs/solutions/ and the documented fix directly applies.Execute the full source-of-truth workflow below. Preserve every conditional branch, phase, checklist, and validation step from the original instructions. When the workflow says to ask, wait, route, or run in parallel, do that exactly.
A structured methodology for debugging unexpected errors encountered during implementation. Prevents trial-and-error guessing by enforcing a disciplined observe-hypothesize-test-fix cycle.
Announce at start: "I'm using the systematic-debugging skill to diagnose this issue."
bug-reproduction-validator agent instead)docs/solutions/Gather evidence before forming any theories. Do not skip this phase.
Output of Phase 1: A clear, factual description of the symptoms with no theories attached.
Form structured theories about the root cause. Do not jump to fixing yet.
List 3 possible root causes ranked by likelihood:
For each hypothesis, identify:
Do NOT:
Verify or eliminate each hypothesis systematically. Start with the most likely.
Test the most likely hypothesis first:
If confirmed: Move to Phase 4 (Fix)
If ruled out: Test the next hypothesis
If all 3 ruled out: Return to Phase 2 with new hypotheses based on what you learned
Techniques:
Do NOT:
Apply a targeted fix to the confirmed root cause.
Fix the root cause -- not the symptom. If the error is "undefined is not a function," the fix is not adding a null check -- it is understanding WHY the value is undefined and fixing THAT.
Make the minimal fix -- Change as little as possible. Do not refactor, clean up, or "improve" other code while fixing the bug.
Verify the fix:
Check for siblings -- Is this same bug likely to exist in similar code elsewhere? If so, fix those too.
Remove diagnostics -- Remove any log statements, debug prints, or breakpoints added during Phase 3.
Include in your execution report:
### Debugging Session
- **Symptom:** [what failed]
- **Root cause:** [what was actually wrong]
- **Fix:** [what was changed]
- **Prevention:** [how to prevent this in the future]
This information feeds into the learnings brief for subsequent tasks and can be captured in docs/solutions/ via /workflows:compound.
If you discovered a pattern that would help prevent this issue in the future:
Report the debugging result in this structure:
### Debugging Session
- Symptom: ...
- Root cause: ...
- Fix: ...
- Prevention: ...
development
Mutates a single field or content region of an existing self-contained HTML artifact in place (island-first, no-added-facts, injection-safe) without regenerating the document from scratch. Invoked by a workflow command whenever it needs to back-write into an artifact it already composed -- e.g. a ref/status update, or a content rewrite that must re-project the affected view -- never by the user directly.
development
Composes a self-contained, interactive HTML artifact (island-first, single file, token-layer themed, injection-safe) from a workflow command's structured plan payload. Invoked by a workflow command at its artifact-write step -- currently `/workflows:plan` -- never by the user directly.
development
Mutates a single field or content region of an existing self-contained HTML artifact in place (island-first, no-added-facts, injection-safe) without regenerating the document from scratch. Invoked by a workflow command whenever it needs to back-write into an artifact it already composed -- e.g. a ref/status update, or a content rewrite that must re-project the affected view -- never by the user directly.
development
Composes a self-contained, interactive HTML artifact (island-first, single file, token-layer themed, injection-safe) from a workflow command's structured plan payload. Invoked by a workflow command at its artifact-write step -- currently `/workflows:plan` -- never by the user directly.