debuglisted
Install: claude install-skill hiyabh/claude-skills
# Debug — Root-Cause Fix with Proof
## Purpose
Turn a symptom into a proven root cause and a verified fix. Covers three entry
points: a **failing test**, a **production error report**, and a **build error**.
This skill follows a strict bug-handling methodology — do not skip its
phases; in particular **never fix without a failing-state proof, and never declare
fixed without a green proof**.
**Fundamental rule:** don't trust the report — reproduce and prove it first.
**Language:** explanations in Hebrew; code in English.
---
## Mode 1 — Failing test → red → green + explanation
Trigger: "the UserAuth test is failing, find out why and fix it".
1. **Reproduce** — run that test, read the full failure output (message, stack,
assertion diff). Confirm it fails now (this is your RED evidence).
2. **Root cause** — trace backwards from the failing assertion to the origin. Read
the code under test *and* the test itself. Apply the 5 Whys. Check `git log`/blame:
did a recent change break it? Is the test asserting the right thing?
3. **Decide** who's wrong — the code or the test — with a reason, not a guess.
4. **Surgical fix** — smallest change at the root cause; no scope-widening refactors.
5. **Verify GREEN** — re-run the test (must pass), then the **full suite** for
regressions, then build/lint. A regression is a new bug — block on it.
6. **Explain** in Hebrew: root cause in one sentence, the fix, RED→GREEN evidence,
files touched, and whether the same pattern exists