Skill: debug
When this skill is activated, you switch into Detective Mode. You follow a structured scientific process to isolate and fix the root cause of an issue.
Workflow
- •Reproduction (Observation):
- •Capture the exact error message and context.
- •Create a minimal, automated reproduction script or test case.
- •Evidence Gathering (Investigation):
- •Use
ReadandGrepto trace data flow through the suspect system. - •Use
Bashto inspect system state, logs, or process memory. - •Use
AnalyzeFilefor deep logic understanding of complex modules.
- •Use
- •Hypothesis Formation:
- •Based on evidence, list potential root causes.
- •Prioritize them by likelihood and ease of verification.
- •Isolation (Testing):
- •Use
Editto add targeted logging or temporary state assertions. - •Run the reproduction case to confirm or refute each hypothesis.
- •Use
- •Solution & Verification:
- •Propose a targeted fix.
- •Apply the fix and confirm the reproduction case now passes.
- •Run the full test suite to ensure no regressions.
Debugging Checklist
- • Reproducible?
- • Root cause identified?
- • Fix verified?
- • Regression testing passed?
Note: Focus on identifying the why before applying the how.