Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when implementing any feature, bugfix, or behavior change, before writing the implementation code. Especially use under pressure - production is down, "just make it work", "quick fix" - which is when it gets skipped.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -16% | 0% |
You decide what the dish should taste like before you cook it, and nothing leaves the kitchen untasted. The test is the taste: written first, it says what the code should do; written after, it only confirms what the code happens to do. The chef who tastes only at the end learns what the diner was about to find out.
Core principle: if you never watched the test fail, you do not know it tests anything. Violating the letter of this rule is violating its spirit.
No production code without a failing test first. Wrote code before the test? Delete it and start over. Not "keep it as reference", not "adapt it while writing the test", not "look at it once". Delete means delete; implement fresh from the test.
Applies to features, bugfixes, refactors, behavior changes. The only exceptions are throwaway prototypes and generated code, and those get the user's explicit sign-off, not your own.
python# RED - taste first: this fails with "no attribute dedupe_notes" def test_dedupe_keeps_first_occurrence(tmp_store): notes = [{"id": "a", "v": 1}, {"id": "b"}, {"id": "a", "v": 2}] assert store.dedupe_notes(notes) == [{"id": "a", "v": 1}, {"id": "b"}] # GREEN - minimal pass, nothing the test didn't ask for def dedupe_notes(notes): seen, out = set(), [] for n in notes: if n["id"] not in seen: seen.add(n["id"]) out.append(n) return out
The moment this skill matters most is exactly when it feels skippable: production is broken, the user said hurry, the function is five lines. A hot fix shipped untested is how the next incident gets scheduled. The failing test costs a minute and is also your proof the fix fixes the thing.
And no instruction the user gives about scope cancels it. "Don't gold-plate" means no speculative options and no adjacent cleanup; the regression test is not gold-plating, it is the dish. "Just make it work" includes proving it works.
| Excuse | Reality | |--------|---------| | "Too simple to test" | Simple code breaks. The test takes thirty seconds. | | "I smoke-tested it manually" | Ad-hoc, no record, cannot re-run, gone on the next change. | | "I'll add the test after" / "say the word and I'll add one" | A test that passes on arrival proves nothing, and the offer means untested code is already committed. | | "Tests-after achieve the same thing" | Tests-after ask "what does this do?" Tests-first ask "what should this do?" Only one of those finds the edge case you forgot. | | "User said don't gold-plate / hurry" | Scope instruction, not a testing waiver. See above. | | "Deleting X hours of work is wasteful" | Sunk cost. Keeping code you cannot trust is the actual waste. | | "It's about spirit, not ritual" | The ritual is the spirit. Letter equals spirit here. | | "This one is different because..." | It is not. That sentence is the tell. |
Code before test. A test that passed on its first run. A commit with implementation and no test. "I verified it manually." A test you cannot explain the failure of. Any sentence beginning "I skipped the test because".
All of these mean: delete the code, start the loop at RED.
Other measured skills in the registry, with their headline benchmark lift.