Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

diagnosing-bugs

/diagnosing-bugs

Stosuje dyscyplinę debugowania opartą na dziewięciu regułach Davida Agansa: jedna zmiana naraz, dziennik i weryfikacja poprawki.

Repozytorium
doctrine ↗
Licencja
MIT
Ostatnia zmiana repozytorium
11.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 11.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Stosuje dyscyplinę debugowania opartą na dziewięciu regułach Davida Agansa: jedna zmiana naraz, dziennik i weryfikacja poprawki.

Wyzwalacze z opisu

diagnosedebug this
Oryginalny opis (EN)

Systematic debugging discipline based on David Agans' nine rules, understand the system, reproduce reliably, bisect the search space, change one variable at a time, keep an audit trail, and never declare a fix done until it's verified against the original failure. Use when the user reports something broken, throwing, failing, or slow, or says "diagnose" / "debug this".

Jak działa

  1. Rule 1: Understand the system
  2. Rule 2: Make it fail, then look before you theorize
  3. Rule 3: Divide and conquer
  4. Rule 4: Change one thing at a time
  5. Rule 5: Keep an audit trail
  6. Rule 6: Check the plug
  7. Rule 7: Get a fresh view when stuck
  8. Rule 8: If you didn't fix it, it ain't fixed
  9. Done when
Sekcje z nagłówków SKILL.md, w oryginale · 54 linii, 884 słów
Podgląd SKILL.md
---
name: diagnosing-bugs
description: Systematic debugging discipline based on David Agans' nine rules, understand the system, reproduce reliably, bisect the search space, change one variable at a time, keep an audit trail, and never declare a fix done until it's verified against the original failure. Use when the user reports something broken, throwing, failing, or slow, or says "diagnose" / "debug this".
---

# Diagnosing Bugs

Debugging is not guessing with extra steps; it's a search problem, and a search problem has a systematic solution: understand the space you're searching, reproduce the failure on demand, shrink the search space by half at a time, and change exactly one thing per experiment so cause and effect stay unambiguous. Every rule below traces back to Agans' *Debugging: The 9 Indispensable Rules*; treat them as a sequence, not a menu to pick from.

**Redact secrets before showing any command, log, or captured artifact**: same discipline as `secure-coding`'s Phase 3: replace credentials with `<REDACTED>`, quote only the lines carrying real signal from anything with auth headers or full payloads.

## Rule 1: Understand the system

Before touching anything, know the normal path the failing code should take: read `CONTEXT.md` or equivalent domain docs if they exist, trace the flow from entry point to the point of failure, and know what "correct" looks like well enough to recognize it. A theory formed without this is a guess with the system's real shape substituted by an assumed one.

## Rule 2: Make it fail, then look before you theorize

**Reproduce on demand first.** A bug that only happens "sometimes, somewhere in prod" isn't diagnosable yet; build the smallest repeatable trigger: a failing test, a script, a request replayed against a dev instance. For a flaky/non-deterministic failure, the goal isn't a clean 100% repro but a **high enough reproduction rate to observe**: loop it, add stress, narrow timing windows, until it fails often enough to study.

**Then look, don't theorize.** With a reproducible failure in hand, inspect the actual evidence (logs, state, a debugger breakpoint) before forming a hypothesis. A theory built by staring at code without first looking at what the system actually did is the single most common way to burn time chasing the wrong cause.

## Rule 3: Divide and conquer

Shrink the suspect region by bisecting it, not by scanning it linearly:

- **Across code:** binary-search the call stack or commit history (`git bisect`): is the bug present at the midpoint between known-good and known-bad?
- **Across input:** shrink a large failing input to the smallest one that still fails, cutting roughly half at a time.
- **Across the system:** if the failure could be in any of several components, test the middle of the chain first (does data arrive there correctly?) rather than starting at one end and walking through every component in order.

Each bisection step is itself an experiment: apply Rule 4 to it.

## Rule 4: Change one thing at a time

Every experiment changes exactly one variable and keeps everything else pinned. Two simultaneous changes (a code edit and an environment change; a config flip and a data change) make it impossible to attribute the resulting behavior to either one; a "fix" applied this way might be doing nothing, or might be masking a second, still-live bug.

## Rule 5: Keep an audit trail

Write down every experiment and its result as you go, including the negative ones; "tried X, no change" is information, and without a record it gets re-tried by mistake an hour later. Tag any temporary debug instrumentation with a unique, greppable prefix so cleanup at the end is a single search, not a memory exercise. Write the audit trail and final explanation without em dashes, using a comma, colon, period, or a reworded sentence instead.

## Rule 6: Check the plug

Verify the boring, obvious assumptions before trusting an elaborate theory; is the service actually running, is the config pointing at the environment you think it is, is the clock right, is the code you're reading actually the code that's deployed. A sophisticated hypothesis built on top of a false boring assumption wastes far more time than the thirty seconds it takes to check the assumption first.

## Rule 7: Get a fresh view when stuck

If several bisection/hypothesis cycles haven't converged, stop and explain the bug out loud to someone else, or write it out as if explaining it to them (rubber-duck works even with no one there to hear it). Articulating the full chain of evidence out loud routinely surfaces the gap in reasoning that silent re-reading doesn't.

## Rule 8: If you didn't fix it, it ain't fixed

A fix isn't done because the code changed and looks right; it's done when the original reproduction from Rule 2 now passes, and only then. Turn that reproduction into a regression test at a real seam (see `tdd` for what makes a seam correct) so the same failure can't silently return. If no correct seam exists for a regression test, that absence is itself a finding; flag it, since it means the architecture is what's letting this class of bug reach production undetected.

## Done when

- [ ] The failure has a reliable (or high-rate, for flaky bugs) reproduction; a command, script, or test you've actually run.
- [ ] The search space was bisected, not scanned; each experiment changed exactly one variable.
- [ ] The audit trail shows what was tried, including dead ends, and all temporary instrumentation is removed.
- [ ] The original repro now passes, and a regression test locks it down at a correct seam (or the absence of one is explicitly flagged).
Pliki w paczce (2)
  • SKILL.md 6 KB
  • agents/openai.yaml 1 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · aethrox/doctrine90MIT
VincenzoImp/pitcrew100MIT
FrancoStino/opencode-skills-collection100MIT
yuan88964/RelayStudio100MIT
byheaven/byheaven-skills100MIT
sickn33/agentic-awesome-skills100MIT
BaSui01/snow-app-skills100MIT
vahaah/astack100MIT
alexboo86/booharness100MIT

Migawka bazy z 13.11.2026 · wersja paczki 8cf9803213ac (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 85code-debug
    Prowadzi systematyczne szukanie przyczyny błędów, zawieszeń i spowolnień: najpierw powtarzalny test, potem jedna zmiana naraz i test regresji.
  • 90diagnose
    Diagnozuje trudne błędy i regresje wydajności pętlą od reprodukcji do testu regresji, gdy coś działa źle, rzuca wyjątki, zawodzi lub działa wolno.
  • 90diagnose
    Diagnozuje trudne błędy i regresje wydajności pętlą: odtworzenie, zawężenie, hipotezy, pomiar, poprawka i test.
  • 90debug
    Prowadzi zdyscyplinowaną pętlę diagnozy dla trudnych błędów i regresji wydajności, gdy coś jest zepsute, rzuca wyjątki, zawodzi lub działa wolno.
  • 100systematic-debugging-engineering
    Opisuje praktykę debugowania: odtwarzanie usterki, zawężanie, testowanie jednej hipotezy naraz i naprawę przyczyny.
  • 100diagnose
    Prowadzi zdyscyplinowaną pętlę diagnozy trudnych błędów i regresji wydajności: odtworzenie, minimalizacja, hipoteza, instrumentacja, poprawka i test regresji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.