Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Write tests that catch real regressions — behavior-focused, minimal mocking, edge cases chosen from the code's actual branches. Use when adding tests for new code or backfilling tests for a fix.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 6% | 0% |
A test's value is the bug it catches later. Test behavior through the public surface, not implementation details — a good test survives a refactor; a bad one breaks with it.
runner, naming, setup helpers and assertion idioms exactly.
and installs the rest — readable as a spec when the suite prints.
function: every if, every early return, every catch is a candidate. Priority order:
zero/negative, unicode)
verify it actually fails by stashing the fix once)
randomness). If a test needs four mocks, the unit is wrong — test one level higher. For clock/randomness, inject (now, seed) rather than patching globals.
truthiness; add a message when the assertion isn't self-explanatory (assert.ok(hit1 >= 0.88, 'ranking change regressed recall')).
mkdtemp,fresh fixtures) and cleans up. Order-dependence is a flake factory.
Other measured skills in the registry, with their headline benchmark lift.