一键导入
systematic-debugging
4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use the Codex Kit CLI to initialize, update, or inspect a Codex-ready project scaffold in the current workspace.
Use when a change may affect rollout, deployment, migrations, or operational stability and needs a higher-confidence validation pass.
Review patches, branches, or implementations for correctness, regressions, security, and missing tests. Use when the task is to inspect a diff or code change and identify concrete risks before merge.
Reproduce, isolate, and explain bugs before fixing them. Use when the task is about a bug, regression, failure, flaky behavior, unexpected output, or unclear runtime behavior that must be narrowed to a concrete cause.
Produce implementation plans that are decision-complete and execution-ready. Use when the task needs decomposition, sequencing, acceptance criteria, explicit assumptions, risk handling, or a concrete plan before coding or operational work starts.
Use when a bug is real but poorly scoped and you need a disciplined pass to reproduce it, bound it, and isolate the most likely root cause before fixing.
| name | systematic-debugging |
| description | 4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues. |
Source: obra/superpowers
This skill provides a structured approach to debugging that prevents random guessing and ensures problems are properly understood before solving.
Before fixing, reliably reproduce the issue.
## Reproduction Steps
1. [Exact step to reproduce]
2. [Next step]
3. [Expected vs actual result]
## Reproduction Rate
- [ ] Always (100%)
- [ ] Often (50-90%)
- [ ] Sometimes (10-50%)
- [ ] Rare (<10%)
Narrow down the source.
## Isolation Questions
- When did this start happening?
- What changed recently?
- Does it happen in all environments?
- Can we reproduce with minimal code?
- What's the smallest change that triggers it?
Find the root cause, not just symptoms.
## Root Cause Analysis
### The 5 Whys
1. Why: [First observation]
2. Why: [Deeper reason]
3. Why: [Still deeper]
4. Why: [Getting closer]
5. Why: [Root cause]
Fix and verify it's truly fixed.
## Fix Verification
- [ ] Bug no longer reproduces
- [ ] Related functionality still works
- [ ] No new issues introduced
- [ ] Test added to prevent regression
## Before Starting
- [ ] Can reproduce consistently
- [ ] Have minimal reproduction case
- [ ] Understand expected behavior
## During Investigation
- [ ] Check recent changes (git log)
- [ ] Check logs for errors
- [ ] Add logging if needed
- [ ] Use debugger/breakpoints
## After Fix
- [ ] Root cause documented
- [ ] Fix verified
- [ ] Regression test added
- [ ] Similar code checked
# Recent changes
git log --oneline -20
git diff HEAD~5
# Search for pattern
grep -r "errorPattern" --include="*.ts"
# Check logs
pm2 logs app-name --err --lines 100
❌ Random changes - "Maybe if I change this..." ❌ Ignoring evidence - "That can't be the cause" ❌ Assuming - "It must be X" without proof ❌ Not reproducing first - Fixing blindly ❌ Stopping at symptoms - Not finding root cause