Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -68% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -63% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -67% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 5% | 0% |
TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle — consult them before and during the loop, not after.
When exploring the codebase, read CONTEXT.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.
See tests.md for examples and mocking.md for mocking guidelines.
A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
Test only at pre-agreed seams. Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything — agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.
Ask: "What's the public interface, and which seams should we test?"
When the shape of that interface is itself in question — how deep the module is, where the seam belongs, what the interface should expose — use the /codebase-design skill for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run.
expect(add(a, b)).toBe(a + b), a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth — a known-good literal, a worked example, the spec.code-review skill), not the red → green implementation cycle.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 17,359 | 3,272 | -81% | 1 | 1 | 0% | 3,977 | 1,278 | -68% | 0 | 0 | — |
case-02 | fail→pass | 19,888 | 7,674 | -61% | 1 | 1 | 0% | 4,100 | 1,532 | -63% | 0 | 0 | — |
case-03 | fail→fail | 9,495 | 2,061 | -78% | 1 | 1 | 0% | 1,676 | 1,058 | -37% | 0 | 0 | — |
case-04 | fail→fail | 5,260 | 6,256 | +19% | 1 | 1 | 0% | 821 | 1,644 | +100% | 0 | 0 | — |
case-05 | pass→pass | 17,296 | 14,620 | -15% | 1 | 1 | 0% | 2,827 | 3,156 | +12% | 0 | 0 | — |
case-06 | pass→pass | 14,785 | 9,020 | -39% | 1 | 1 | 0% | 2,628 | 2,491 | -5% | 0 | 0 | — |
case-07 | pass→pass | 10,185 | 7,210 | -29% | 1 | 1 | 0% | 2,087 | 2,031 | -3% | 0 | 0 | — |
case-08 | fail→pass | 19,335 | 4,397 | -77% | 1 | 1 | 0% | 4,759 | 1,584 | -67% | 0 | 0 | — |
case-09 | pass→pass | 10,959 | 6,587 | -40% | 1 | 1 | 0% | 2,068 | 1,912 | -8% | 0 | 0 | — |
case-10 | fail→pass | 9,760 | 3,671 | -62% | 1 | 1 | 0% | 2,063 | 1,374 | -33% | 0 | 0 | — |
case-11 | fail→pass | 13,335 | 9,738 | -27% | 1 | 1 | 0% | 2,612 | 2,752 | +5% | 0 | 0 | — |
case-17 | fail→pass | 13,264 | 7,979 | -40% | 1 | 1 | 0% | 2,326 | 2,211 | -5% | 0 | 0 | — |
case-12 | pass→pass | 7,581 | 3,943 | -48% | 1 | 1 | 0% | 1,461 | 1,557 | +7% | 0 | 0 | — |
case-13 | fail→pass | 10,715 | 5,828 | -46% | 1 | 1 | 0% | 2,065 | 1,908 | -8% | 0 | 0 | — |
case-14 | fail→pass | 11,774 | 4,864 | -59% | 1 | 1 | 0% | 2,145 | 1,653 | -23% | 0 | 0 | — |
case-15 | pass→pass | 12,860 | 7,608 | -41% | 1 | 1 | 0% | 2,274 | 2,081 | -8% | 0 | 0 | — |
case-16 | pass→pass | 9,623 | 4,402 | -54% | 1 | 1 | 0% | 1,773 | 1,531 | -14% | 0 | 0 | — |
case-18 | pass→pass | 10,241 | 8,210 | -20% | 1 | 1 | 0% | 1,883 | 2,212 | +17% | 0 | 0 | — |
case-19 | pass→pass | 11,683 | 4,807 | -59% | 1 | 1 | 0% | 2,153 | 1,748 | -19% | 0 | 0 | — |
case-20 | pass→pass | 9,426 | 7,032 | -25% | 1 | 1 | 0% | 1,732 | 1,940 | +12% | 0 | 0 | — |
case-21 | pass→pass | 9,191 | 5,195 | -43% | 1 | 1 | 0% | 1,559 | 1,625 | +4% | 0 | 0 | — |
case-22 | fail→pass | 8,113 | 3,378 | -58% | 1 | 1 | 0% | 1,542 | 1,359 | -12% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +41 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/3/2026 | +35% |
Other measured skills in the registry, with their headline benchmark lift.