← ClaudeAtlas

diagnose-before-editinglisted

Use when behavior fails, flakes, or slows down, and nobody knows the cause yet. Also use it when the user says "why does this fail?", "it worked yesterday", or "this got slow". Reproduces the failure, makes it smaller, and tests one cause at a time until one cause predicts the symptom. Then fixes the cause at its origin, not the symptom. Not for scoping a fix whose cause you already know (use `scope-confirmed-changes`).
theonly1me/shadowclone · ★ 26 · AI & Automation · score 85
Install: claude install-skill theonly1me/shadowclone
# Diagnose Before Editing ## Use when Something fails, throws, flakes, or slows down, and nobody has shown the cause yet. A change before the cause is known can hide the bug instead of fixing it. ## Gates 1. Can you make the failure happen on demand with one command or test? 2. Did you write down the input, the actual result, and the expected result? 3. For each suspected cause, did you name an observation that would prove it wrong? 4. Did you change one variable in each probe? 5. Does the cause that you found predict the symptom, and does a controlled change remove it? 6. Did you remove each temporary log line and probe before the handoff? ## Process 1. Find the fastest command that reaches the failing path. Run it until you see the failure. 2. Remove inputs and steps while the failure stays. Stop when no further removal keeps it. 3. Trace the state from the input. Find the first place where a correct value becomes wrong. 4. List the possible causes. For each one, write the observation that would rule it out. 5. Test one cause at a time with a debugger, a log line, a timer, or a controlled input. 6. When one cause predicts the symptom, fix it at its origin. 7. Run the small and the original reproductions. Keep one as a regression test where practical. For a flaky failure, measure how often it happens. Control the clock, the random values, the concurrency, and the outside responses. For a slow path, measure a baseline first, and measure the suspected cost before you ch