원클릭으로
systematic-debugging
Use when encountering any bug, test failure, unexpected behavior, or broken build — before proposing any fix
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when encountering any bug, test failure, unexpected behavior, or broken build — before proposing any fix
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | systematic-debugging |
| description | Use when encountering any bug, test failure, unexpected behavior, or broken build — before proposing any fix |
Random fixes waste time and introduce new bugs. Quick patches hide root causes.
Core principle: Find the root cause before touching anything. A fix without a root cause is a guess.
Announce at start: "I'm using the systematic-debugging skill for this issue."
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1, you cannot propose a fix. Not even a "small" one.
Use for ANY technical issue:
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 completely
Reproduce it consistently
Check what changed
git diff, recent commits, new dependencies, config changesInstrument multi-component systems
When the system has multiple layers (API → service → database, CI → build → deploy):
Don't guess which layer — instrument each boundary:
For each component boundary:
- Log what enters the component
- Log what exits the component
- Verify config/env propagation at each layer
Run once → gather evidence → identify which layer breaks
Then investigate that specific layer
Example for a failing deployment pipeline:
# Layer 1: env vars present?
echo "API_KEY: ${API_KEY:+SET}${API_KEY:-MISSING}"
# Layer 2: passed to build script?
env | grep API_KEY || echo "NOT in build environment"
# Layer 3: available at runtime?
curl /api/health | jq '.env.API_KEY'
This tells you exactly where it breaks — don't fix before running this.
Trace the data flow
Gate: You must be able to state: "The root cause is X because Y." If you can't, keep investigating.
Find the pattern before forming a hypothesis:
Find working examples
Read references completely
List every difference
Map dependencies
Gate: You must be able to state: "The working version does X. The broken version does Y. The difference is Z."
Scientific method — one variable at a time:
Form a single hypothesis
Test minimally
Verify before continuing
When you genuinely don't know
Gate: Hypothesis confirmed with minimal test. One hypothesis per test cycle.
Fix the root cause, not the symptom:
Write a failing test case first
Implement one fix
Verify the fix
If the fix doesn't work
If 3+ fixes have failed: question the architecture
Signs you're fighting the wrong battle:
Stop fixing. Question fundamentals:
Discuss with the user before attempting anything else.
Gate: Test written → passes after fix → no regressions → can explain the fix in one sentence.
If you catch yourself thinking any of these:
ALL of these mean: STOP. Return to Phase 1.
3+ fixes failed? Don't fix again — question the architecture.
Watch for these — they mean you're guessing instead of investigating:
| User says | What it means |
|---|---|
| "Is that actually happening?" | You assumed without verifying |
| "Did you check the logs?" | You proposed a fix without gathering evidence |
| "Stop guessing" | You're cycling through fixes without root cause |
| "Why is it doing that?" | You explained the symptom but not the cause |
| "We're still stuck?" | Your approach isn't working — stop and restart Phase 1 |
When you see these: STOP. Return to Phase 1.
| Excuse | Reality |
|---|---|
| "Issue is simple, don't need process" | Simple bugs have root causes too. Process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is FASTER than thrashing. Always. |
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
| "I'll write the test after the fix" | Untested fixes don't stick. Test first — it proves you fixed the right thing. |
| "Multiple changes at once saves time" | Can't isolate what worked. Guarantees new bugs. |
| "I skimmed the reference, I get the pattern" | Partial understanding guarantees bugs. Read it fully. |
| "I can see the problem" | Seeing the symptom ≠ understanding the root cause. |
| "One more fix attempt" (after 2+ failures) | 3 failures = architectural problem. Stop fixing, question design. |
| Phase | What you do | Gate |
|---|---|---|
| 1. Root Cause | Read errors, reproduce, check changes, instrument layers, trace data flow | Can state: "Root cause is X because Y" |
| 2. Pattern | Find working examples, read references, list differences | Can state: "Working does X. Broken does Y. Diff is Z." |
| 3. Hypothesis | Form one hypothesis, test minimally, verify | Hypothesis confirmed with evidence |
| 4. Implementation | Write failing test, single fix, verify, commit | Test passes, no regressions, one-sentence explanation |
If systematic investigation shows the issue is truly environmental, timing-dependent, or external:
But: 95% of "no root cause" cases are incomplete investigation.
Root cause tracing — when error is deep in a call stack:
Defense in depth — after finding root cause:
Condition-based waiting — for timing/async issues:
sleep() calls with polling for a specific conditionwhile not ready: check_condition() beats sleep(2) every time