From engineering
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
How this skill is triggered — by the user, by Claude, or both
Slash command
/engineering:dbg <error message or problem description><error message or problem description>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run a structured debugging session. Four steps, strict order. No fix before reproduction. No hypothesis without evidence.
Run a structured debugging session. Four steps, strict order. No fix before reproduction. No hypothesis without evidence.
/dbg $ARGUMENTS
Tell me about the problem. Any of these help:
Understand the problem before touching code.
If the user isn't sure how to reproduce:
Pin what matters: environment, timing, input shape, infrastructure state.
Narrow down the component, service, or code path. Try in this order — escalate only when the prior tactic fails:
binding.pry or binding.irbbreakpoint() or pdbdebugger statement + DevTools / --inspectdlv / gdb / lldb[DBG-a4f2]) so cleanup is a single grep.Also check: recent deploys, config changes, dependency updates, and anything that correlates with when the issue started.
Generate 2–4 ranked hypotheses. Not one. Single-hypothesis thinking anchors on the first plausible idea.
For each hypothesis:
Cross-reference against the debug ledger (see below). Every new hypothesis must hold for all prior observations, not just the latest run. If any past run contradicts it — refine or discard.
Maintain a running record of every experiment in .claude/debug-sessions/{session_name}.md.
Session name: slug from the issue, e.g. auth-timeout-2026-05-21.
Format:
# Debug: {issue summary}
## Context
- **Expected**: [what should happen]
- **Actual**: [what happens instead]
- **Reproduction state**: reliable | flaky | none
## Experiment Log
| # | What changed | Result | Ruled in / out |
|---|-------------|--------|----------------|
| 1 | ... | ... | ... |
| 2 | ... | ... | ... |
## Hypotheses
1. [hypothesis] — status: testing | disproved | confirmed
2. ...
## Root Cause
[filled when confirmed. Explanation of why the bug occurs]
## Fix
[code changes or config fix applied]
## Prevention
- [test added]
- [guard added]
Update the ledger after every experiment. When stuck, read the full ledger — the answer is often in the pattern across runs.
If ~~monitoring is connected:
If ~~source control is connected:
If ~~project tracker is connected:
npx claudepluginhub karunsiri/ai-toolkit --plugin engineeringGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.