Bug-fix discipline — every defect has an etiology, the chain of cause that produced the observable fault; trace it before patching. Errors only grow: a bandaid leaks unless genuinely localized and leak-free. Walk the diagnostic ladder (presentation → proximate cause → API contract → isolated or systemic) before writing the fix. Use when authoring or reviewing any bug fix, regression patch, "quick fix" PR, or when deciding whether to ship, defer, or refactor.
75
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
The temptation in a bug fix is to suppress the symptom. The discipline is to know which fix you wrote: the one that addressed the cause, or the one that masked it. Every bug has an etiology — the chain of cause that produced the observable fault — and a fix is only honest once that chain has been traced.
Errors only grow. A bandaid leaks into adjacent call sites, and the next reader inherits both the original defect and the workaround that obscures it. Be fixated on the etiology; the symptom is what alerted you to the bug, not the bug itself. A bandaid is occasionally correct, but it is never the default.
Before writing the fix, walk the ladder. Each rung is a question the next rung depends on; skipping a rung produces a fix that doesn't know what it is.
Stating in the PR description which rung you stopped at — and why — keeps the review honest.
The wrong inference is "we cannot test it, so any fix will do." The correct inference is the opposite: untestable surfaces warrant more skepticism, not less.
Two conditions, both required:
Failing either, extract the underlying fix or defer. A bandaid guarded only by lore is debt the next reader inherits without context.
Sometimes the correct fix is no fix yet. Rare presentation, large refactor, leaky bandaid — defer, file the diagnostic-ladder findings, and revisit when the refactor lands. Deferring after the ladder, with the reasoning recorded, is engineering. Downgrading to a bandaid because the refactor felt expensive — and writing the PR as if the bandaid were the only option — is not.
The cost of the refactor is also frequently estimated, not measured. A thirty-minute investigation of the cause often reveals that the underlying fix is cheaper than the long tail of the bandaid it would have replaced.
2e0d276
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.