From codebrain
Use when something is broken, failing, hanging, erroring, or behaving unexpectedly. Systematic debugging workflow: reproduce → isolate → hypothesize → fix → verify. Prevents guessing and shotgun fixes. Also triggers on frustration signals like 'why isn't this working', 'it's broken', 'stuck'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codebrain:debugThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematic debugging workflow. Diagnose before fixing. Evidence before assumptions.
Systematic debugging workflow. Diagnose before fixing. Evidence before assumptions.
Do NOT guess-and-fix. The #1 failure mode of AI debugging is jumping to a fix without understanding the root cause. This skill enforces a structured process that prevents that.
/codebrain:debug [description of the problem]
If no description provided, ask: "What's happening that shouldn't be? Or what's not happening that should be?"
Capture the exact error.
Check recent changes.
git log --oneline -10 — what changed recently?git diff --stat — what's currently modified?Read the constitution and relevant specs.
.codebrain/memory/known-issues.md — is this a known issue?.codebrain/memory/continuity.md — what was done in the last session?Confirm the bug is reproducible.
Narrow the scope.
Trace the execution path.
mcp__codebase_memory__trace_call_path) to trace from the entry point to the failureCheck the blast radius.
mcp__code_review_graph__get_impact_radius_tool on recently changed filesBinary search if needed.
Form exactly ONE hypothesis about the root cause.
Ask the user before fixing.
Apply the minimal fix.
Follow constitution principles.
Reproduce the original failure — it should now pass.
Check for regressions.
Update memory.
.codebrain/memory/known-issues.md with:
.codebrain/memory/patterns.md# Debug Report
**Symptom:** [what went wrong]
**Root Cause:** [what caused it — file:line with evidence]
**Fix:** [what was changed]
**Regression Test:** [test name, if written]
**Prevention:** [suggested rule/pattern to prevent recurrence]
npx claudepluginhub chrsmay/codebrain-plugin --plugin codebrainEnforces systematic root cause investigation for bugs, test failures, and unexpected behavior through four phases: investigation, pattern analysis, hypothesis testing, and implementation.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.