ワンクリックで
debugging
Systematic root cause analysis for code failures
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Systematic root cause analysis for code failures
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Review pull requests for code quality, security, and correctness
Review pull requests for code quality, security, and correctness
End-to-end shipping workflow — tests, PR creation, review request. Unified pr-create + pr-complete.
Periodic cross-agent learning consolidation — review what worked, what didn't, propagate insights
Break down complex problems through structured analytical frameworks
Persist and recall context across sessions — critical for continuity
| name | debugging |
| version | 1.0.0 |
| description | Systematic root cause analysis for code failures |
| uses | ["analysis/deep-analysis"] |
| requires | {"tools":[],"env":[]} |
| security | {"risk_level":"write","capabilities":["file:read","command:execute"],"requires_approval":false} |
Systematic root cause analysis for code failures. This skill provides a structured approach to diagnosing bugs — from reproducing the problem to identifying the root cause to verifying the fix.
This is an agent-handled skill (handler: type: agent). When debug is invoked, you (the agent) apply the methodology below using your reasoning capabilities. There is no backing code — you follow these instructions directly. The tool schema in tool.yaml defines the external contract; this document guides how you fulfill it.
Before diagnosing, confirm you can reproduce the problem:
If it can't be reproduced, gather more evidence before proceeding.
Narrow down where the problem is:
| Technique | How | When |
|---|---|---|
| Binary search | Bisect the code path to find where behavior diverges | Large codebase, unclear location |
| Input reduction | Find the minimal input that triggers the bug | Complex inputs |
| Dependency elimination | Remove/mock dependencies to isolate the component | Could be in dependencies |
| Version bisect | git bisect to find the commit that introduced the bug | Regression |
| Log injection | Add logging at key points to trace execution flow | Need to see runtime behavior |
Once isolated, identify the root cause:
Common root causes:
| Category | Examples |
|---|---|
| Logic error | Off-by-one, wrong operator, missing condition |
| State error | Uninitialized variable, stale cache, race condition |
| Type error | Wrong type passed, null where non-null expected |
| Boundary error | Empty collection, max int, unicode, special chars |
| Concurrency error | Race condition, deadlock, data corruption |
| Environment error | Missing config, wrong version, path issues |
| Integration error | API contract changed, schema mismatch |
Diagnosis process:
Apply the minimal fix:
Confirm the fix works:
Record what was found:
## Debug: [Symptom]
### Reproduction
- Error: [error message/behavior]
- Steps: [how to reproduce]
- Consistent: [yes/no/intermittent]
### Isolation
- Location: [file:line]
- Component: [module/function]
- Technique used: [binary search/input reduction/etc.]
### Root Cause
- Category: [logic/state/type/boundary/concurrency/environment/integration]
- Cause: [specific explanation]
- Evidence: [how we confirmed this is the cause]
### Fix
- Change: [what was changed]
- Scope: [minimal — only the root cause]
### Verification
- Original failure: [resolved]
- Existing tests: [pass]
- Regression test: [written — test name]
### Prevention
- Lesson: [what to do differently to prevent this class of bug]
Debugging is complete when: