skills/cc-debugging/SKILL.md
Applies Code Complete's scientific debugging method: STABILIZE → LOCATE → HYPOTHESIZE → EXPERIMENT → FIX → TEST → SEARCH. For active bug investigation, not QA process design or test coverage planning.
npx skillsauth add ryanthedev/code-foundations cc-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.
Most debugging time goes to finding and understanding the defect; the fix is usually obvious once you understand it. Every action tests a hypothesis — no guessing, no random changes.
First action on any bug: run the failing test or repro and read its actual output. Do this before reading the source in depth and before editing anything — the observed failure, not the code you infer it from, is what you debug. If the usual runner is unavailable (e.g. no pytest), fall back to a runnable form (python3 -c, a direct script) and capture that output now, not after a fix.
Shared numeric thresholds (20:1 debugger variation, ~50% of fixes wrong first time): Read(${CLAUDE_PLUGIN_ROOT}/references/cc-foundations.md).
STABILIZE → LOCATE → HYPOTHESIZE → EXPERIMENT → FIX → TEST → SEARCH
Get a reliable reproduction — you cannot debug what you cannot reproduce.
Precondition on editing: the first tool action of the session is running the failing test or repro, and its output is captured, BEFORE any Edit to implementation code. The order is run-test → then edit, never edit-then-test. If the standard runner is missing, run the repro another way (python3 -c, a direct script) and capture that — the missing runner does not excuse skipping the observed failure.
Narrow the suspicious region before forming a hypothesis.
Form a specific, testable hypothesis — not "the bug is somewhere in module X."
Design a test that will disprove the hypothesis, not confirm it.
Fix the root cause, not the symptom.
Verify the fix actually works.
Defects cluster — if this bug existed, similar ones likely exist nearby.
Precondition on completing: before reporting the fix complete, a search for the same defect pattern (grep/Glob) has been run and its result recorded.
Rule these out before deep investigation:
< vs <=), array index vs length== instead of epsilon comparison)When quick checks fail and the systematic method stalls, the brute-force techniques (full code review, isolate in a harness, rewrite the section) and the full defect catalog are in Read(${CLAUDE_SKILL_DIR}/checklists.md).
Explain the problem out loud, to a person or a rubber duck. Articulation frequently reveals the bug before the listener responds.
| After | Next |
|---|---|
| Root cause found | Fix + add regression test (Steps 6–7 above) |
| Defect is in untested legacy code | Read(${CLAUDE_PLUGIN_ROOT}/skills/welc-legacy-code/SKILL.md) — get it under test first |
| Fix requires structural refactoring | Read(${CLAUDE_PLUGIN_ROOT}/skills/cc-refactoring-guidance/SKILL.md) |
devops
Implements the Standard/Full planning pipeline for Medium and Complex tasks: multi-step discovery, phase decomposition with skill matching, cross-cutting concerns, and plan emission with Gate fields.
development
Provides all 23 Gang of Four patterns as a decision guide: maps code symptoms to patterns, then loads the structural recipe for the selected pattern.
development
Generates or updates docs/code-standards.md by scanning the codebase for actual conventions. Produces an example-rich standards file optimized for LLM consumers, grounded in the project's real patterns.
development
Safely modifies untested legacy code by getting it under test first: characterization tests, seam identification, sprout/wrap techniques, and pinch-point testing before any production changes.