Debug issues with a four-phase method that finds root causes before fixes.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "Systematic Debugging" skill from askskill: 1. Download https://raw.githubusercontent.com/obra/clank/main/skills/debugging/systematic-debugging/SKILL.md 2. Save it as ~/.claude/skills/systematic-debugging/SKILL.md 3. Reload skills and tell me it's ready
Use the four phases of systematic debugging to analyze this production API 500 error: first define the problem and scope, then list possible root causes, design validation steps, and finally recommend fixes and regression checks. Known facts: after last night's release, the order creation API intermittently returns 500, and logs show database connection timeouts.
A phase-structured debugging analysis with problem definition, hypotheses, validation steps, root cause judgment, and fix recommendations.
I have a Python data-cleaning script whose output row count is 30% lower than last week. Do not jump to code changes. Follow a systematic debugging process: define the anomaly, check input changes, propose root-cause hypotheses, plan validation experiments, and only then suggest fixes.
A debugging plan that avoids blind changes and helps determine whether the issue comes from data sources, logic changes, or the runtime environment.
Handle this like a systematic debugging expert: after a new deployment, average response time rose from 200ms to 900ms. Respond in four phases: collect symptoms and boundaries, propose and prioritize root-cause hypotheses, explain how to validate each one, and then provide the lowest-risk fix plan.
An actionable performance troubleshooting framework focused on evidence-driven root cause isolation and low-risk remediation.
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.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1, you cannot propose fixes.
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 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
Example (multi-layer system):
# Layer 1: Workflow
echo "=== Secrets available in workflow: ==="
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 script
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
# Layer 4: Actual signing
codesign --sign "$IDENTITY" --verbose=4 "$APP"
This reveals: Which layer fails (secrets → workflow ✓, workflow → build ✗)
Trace Data Flow
WHEN error is deep in call stack:
See skills/root-cause-tracing for backward tracing technique
Quick version:
Find the pattern before fixing:
Find Working Examples
Compare Against References
Identify Differences
Understand Dependencies
Scientific method:
…
Helps developers handle code review feedback with rigor, judgment, and effective responses.
Validate external inputs to prevent errors, failures, and security issues.
Help developers limit variable scope to improve code clarity and maintainability.
Dispatch multiple agents in parallel to investigate and fix independent issues.
Helps developers finish a branch with merge, PR, or cleanup workflows.
Execute implementation plans with task-specific subagents and code review checkpoints.
Systematically investigate bugs before fixing them with a four-phase debugging framework.
Systematically investigate bugs, test failures, and unexpected behavior before fixing.
Trace bugs backward through call stacks to find the original trigger.
Systematically triage failures and fix broken builds or unexpected runtime issues.
Systematically reproduce, isolate, diagnose, and fix tricky software or environment issues.
Create debug tests and iterate to reliably reproduce and diagnose tricky bugs.