Skip to content
Back to skills

Collection

ASecurity

Four-phase debugging framework ensuring root cause investigation before fixes. Never jump to solutions. USE WHEN encountering bugs, test failures, unexpected behavior, or when fixes fail repeatedly.

  • 24 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
code-qualitybashtestingdebugginggitperformance

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

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

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-c3df40b0/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-c3df40b0)

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: Four-phase debugging framework ensuring root cause investigation before fixes. Never jump to solutions. USE WHEN encountering bugs, test failures, unexpected behavior, or when fixes fail repeatedly.
---

# Systematic Debugging

## The Iron Law

```
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION
```

**Why:** Random fixes waste time, create new bugs, mask real issues.

## When to Use

ANY technical issue: bugs, test failures, performance problems, build issues.

**ESPECIALLY when:**
- Under time pressure
- "Quick fix" seems obvious
- Tried multiple fixes already
- Don't fully understand issue

## Four Phases (MUST complete in order)

### Phase 1: Root Cause Investigation

**BEFORE any fix:**

1. **Read errors completely** - Don't skip stack traces
2. **Reproduce consistently** - Exact steps, reliable trigger
3. **Check recent changes** - Git diff, dependencies, config
4. **Gather evidence** - Add diagnostic logging at component boundaries
5. **Trace data flow** - Where does bad value originate?

**Multi-component systems:**
```bash
# Add logging at EACH layer
echo "=== Layer 1: Input ===" && log_input
echo "=== Layer 2: Processing ===" && log_process
echo "=== Layer 3: Output ===" && log_output
# Run ONCE to see WHERE it breaks
```

### Phase 2: Pattern Analysis

1. **Find working examples** - Similar code that works
2. **Compare references** - Read completely, don't skim
3. **Identify differences** - Every difference matters
4. **Understand dependencies** - Config, environment, assumptions

### Phase 3: Hypothesis & Testing

1. **Form hypothesis** - "I think X causes Y because Z"
2. **Test minimally** - Smallest change, one variable
3. **Verify** - Worked? → Phase 4. Didn't work? → New hypothesis
4. **When uncertain** - Say "I don't understand X"

### Phase 4: Implementation

1. **Create failing test** - Automated if possible
2. **Implement single fix** - Address root cause only
3. **Verify** - Tests pass, issue resolved, no new breakage

**If fix doesn't work:**
- Fixes tried < 3: Return to Phase 1
- **Fixes tried ≥ 3: STOP - Question architecture**
  - Pattern might be fundamentally wrong
  - Discuss with human before more fixes

## Red Flags - STOP & Follow Process

Catch yourself thinking:
- "Quick fix now, investigate later"
- "Just try X and see"
- "Skip the test, manually verify"
- "Probably X, let me fix"
- "One more fix" (after 2+)
- "Each fix reveals new problems"

**ALL → Return to Phase 1**

## Common Excuses

| Excuse | Reality |
|--------|---------|
| "Too simple for process" | Simple bugs have root causes too |
| "Emergency, no time" | Systematic is FASTER than guessing |
| "Just try first" | First fix sets bad pattern |
| "Test after confirming" | Untested fixes don't stick |
| "Multiple fixes save time" | Can't isolate, causes new bugs |

## Quick Reference

| Phase | Activities | Success |
|-------|-----------|---------|
| 1. Root Cause | Read, reproduce, check, gather evidence | Understand WHAT & WHY |
| 2. Pattern | Find working, compare | Identify differences |
| 3. Hypothesis | Theory, test minimally | Confirmed or new |
| 4. Implementation | Test, fix, verify | Resolved, tests pass |

## Real Impact

- Systematic: 15-30 min to fix
- Random: 2-3 hours thrashing
- First-time success: 95% vs 40%

---

**Complete guide:** `read .claude/skills/workflows/systematic-debugging/SKILL.md` (original 296 lines)

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

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…