원클릭으로
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 직업 분류 기준
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Use when you need to research a domain, market, or technical area before planning
Use when starting any conversation — establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
Audit frontend and backend implementation against every PRD file, one by one, using parallel subagents. Produces a full status table (done / partial / not-started), identifies critical-path blockers, and recommends next sprints. Use when you need to know where you stand against your PRDs.
First-time project setup for Mighty Powers. Creates config file, artifact directories, offers to generate CLAUDE.md, and explains available workflows.
Push the LLM to reconsider, refine, and improve its recent output. Use when user asks for deeper critique or mentions a known deeper critique method, e.g. socratic, first principles, pre-mortem, red team.
| name | systematic-debugging |
| description | Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes |
Core principle: No fixes without root cause investigation first. Symptom fixes are failure. If you haven't completed Phase 1, you cannot propose fixes.
Any technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
Especially when: under time pressure, "just one quick fix" seems obvious, you've already tried multiple fixes, or you don't fully understand the issue. Rushing guarantees rework — systematic is faster than thrashing.
You MUST complete each phase before proceeding to the next.
BEFORE attempting ANY fix:
Read Error Messages Carefully
Reproduce Consistently
Check Recent Changes
Gather Evidence in Multi-Component Systems
WHEN system has multiple components (CI → build → signing, API → service → database):
BEFORE proposing fixes, add diagnostic instrumentation:
For EACH component boundary:
- Log what data enters component
- Log what data exits component
- Verify environment/config propagation
- Check state at each layer
Run once to gather evidence showing WHERE it breaks
THEN analyze evidence to identify failing component
THEN investigate that specific component
Pattern: At each component boundary, log input/output. Run once. The logs reveal which layer breaks:
echo "=== Layer N input: ===" && echo "VAR: ${VAR:+SET}${VAR:-UNSET}"
# Repeat for each layer boundary — find where data stops propagating
Trace Data Flow
WHEN error is deep in call stack:
See root-cause-tracing.md in this directory for the complete backward tracing technique.
Quick version:
Find the pattern before fixing:
Find Working Examples
Compare Against References
Identify Differences
Understand Dependencies
Scientific method:
Form Single Hypothesis
Test Minimally
Verify Before Continuing
When You Don't Know
Fix the root cause, not the symptom:
Create Failing Test Case
mp:test-driven-development skill for writing proper failing testsImplement Single Fix
Verify Fix
If Fix Doesn't Work
If 3+ Fixes Failed: Question Architecture
Pattern indicating architectural problem:
STOP and question fundamentals:
Discuss with your human partner before attempting more fixes
This is NOT a failed hypothesis - this is a wrong architecture.
If you catch yourself thinking:
ALL of these mean: STOP. Return to Phase 1.
If 3+ fixes failed: Question the architecture (see Phase 4.5)
If you're tempted to skip the process: Systematic debugging is faster than guess-and-check thrashing. "I see the problem" means you see symptoms, not root cause. Multiple fixes at once can't isolate what worked. After 3+ failed fixes, question the architecture.
| Phase | Key Activities | Success Criteria |
|---|---|---|
| 1. Root Cause | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
| 2. Pattern | Find working examples, compare | Identify differences |
| 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis |
| 4. Implementation | Create test, fix, verify | Bug resolved, tests pass |
If systematic 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 pollingRelated skills:
Bug found? Write a failing test FIRST. Then fix.
1. Write the smallest test that reproduces the bug
2. Run it — watch it fail (RED)
3. Implement the fix
4. Run it — watch it pass (GREEN)
5. Commit both the test and the fix together
The test is your proof the bug existed. The fix is your proof it's gone. Without step 2, you don't know if the test actually tested the bug. Without both committed together, the regression protection is incomplete.
Never fix bugs without a test. A fix without a test is just hope.
From debugging sessions: