Skip to content
Development
Command

/debug

Systematic debugging — 4-phase root cause process with defense-in-depth verification

From plugin
cm
5311 skills8 agents11 commands3 hooks
+1
Install
> /plugin marketplace add tody-agent/codymaster
> /plugin install cm@codymaster

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/debug

Context preview

What this command does when you run it.

Systematic debugging — 4-phase root cause process with defense-in-depth verification

Command definition

debug.md
description: Systematic debugging — 4-phase root cause process with defense-in-depth verification
argument-hint: "<bug description or error message>"

/debug — Systematic Debugging

4-phase systematic debugging: reproduce → isolate → fix → verify with defense-in-depth.

Invocation

/debug TypeError: Cannot read property 'id' of undefined
/debug Login page shows blank after OAuth redirect

Workflow

Step 1: Reproduce

Apply **cm-debugging** skill: 1. Understand the error context 2. Reproduce the issue reliably 3. Identify the exact conditions

Step 2: Root Cause Analysis

5-phase investigation: 1. **Observe** — Read error logs, stack traces 2. **Hypothesize** — Form 2-3 possible causes 3. **Test** — Write a test that reproduces the bug 4. **Isolate** — Narrow down to exact root cause 5. **Verify** — Confirm the root cause with evidence

Step 3: Fix with TDD

1. Write a failing test that exposes the bug 2. Fix the code minimally 3. Confirm the test passes 4. Run full test suite to check for regressions

Step 4: Defense-in-Depth

  • Add error handling for similar cases
  • Update documentation if needed
  • Record learning in CONTINUITY.md

Step 5: Suggest Next

  • "Fixed? → `/review` to verify the fix"
  • "Need broader changes? → `/plan`"
Ships withcm

"I can't write code. But in 6 months, I shipped 12 real products using AI. CodyMaster is everything I learned — so you don't have to repeat my mistakes." — Tody Le, Head of Product, Creator of CodyMaster 50+ skills. One install.

Get the whole plugin

Other commands on cm.