Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

debugging

/debugging

Stosuje metodę opartą na hipotezach (odtworzenie, izolacja, instrumentacja, dowód) zamiast zgadywania, gdy przyczyna błędu jest nieznana, z użyciem profilera, debuggera i logów.

Licencja
MIT
Ostatnia zmiana repozytorium
24.10.2026

Ocena i bezpieczeństwo

100/ 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ść35 / 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
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 24.10.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 metodę opartą na hipotezach (odtworzenie, izolacja, instrumentacja, dowód) zamiast zgadywania, gdy przyczyna błędu jest nieznana, z użyciem profilera, debuggera i logów.

Wyzwalacze z opisu

no idea why this is failingworks locally but not in prodthis test fails intermittentlyit got slower and i don
Oryginalny opis (EN)

Use when a bug's cause is unknown. Applies a hypothesis-driven method — reproduce, isolate, instrument, prove — instead of speculative edits, and covers profiler, debugger, and log-based investigation. Trigger on "no idea why this is failing", "works locally but not in prod", "this test fails intermittently", "it got slower and i don't know why". Do not use once the cause is known and needs a tested fix — see the bug-fix-protocol skill.

Jak działa

  1. Purpose
  2. When to Use
  3. Capabilities
  4. Inputs
  5. Outputs
  6. Workflow
  7. Best Practices
  8. Examples
  9. Notes
Sekcje z nagłówków SKILL.md, w oryginale · 82 linii, 676 słów
Podgląd SKILL.md
---
name: debugging
description: Use when a bug's cause is unknown. Applies a hypothesis-driven method — reproduce, isolate, instrument, prove — instead of speculative edits, and covers profiler, debugger, and log-based investigation. Trigger on "no idea why this is failing", "works locally but not in prod", "this test fails intermittently", "it got slower and i don't know why". Do not use once the cause is known and needs a tested fix — see the bug-fix-protocol skill.
metadata:
  category: development
  version: 1.0.0
  tags: [debugging, root-cause, diagnostics, profiling]
---

# Debugging

## Purpose

Find the actual cause of a defect, not a change that makes the symptom disappear. Debugging is a search problem, and the method is binary search over hypotheses.

## When to Use

- A test fails and the reason is not obvious from the assertion.
- Production behavior differs from local behavior.
- An intermittent or timing-dependent failure.
- A performance regression with no obvious cause.
- A bug that "came back" after being fixed.

## Capabilities

- Deterministic reproduction, including of flaky failures.
- Bisection over code history, input space, and configuration.
- Instrumentation: strategic logging, breakpoints, tracing, core dumps.
- Concurrency debugging: race detectors, deadlock analysis, lock ordering.
- Performance debugging: CPU and allocation profiles, flame graphs.

## Inputs

- The failure: error message, stack trace, failing test, or observed behavior.
- The last known-good state, if any.
- Environment differences between where it fails and where it does not.

## Outputs

- A reproduction that fails reliably.
- A stated root cause, with the evidence that proves it.
- A fix, plus a regression test that fails without the fix.

## Workflow

1. **Reproduce** — Reduce to the smallest input and shortest path that still fails. If you cannot reproduce it, you cannot verify a fix. For flaky failures, run in a loop until you have a failure rate.
2. **Read the evidence** — Read the entire stack trace, including the parts you have seen before. Read the actual error, not the one you assume it is.
3. **Form one hypothesis** — State it as a falsifiable claim: "the cache returns a stale value because the invalidation runs before the write commits."
4. **Test the hypothesis** — Add instrumentation that would distinguish true from false. Do not change behavior yet.
5. **Bisect** — If no hypothesis survives, bisect. `git bisect` over commits; comment out halves of the input; disable half the config.
6. **Prove the cause** — You have the cause when you can turn the bug on and off at will.
7. **Fix and regress** — Write the failing test first, then fix, then confirm the test passes and the rest still do.

## Best Practices

- Never change two things at once. You will not know which one mattered.
- "It works now" without an explanation means the bug is still there.
- Trust the machine over your memory of what the code does — read the code that is running, on the branch that is deployed.
- If the bug is in a dependency, prove it with a minimal script before reporting or working around it.
- Timing-dependent bugs are nearly always missing synchronization or an assumed ordering. Look for shared mutable state first.
- Delete instrumentation you added, or promote it to permanent, structured logging. Do not leave debug prints behind.

## Examples

**Hypothesis log for an intermittent failure:**

```text
Symptom : /checkout returns 500 approximately 1 in 40 requests under load.
Evidence: Stack trace shows NullPointerException in CartCache.get(); no error at low load.

H1: Cache eviction races with read.
    Test: log cache size + key on every get/put; run 500 concurrent requests.
    Result: FALSE — evictions never coincide with the failures.

H2: Cart is written by request thread but read by an async pricing task
    before the write commits.
    Test: log thread id and transaction id at write and at read.
    Result: TRUE — pricing task reads on a different connection, 3-8ms before commit.

Cause: Async task enqueued inside the transaction, executed outside it.
Fix  : Enqueue on transaction commit (after-commit hook).
Test : Regression test asserting the task is not enqueued until commit.
```

## Notes

- `git bisect run <script>` automates bisection completely when you have a scripted reproduction. It is the single highest-leverage debugging tool most engineers underuse.
- Heisenbugs that vanish under a debugger are usually timing or optimization-related. Reach for logging and race detectors instead of breakpoints.
- A bug that reappears was never fixed — the original fix addressed a symptom. Reopen the investigation rather than patching again.

Wersje

RepozytoriumWynikLicencja
Ta strona · nimadorostkar/Claude-Skills-collection100MIT
sentimony/skills100MIT
sentimony/skills100MIT
wrongstack/wrongstack100MIT
dxos/dxos100Apache-2.0
iliaal/ai-skills100MIT
t8jwscc7qy-sketch/foma-skills100Apache-2.0
arxdsilva/ai-loops100MIT
zts212653/clowder-ai100MIT

Migawka bazy z 13.11.2026 · wersja paczki 2197dc340e4c (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

  • 100acp-bug-fix
    Prowadzi przez naprawę błędu: odtworzenie, izolacja, najmniejsza poprawka i weryfikacja, zamiast zgadywania przyczyny i łatania kodu na chybił trafił.
  • 100systematic-debugging
    Prowadzi przez cztery etapy: odtworzenie, wyizolowanie, przyczyna i poprawka z testem regresji.
  • 91systematic-debugging
    Prowadzi systematyczne szukanie przyczyny błędu, niestabilnego testu, incydentu lub regresji wydajności, gdy przyczyna jest nieznana.
  • 90root-cause-debugging
    Prowadzi debugowanie oparte na hipotezach i dowodach, by znaleźć prawdziwą przyczynę błędu, awarii lub złego wyniku przed poprawką.
  • 100debug
    Prowadzi debugowanie oparte na hipotezach: odtworzenie błędu, badanie, naprawa i weryfikacja, także poza procesem plan, spec, build.
  • 90debugging-workflow
    Odtwarza, izoluje i naprawia niewyjaśnione awarie, regresje i niestabilne zachowanie, gdy przyczyna jest niepewna.

Uwagi i zgłoszenia

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