一键导入
debugging
Use when diagnosing bugs, test failures, or unexpected behavior before attempting any fix
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when diagnosing bugs, test failures, or unexpected behavior before attempting any fix
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | debugging |
| description | Use when diagnosing bugs, test failures, or unexpected behavior before attempting any fix |
Announce at start: "Following the debugging skill to find root cause before fixing."
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you have not completed steps 1-4 below, you cannot propose fixes. Symptom fixes are failure.
Collect the full picture before forming any hypothesis.
Create a minimal environment where the bug consistently occurs.
Narrow down to the exact component or function.
git log, git bisect)Identify the root cause — not just the symptom.
Implement the minimal correction needed.
Confirm the fix is correct and complete.
| Signal | Action |
|---|---|
| Tempted to "just try something" | Go back to step 1 |
| Fix didn't work | You don't have root cause — go back to step 4 |
| Multiple fixes attempted | You're guessing — go back to step 3 |
| Under time pressure | Slow down — systematic is faster than thrashing |
| Issue seems simple | Simple bugs have root causes too — follow the process |
| When | Invoke |
|---|---|
| Bug fix requires multi-file changes | refactoring |
| Need to write regression test | testing |
| Fix touches security-sensitive code | secure-coding |
| Ready to submit the fix | pr-writing |
For principles, rationale, anti-patterns, and examples:
guides/debugging-with-ai/debugging-with-ai.md
Execute safe Git workflows — branching, committing, resolving conflicts, and managing PRs
Use when controlling AI spend, token budgets, model routing, or workflow efficiency before scaling usage
Use when handling incidents, outages, severe regressions, or operational emergencies before attempting broad fixes
Use when investigating latency, throughput, resource saturation, or performance regressions before changing implementation details
Use when reviewing code, preparing a PR for review, or processing review feedback
Plan and execute safe deployments with rollback procedures, verification, and monitoring