一键导入
debug
Use when encountering a bug, test failure, or unexpected behavior — runs staged investigation before implementing any fix.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when encountering a bug, test failure, or unexpected behavior — runs staged investigation before implementing any fix.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user says "/deep-review", "deep review", "thorough review", or wants the deepest possible code review before pushing a branch.
Use when the user says "/harness-update", "update the harness", "upgrade agent-harness", "pull the latest harness", or after seeing an UPGRADE_AVAILABLE notice. Pulls latest harness files into this project, preserves project-specific configuration and local-only skills, and walks the user through any conflicts.
Use when the user wants to audit or understand the agent harness itself — its hooks, skills, agents, or commands — or asks "what's in this harness", "how does this harness work", or "harness overview".
Use when the user has a one-off task that slots into the current sprint and needs a quick written plan — lighter than /plan-sprint. Reads existing plans for context, uses plan mode, writes a focused plan file.
Use when the user says "/build", hands off a sprint-plan document path, or asks to execute a written plan end-to-end. Branches, implements, tests, verifies in browser, commits incrementally, and prepares the PR. Auto-fires /lg-* skills when plan steps involve LangGraph/LangChain agent work.
Use when the user says "review migrations", "db review", "check schema changes", "safe to migrate?", or before deploying schema changes to production.
| name | debug |
| description | Use when encountering a bug, test failure, or unexpected behavior — runs staged investigation before implementing any fix. |
| user-invocable | true |
| tier | rigid |
| kind | process |
Override: see
CLAUDE.md§ Instruction precedence. The user is principal; this skill is advisory.
Staged debugging: root cause → pattern analysis → hypothesis + minimal test → handoff. /debug doesn't write the fix; it hands off to /tdd after Phase 3 confirms the hypothesis.
NO FIX WITHOUT ROOT CAUSE NAMED AND HYPOTHESIS VALIDATED
A fix without evidence is a guess. "Let me try one more thing" means you've been guessing. After 3 failed implementations, stop and question the architecture.
Track attempts via TodoWrite — every fix attempt is one todo, completed on verify/revert.
git log --since=..., git diff main...HEAD). Log inputs/outputs at component boundaries until you see the value go wrong. Gate: one-sentence hypothesis with file:line evidence, or stop and ask the user.console.log, an isolated unit test, a one-line expression). Change ONE variable at a time, run in isolation. Gate: hypothesis confirmed by evidence, or a new (narrower) hypothesis stated./tdd: "Root cause: <one sentence>. Confirmed by <evidence>. Failing test captures <assertion>." /debug ends here. Do NOT write the fix; do NOT invoke other implementation skills.After 3 failed implementations, stop. Don't try a 4th fix. Write down each attempt + why it failed; explicitly ask: Is the bug here, or is the design wrong? Read adjacent code with that lens; ask the user before continuing.
Three failures = the bug is not where you're looking.
REQUIRED SUB-FILE: Read red-flags.md for the full list (evidence-skipping, guess-as-fix, test-blame, phase-skipping, sunk-cost, authority pressure). The most common: "Must be flaky," "Let me try one more thing," "Just retry the test," "Mark it .skip()." All mean: stop. Read the actual error. Name the root cause before any next step.
REQUIRED SUB-FILE: Read rationalizations.md if you find yourself making excuses. The verbatim-excuse-to-reality table is anchored in the debug-thrash baseline (where the load-bearing distinction is guessing vs debugging — a fix without evidence is a guess).
/tdd only after hypothesis confirmed.Cannot check all boxes? You skipped a phase. Restart from the unmet gate.
Writing the fix (use /tdd), production incident triage (use /incident, which hands off to /debug after root cause), and architectural redesign (propose as a separate workstream after the 3-attempt escalation).