Skip to content
Back to skills

Systematic Debugging

ASecurity

4-phase root cause investigation — observe, hypothesize, test, implement. Prevents trial-and-error debugging and enforces a 3-fix limit before reassessment.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
developmentdebugginggit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Vimalk0703/shipworthy --skill systematic-debugging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Systematic Debugging?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Systematic Debugging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vimalk0703-systematic-debugging/badge)](https://www.skillsdirectory.com/skills/vimalk0703-systematic-debugging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: systematic-debugging
description: 4-phase root cause investigation — observe, hypothesize, test, implement. Prevents trial-and-error debugging and enforces a 3-fix limit before reassessment.
invoke_when: Use when debugging a bug report, investigating a failing test, diagnosing unexpected behavior, or when previous fixes have not resolved the issue.
---

# Systematic Debugging

## The Anti-Pattern This Prevents

Trial-and-error debugging: change something, see if it works, repeat. This approach takes 2-3 hours and has a 50% first-time fix rate. Systematic debugging takes 15-30 minutes with a 95% first-time fix rate.

## The 4 Phases

### Phase 1: Observe
**Gather evidence before forming theories.**
- What exactly is the symptom? (error message, wrong output, crash)
- When does it happen? (always, sometimes, only in production)
- What changed recently? (git log, recent deploys, config changes)
- Can you reproduce it reliably?
- Read the FULL error message and stack trace

### Phase 2: Hypothesize
**Form testable theories based on evidence.**
- What could cause this symptom?
- List 2-3 hypotheses, ranked by likelihood
- Each hypothesis must be testable — "something is wrong" is not a hypothesis
- Consider: is this a code bug, a data bug, a config bug, or an environment bug?

### Phase 3: Test
**Test each hypothesis methodically.**
- Start with the most likely hypothesis
- Design a test that would CONFIRM or ELIMINATE the hypothesis
- Run the test. Read the results carefully.
- If confirmed: proceed to Phase 4
- If eliminated: move to the next hypothesis

### Phase 4: Implement
**Fix the root cause, not the symptom.**
- Write a test that reproduces the bug FIRST (TDD applies to bugs too)
- Implement the fix
- Run the reproducing test — it should pass now
- Run the full test suite — nothing else should break
- Verify the fix in the original context where the bug was observed

## The 3-Fix Rule

**If 3 attempted fixes don't resolve the issue, STOP.**

You're likely:
- Fixing a symptom, not the root cause
- Working with wrong assumptions
- Dealing with an architectural issue that requires a different approach

When you hit the 3-fix limit:
1. Step back and re-examine your assumptions
2. Re-read the error messages and logs from scratch
3. Consider whether the bug is in a different layer than you're looking at
4. Discuss with the user before proceeding

## Common Debugging Mistakes

1. **Changing multiple things at once** — change one thing, test, repeat
2. **Not reading the full error** — the answer is often in the stack trace
3. **Assuming the bug is where you're looking** — it's often one layer away
4. **Not checking recent changes** — `git log` and `git diff` are your friends
5. **Fixing the symptom** — "add a null check" without asking why it's null

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…