一键导入
debug
Use when facing a bug, test failure, or unexpected behavior that isn't immediately obvious
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when facing a bug, test failure, or unexpected behavior that isn't immediately obvious
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Iterative review-fix loop for accumulated milestone/branch changes. Runs parallel reviewers, fixes findings autonomously, repeats until clean. Use after multiple tasks merge to a milestone branch, or before merging to main. Invoke with /milestone-review --base-branch main. Supports --dry-run and --max-iterations.
This skill should be used when the user wants a comprehensive code review using multiple specialized reviewers in parallel. Invoked with /multi-review or when user asks for 'thorough review', 'full code review', or 'review from multiple perspectives'. Use --plan <path> to review an implementation plan pre-coding.
Use when starting a new feature or idea that needs thorough pre-execution planning. Use instead of calling /product-review, /spec, and review skills individually.
Use when you have an idea, goal, or feature description and need to turn it into an actionable plan with tasks
Use when you need measured performance evidence by running a repeatable command on the current branch and a baseline ref
Use when you need 3-5 intentionally different UI directions before committing to a single design approach
基于 SOC 职业分类
| name | debug |
| description | Use when facing a bug, test failure, or unexpected behavior that isn't immediately obvious |
| allowed-tools | Read, Bash, Glob, Grep, Edit, Write, AskUserQuestion, WebSearch |
Iron Law: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
Before forming hypotheses, collect facts:
git log --oneline -10 -- <file>Known bug patterns — check these first:
| Pattern | Signature |
|---|---|
| Race condition | Intermittent failure, timing-dependent, works in debugger |
| Nil/null propagation | undefined is not a function, NoMethodError, NoneType |
| State corruption | Works first time, fails on second; stale data after mutation |
| Integration failure | Works in isolation, fails with real dependency (DB, API, queue) |
| Configuration drift | Works locally, fails in CI/staging; env var mismatch |
| Stale cache | Old behavior persists after code change; hard refresh fixes it |
| Off-by-one / boundary | Fails at 0, 1, max, or empty input; pagination edge cases |
If the bug matches a known pattern, state which one and focus investigation there.
"5 Whys" drill-down — when the cause isn't obvious, ask why iteratively:
Keep asking why until you reach something you can fix directly.
If 3 hypotheses have failed, STOP. You are likely wrong about the root cause.
Escalation is not failure. Bad work is worse than no work. Stop guessing.
If you catch yourself thinking any of these, STOP:
| Excuse | Reality |
|---|---|
| "Let me try a quick fix first" | Quick fixes without root cause analysis create new bugs. |
| "I know what the problem is" | Then state your hypothesis and predict the test outcome. |
| "It works now after my change" | Correlation is not causation. Verify your fix addresses the root cause. |
| "The test is flaky, not my code" | Reproduce it 3 times. If it fails 2/3, it's your code. |
| "I'll add better error handling" | Error handling hides bugs. Fix the cause, not the symptom. |
After resolution, output a structured report:
═══════════════════════════════════════════
DEBUG REPORT
═══════════════════════════════════════════
Status: DONE / DONE_WITH_CONCERNS / BLOCKED
Symptom: [what was observed]
Root Cause: [what was actually wrong]
Pattern: [known pattern match, if any]
Fix: [what was changed and why]
Regression Test: [test name and what it verifies]
Evidence: [how you confirmed the fix addresses the root cause]
Hypotheses Tested: N (list failed ones if >1)
═══════════════════════════════════════════
If the root cause was non-obvious, save debugging insights to auto-memory.
Evolved from obra/superpowers systematic-debugging skill with patterns from garrytan/gstack and community best practices.