ワンクリックで
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Use when executing implementation plans with independent tasks in the current session
Use when implementing any feature or bugfix, before writing implementation code
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Use when you have a spec or requirements for a multi-step task, before touching code
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
| name | systematic-debugging |
| description | Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes |
Related skills: Write a failing test for the bug with
/skill:test-driven-development. Verify the fix with/skill:verification-before-completion.
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Core principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
Violating the letter of this process is violating the spirit of debugging.
The workflow-monitor extension tracks your debugging: it detects fix-without-investigation and counts failed fix attempts, surfacing warnings in tool results. Use
workflow_referencewith debug topics for additional guidance.
If a tool result contains a ⚠️ workflow warning, stop immediately and address it before continuing.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1, you cannot propose fixes.
Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
Use this ESPECIALLY when:
Don't skip when:
You MUST complete each phase before proceeding to the next.
BEFORE attempting ANY fix:
Read Error Messages Carefully — Don't skip past errors or warnings. Read stack traces completely. Note line numbers, file paths, error codes.
Reproduce Consistently — Can you trigger it reliably? What are the exact steps? If not reproducible → gather more data, don't guess.
Check Recent Changes — Git diff, recent commits, new dependencies, config changes, environmental differences.
Gather Evidence in Multi-Component Systems — For each component boundary: log what enters, what exits, verify config propagation. Run once to see WHERE it breaks, then investigate that component.
Example (multi-layer system):
# Layer 1: Workflow
echo "=== Secrets available: ==="
echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
# Layer 2: Build script
echo "=== Env vars in build script: ==="
env | grep IDENTITY || echo "IDENTITY not in environment"
# Layer 3: Signing
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
This reveals: Which layer fails (e.g., secrets → workflow ✓, workflow → build ✗)
Trace Data Flow — Where does the bad value originate? What called this with the bad value? Keep tracing up until you find the source. Fix at source, not at symptom. See root-cause-tracing.md for the complete technique.
Create Failing Test Case — Use /skill:test-driven-development for writing proper failing tests. MUST have before fixing.
Implement Single Fix — ONE change at a time. No "while I'm here" improvements. No bundled refactoring.
Verify Fix — Test passes? No other tests broken? Issue actually resolved?
If Fix Doesn't Work:
This is NOT a failed hypothesis — it's a wrong architecture.
Pattern indicating architectural problem:
STOP and question fundamentals:
Discuss with your human partner before attempting more fixes.
If you catch yourself thinking:
ALL of these mean: STOP. Return to Phase 1.
If 3+ fixes failed: Question the architecture (see above).
| Excuse | Reality |
|---|---|
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
| "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
| "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
| "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
If investigation reveals issue is truly environmental, timing-dependent, or external:
But: 95% of "no root cause" cases are incomplete investigation.
These techniques are part of systematic debugging and available in this directory:
root-cause-tracing.md — Trace bugs backward through call stack to find original triggerdefense-in-depth.md — Add validation at multiple layers after finding root causecondition-based-waiting.md — Replace arbitrary timeouts with condition pollingUse workflow_reference for: debug-rationalizations, debug-tracing, debug-defense-in-depth, debug-condition-waiting