Skip to content
Back to skills

Systematic Debugging

ASecurity

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

  • 3 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added October 25, 2026
ai-agentstestingdebugginggit

Security analysis

A100/100

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

Scanned October 25, 2026

npx -y skills add renanflustosa/octo-cluster --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/renanflustosa-systematic-debugging/badge)](https://www.skillsdirectory.com/skills/renanflustosa-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: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
---

# Systematic Debugging

> Adapted from [obra/superpowers](https://github.com/obra/superpowers) (MIT). Deep dives: `references/` in this directory.

## Iron Law

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

Complete Phase 1 before proposing fixes. Use for test failures, production bugs, build failures, perf issues — especially under time pressure or after a failed fix.

## Phase 1: Root Cause Investigation

1. **Read errors** — stack traces, line numbers, codes; do not skip warnings.
2. **Reproduce** — exact steps; if flaky, gather data instead of guessing.
3. **Recent changes** — git diff, deps, config, environment.
4. **Multi-component systems** — log at each boundary (in/out, config propagation); run once to see *where* it breaks.
5. **Trace data flow** — bad value upstream? See [root-cause-tracing.md](references/root-cause-tracing.md).

## Phase 2: Pattern Analysis

Find working examples in the codebase. Compare broken vs working line by line. Read reference implementations fully before adapting.

## Phase 3: Hypothesis and Testing

One hypothesis: "X is the cause because Y." Smallest test change; one variable. Failed? New hypothesis — do not stack fixes.

## Phase 4: Implementation

1. Failing repro (test or script) before the fix.
2. Single fix at root cause — no bundled refactors.
3. Verify fix and no regressions.
4. **≥ 3 failed fix attempts** → stop; question architecture with operator before fix #4.

After root cause found, optional hardening: [defense-in-depth.md](references/defense-in-depth.md), [condition-based-waiting.md](references/condition-based-waiting.md).

## Red flags — STOP, return to Phase 1

- "Quick fix now, investigate later"
- "Just try X and see"
- Multiple changes before one verified hypothesis
- Proposing fixes before tracing data flow
- "One more attempt" after 2+ failures

| Excuse | Reality |
|--------|---------|
| "Too simple for process" | Simple bugs still have root causes |
| "No time" | Systematic beats thrashing |
| "I'll test after" | Repro first or fixes do not stick |

## Output (`/debug`)

Root cause (1 line) + fix + proof command, ≤30 lines.

## Quick reference

| Phase | Success |
|-------|---------|
| 1 Root cause | Know WHAT and WHY |
| 2 Pattern | Differences identified |
| 3 Hypothesis | Confirmed or replaced |
| 4 Implementation | Bug resolved, proof run |

If truly environmental/external after full investigation: document findings, add handling/monitoring — do not skip phases to get there.

Files in this skill

  • SKILL.md2.6 KB
  • references/condition-based-waiting.md3.2 KB
  • references/defense-in-depth.md3.6 KB
  • references/root-cause-tracing.md5.2 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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.