Skip to content
Skills Library
Programming · Analysis

debug-systematically

/debug-systematically

Use when a bug resists the first fix — reproduce it, bisect to the introducing change, test one hypothesis at a time, fix the root cause, and add a regression test.

Licence
MIT
Last repository change
23.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when a bug resists the first fix — reproduce it, bisect to the introducing change, test one hypothesis at a time, fix the root cause, and add a regression test.

Original author description

Use when a bug resists the first fix — reproduce it, bisect to the introducing change, test one hypothesis at a time, fix the root cause, and add a regression test.

How it works

  1. 1. Reproduce
  2. 2. Bisect to the introducing change
  3. 3. Test one hypothesis at a time
  4. 4. Fix the root cause
  5. 5. Add a regression test
  6. Verify
  7. When to deviate
Original SKILL.md headings · 50 lines, 364 words
SKILL.md preview
---
name: debug-systematically
description: Use when a bug resists the first fix — reproduce it, bisect to the introducing change, test one hypothesis at a time, fix the root cause, and add a regression test.
---

# Debug Systematically

Replaces the "try things until it works" loop with a falsifiable process (The Pragmatic Programmer).
Pairs with [write-clean-tests](../write-clean-tests/SKILL.md) — the regression test is the proof the bug
cannot return.

## 1. Reproduce

A bug you cannot reproduce you cannot fix or verify. Capture the exact input, environment and steps that
trigger it; if it is intermittent, add logging or run the loop until it fails. State the symptom in one
sentence, not the suspected cause.

## 2. Bisect to the introducing change

```bash
git log --oneline -20
git bisect start 2>/dev/null   # only if you have a known-good and known-bad commit
```

Narrow the search by halves: the commit that introduced it, the one input field that matters, the one
boundary value that flips it. The change that introduced the bug is the most reliable clue to its cause.

## 3. Test one hypothesis at a time

- Form a falsifiable prediction ("if X is the cause, then changing Y fixes it and nothing else does").
- Change one thing, observe, record. Never change several at once — you will not know which one worked.
- Prefer the simplest explanation that fits all the evidence; resist the theory you already believe.

## 4. Fix the root cause

Fix the *why*, not the symptom. Patching the output where it shows up leaves the cause to resurface
elsewhere. If the fix feels like a workaround, the cause is one level deeper.

## 5. Add a regression test

Write the test that fails on the old code and passes on the fix. That test is the proof the bug cannot
return, and the reviewer's evidence the fix is real.

## Verify

The symptom is gone under the exact reproduction, the bisect points to one change, and the regression
test fails on the reverted fix and passes on it. State the root cause and the fix in the note.

## When to deviate

- An incident in production: stop the bleeding first (roll back, feature flag off), then debug the cause
  off the hot path.
- A bug that reproduces only under a dependency's bug: fix or pin the dependency, do not build a shim.

Versions

The database has no other skills named debug-systematically.

Database snapshot: 13.11.2026 · package version 9e61a82cb389 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 86bug-hunt
    Diagnose and fix a bug, crash, or weird behavior systematically. Use when the user reports something broken, pastes an error, or says "it doesn't work". Reproduce first, one hypothesis and one change at a time, add a regression test.
  • 100debug
    Debug a bug, failing test or build, crash, or error. Reproduce it, find the root cause before proposing a fix, prove the fix with the smallest check, add a regression test. Use when something is broken and you need to know why.
  • 100fix
    Use when fixing a bug test-first: write a failing test to reproduce it, find the root cause, fix, and add a regression test.
  • 100hk-rca
    Walk a bug through Reproduce, Locate, Hypothesis, Failing Test, Fix, Verify Live, Document, and state the root cause in chat. A bug that will not reproduce takes Step 1's hard-bug branch: build a pass/fail loop, minimise, bisect, instrument. Triggers on: 'something is broken',…
  • 90fix-issue
    Use when fixing a GitHub issue — reproduce, trace root cause, fix, add regression test
  • 100root-cause-debugging
    Debug by finding the root cause before changing code: reproduce, read the full error, check what changed, form one hypothesis at a time and test it, write the failing test, then fix; with a hard stop after three failed fixes to question the approach. Use when a test fails, a bug…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.