Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Drive a feature with a disciplined test-driven development loop — red, green, refactor. Use when implementing a feature or fixing a bug and you want tests to lead, or when asked to 'do this with TDD' / write the test first. Produces a step-by-step red-green-refactor plan: the failing test to write first, the minimal code to pass it, and the refactor — one small cycle at a time.
.claude/skills/mohitagw15856-tdd-workflow/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -20% | 0% |
The failure mode of AI-assisted coding is writing a pile of code, then maybe some tests that rubber-stamp it. TDD inverts that: the test defines the behavior first, the code does the minimum to pass, then you refactor safely. This skill runs that loop with discipline — one small red-green-refactor cycle at a time, never jumping ahead to untested code.
Ask for these only if they aren't already provided:
Behavior list — the observable cases to drive out, ordered simplest → richest (happy path first, then edges/errors). Each becomes one cycle.
Then, for each cycle (do them one at a time, smallest first):
🔴 Red — the single failing test to write now (the actual test code), and why it fails (the behavior doesn't exist yet). One assertion of one behavior.
🟢 Green — the minimal code to make exactly that test pass — even if it's obvious/ugly. No extra features, no speculative generality.
🔵 Refactor — what to clean up now that it's green (naming, duplication, structure) with the test as the safety net. Skip if nothing's needed.
Run — the command to run the test(s) and what "passing" looks like.
End with: the next cycle's red test, and a note to commit at each green.
Test-Driven Development (Kent Beck): red → green → refactor, triangulation, one behavior per cycle.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 35,459 | 16,732 | -53% | 1 | 1 | 0% | 4,954 | 3,017 | -39% | 0 | 0 | — |
case-02 | fail→fail | 19,682 | 13,338 | -32% | 1 | 1 | 0% | 2,025 | 2,207 | +9% | 0 | 0 | — |
case-03 | fail→pass | 10,502 | 12,092 | +15% | 1 | 1 | 0% | 2,194 | 2,481 | +13% | 0 | 0 | — |
case-04 | pass→pass | 7,868 | 8,228 | +5% | 1 | 1 | 0% | 971 | 1,150 | +18% | 0 | 0 | — |
case-05 | fail→pass | 23,176 | 15,810 | -32% | 1 | 1 | 0% | 3,453 | 2,494 | -28% | 0 | 0 | — |
case-06 | fail→pass | 12,307 | 16,119 | +31% | 1 | 1 | 0% | 2,339 | 2,702 | +16% | 0 | 0 | — |
case-07 | pass→pass | 9,089 | 10,965 | +21% | 1 | 1 | 0% | 1,741 | 2,039 | +17% | 0 | 0 | — |
case-08 | pass→pass | 15,417 | 7,199 | -53% | 1 | 1 | 0% | 1,539 | 1,792 | +16% | 0 | 0 | — |
case-09 | fail→fail | 21,303 | 21,920 | +3% | 1 | 1 | 0% | 4,499 | 4,627 | +3% | 0 | 0 | — |
case-10 | pass→fail | 15,527 | 10,637 | -31% | 1 | 1 | 0% | 2,090 | 2,558 | +22% | 0 | 0 | — |
case-11 | fail→fail | 8,336 | 8,352 | +0% | 1 | 1 | 0% | 1,341 | 2,073 | +55% | 0 | 0 | — |
case-12 | fail→pass | 17,253 | 11,058 | -36% | 1 | 1 | 0% | 2,342 | 2,584 | +10% | 0 | 0 | — |
case-13 | pass→pass | 13,457 | 11,065 | -18% | 1 | 1 | 0% | 2,306 | 2,586 | +12% | 0 | 0 | — |
case-14 | pass→pass | 8,485 | 7,527 | -11% | 1 | 1 | 0% | 1,557 | 2,071 | +33% | 0 | 0 | — |
case-15 | pass→pass | 17,775 | 10,700 | -40% | 1 | 1 | 0% | 2,577 | 2,560 | -1% | 0 | 0 | — |
case-16 | pass→pass | 12,791 | 11,586 | -9% | 1 | 1 | 0% | 2,049 | 2,237 | +9% | 0 | 0 | — |
case-17 | pass→pass | 11,701 | 6,483 | -45% | 1 | 1 | 0% | 1,563 | 1,650 | +6% | 0 | 0 | — |
case-18 | fail→pass | 30,137 | 13,979 | -54% | 1 | 1 | 0% | 3,533 | 2,841 | -20% | 0 | 0 | — |
case-19 | fail→pass | 17,778 | 14,584 | -18% | 1 | 1 | 0% | 3,102 | 2,706 | -13% | 0 | 0 | — |
case-20 | fail→pass | 11,347 | 12,799 | +13% | 1 | 1 | 0% | 1,886 | 2,475 | +31% | 0 | 0 | — |
case-21 | fail→fail | 14,863 | 10,733 | -28% | 1 | 1 | 0% | 2,174 | 2,455 | +13% | 0 | 0 | — |
case-22 | fail→fail | 7,583 | 5,266 | -31% | 1 | 1 | 0% | 1,188 | 1,298 | +9% | 0 | 0 | — |
case-23 | pass→pass | 21,398 | 17,503 | -18% | 1 | 1 | 0% | 2,773 | 3,407 | +23% | 0 | 0 | — |
case-24 | pass→fail | 9,515 | 19,994 | +110% | 1 | 1 | 0% | 1,368 | 4,488 | +228% | 0 | 0 | — |
case-25 | pass→fail | 13,492 | 28,744 | +113% | 1 | 1 | 0% | 3,090 | 5,355 | +73% | 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. 25 cases were attempted. The headline lift of +16 percentage points is the difference between those two pass rates over the 25 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
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.
Other measured skills in the registry, with their headline benchmark lift.