fix-a-bug

Diagnose and fix software defects through reproduction-first testing and root-cause proof.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/oleg-vasilyev/FoolProof --skill fix-a-bug-oleg-vasilyev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fix-a-bug
Source: https://github.com/oleg-vasilyev/FoolProof/tree/main/.claude/skills/fix-a-bug
Command: npx skills add https://github.com/oleg-vasilyev/FoolProof --skill fix-a-bug-oleg-vasilyev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Fixing a bug by reading code first produces a plausible theory instead of the real fault, and fixes without reproduction cannot be proven to work. This Skill enforces a disciplined debugging workflow: reproduce the fault before reading code, turn the reproduction into a failing test, prove the cause with measurement, and sweep for the same defect shape elsewhere. ## Core Features & Use Cases - Reproduction-first diagnosis: Shrink the fault to the smallest input that still shows it, reproduce on the original platform, and treat failure to reproduce as a reportable finding rather than a licence to guess. - Failing-test-first fixing: Write the test before the fix, watch it go red, read the failure message, and place the test at the layer where the fault is still visible as data. - Cause proof and shape sweep: Measure instead of guessing after two hypotheses, calibrate new instruments against known answers, and grep for the fault's shape across src/, scripts/, e2e/, and docs. - Use Case: A Telegram bot truncates player names in a stats poster. Reproduce the truncation, write a spec asserting on the SVG string (not the rasterized PNG), watch it fail, fix the cause, then sweep for other render calls missing the same guard. ## Quick Start Ask the assistant to use the fix-a-bug skill to investigate and fix a reported defect, starting from a minimal reproduction and a failing test.

Frequently Asked Questions about fix-a-bug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a bug using a failing test first?▼

Write the test before the fix and watch it fail, which proves the test can actually see the fault. Read the failure message, not just the red color, and place the test at the layer where the fault is still visible as data rather than as a rendered output.

Why reproduce a bug before reading the code?▼

Reading code first produces a theory, and the code then appears to confirm it, leading you to a plausible fault near the real one. Reproducing first gives you evidence that cannot be argued with, and shrinking the reproduction proves which factors are irrelevant.

What should I do when a bug cannot be reproduced?▼

Treat the inability to reproduce as a finding and report it as one. A fix with no reproduction behind it cannot be shown to have worked, so never fix the most suspicious-looking line just to feel like action was taken.

How do I find other occurrences of the same bug in a codebase?▼

Grep for the fault's shape, not its symptom: the wrong call, the missing guard, or the wrong assumption across source, scripts, tests, and docs. Watch for ASCII-only word boundaries in patterns and renamed functions whose callers no compiler can see.

When should a bug fix also add an end-to-end test?▼

A bug that got past the unit tests is one of the cases that earns an end-to-end scenario, because the fault crossing a real seam is the evidence such a scenario asks for. The retrospective should also name which gate should have caught it.