Skip to content
Skillpedia
General coding8.2k · #12541

systematic-debugging

What it does

This skill gives your AI a structured way to track down bugs instead of guessing. It is for developers facing complex problems whose cause is not obvious.

When to use it

  • ✓When a bug keeps coming back after quick fixes that did not solve it.
  • ✓When you need to understand the root cause of a problem before changing code.
  • ✓When an issue shows up only in some environments and you need to narrow it down.

Skill link

https://github.com/vudovn/ag-kit/blob/main/.agents/skills/systematic-debugging/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/vudovn/ag-kit/blob/main/.agents/skills/systematic-debugging/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“This login error only happens sometimes. Debug it step by step and find the real cause before changing anything.”

5 new skills a week. 1 minute to read.

How it works

The skill asks the AI to reproduce the problem reliably first, narrow down where it comes from, trace the root cause with the five whys, and then confirm the fix works.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Systematic Debugging

Source: obra/superpowers

Overview

This skill provides a structured approach to debugging that prevents random guessing and ensures problems are properly understood before solving.

4-Phase Debugging Process

Phase 1: Reproduce

Before fixing, reliably reproduce the issue.

## Reproduction Steps
1. [Exact step to reproduce]
2. [Next step]
3. [Expected vs actual result]

## Reproduction Rate
- [ ] Always (100%)
- [ ] Often (50-90%)
- [ ] Sometimes (10-50%)
- [ ] Rare (<10%)

Phase 2: Isolate

Narrow down the source.

## Isolation Questions
- When did this start happening?
- What changed recently?
- Does it happen in all environments?
- Can we reproduce with minimal code?
- What's the smallest change that triggers it?

Phase 3: Understand

Find the root cause, not just symptoms.

## Root Cause Analysis
### The 5 Whys
1. Why: [First observation]
2. Why: [Deeper reason]
3. Why: [Still deeper]
4. Why: [Getting closer]
5. Why: [Root cause]

Phase 4: Fix & Verify

Fix and verify it's truly fixed.

## Fix Verification
- [ ] Bug no longer reproduces
- [ ] Related functionality still works
- [ ] No new issues introduced
- [ ] Test added to prevent regression

Debugging Checklist

## Before Starting
- [ ] Can reproduce consistently
- [ ] Have minimal reproduction case
- [ ] Understand expected behavior

## During Investigation
- [ ] Check recent changes (git log)
- [ ] Check logs for errors
- [ ] Add logging if needed
- [ ] Use debugger/breakpoints

## After Fix
- [ ] Root cause documented
- [ ] Fix verified
- [ ] Regression test added
- [ ] Similar code checked

Common Debugging Commands

# Recent changes
git log --oneline -20
git diff HEAD~5

# Search for pattern
grep -r "errorPattern" --include="*.ts"

# Check logs
pm2 logs app-name --err --lines 100

Anti-Patterns

❌ Random changes - "Maybe if I change this..." ❌ Ignoring evidence - "That can't be the cause" ❌ Assuming - "It must be X" without proof ❌ Not reproducing first - Fixing blindly ❌ Stopping at symptoms - Not finding root cause

FAQ

What are the four phases?

Reproduce, isolate, understand the root cause, and fix and verify.

Why reproduce the bug before fixing it?

The skill says a problem must be reliably reproduced first, so the AI does not guess at fixes.

Does it require a regression test?

Yes. The fix verification checklist includes adding a test to prevent the bug from returning.

Details

Original description by the author

4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.

repo: vudovn/ag-kit

Popularity

GitHub stars
8.2k
Ranking position
#12541
License
MIT
Updated
10/18/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills