Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Unified TDD skill with three input modes — from spec, from task, or from description. Enforces test-first development using repository patterns, with proptest guidance and backpressure integration.
.claude/skills/mikeyobrien-test-driven-development/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 38% | 0% |
One skill for all TDD workflows. Enforces test-first development using existing repository patterns. Three input modes handle different entry points — specs, task files, or ad-hoc descriptions — but the core cycle is always RED → GREEN → REFACTOR.
Detect the input type and follow the corresponding mode:
.spec.md)Use when the input references a .spec.md file with Given/When/Then acceptance criteria.
todo!() bodies:rust /// Spec: <spec-file> — Criterion #<N> /// Given <given text> /// When <when text> /// Then <then text> #[test] fn <spec_name>_criterion_<N>_<slug>() { todo!("Implement: <then text>"); }
cargo test --no-run -p <crate>Programmatic support: ralph_core::preflight::{extract_acceptance_criteria, extract_criteria_from_file, extract_all_criteria} can parse criteria from spec files.
.code-task.md)Use when the input references a .code-task.md file or a specific implementation task.
Use for ad-hoc tasks without a spec or task file.
Before writing tests, discover existing conventions:
bashrg --files -g "crates/*/tests/*.rs" rg -n "#\[cfg\(test\)\]" crates/
Read 2-3 relevant test files near the target code. Mirror:
tempfile, scenarios, or harnessesUse proptest only when ALL of:
rustproptest! { #[test] fn round_trip(input in "[a-z0-9]{0,32}") { let encoded = encode(input.as_str()); let decoded = decode(&encoded).expect("should decode"); prop_assert_eq!(decoded, input); } }
Don't introduce proptest as a new dependency without strong justification.
Include coverage evidence in completion events:
bashralph emit "build.done" "tests: pass, lint: pass, typecheck: pass, audit: pass, coverage: pass (82%)"
Run cargo tarpaulin --out Html --output-dir coverage --skip-clean when feasible. If coverage cannot be run, state why and include targeted test evidence instead.
#[cfg(test)] testscrates/<crate>/tests/crates/ralph-cli/tests/| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 3,996 | 4,571 | +14% | 1 | 1 | 0% | 309 | 1,414 | +358% | 0 | 0 | — |
case-02 | fail→fail | 2,186 | 4,578 | +109% | 1 | 1 | 0% | 328 | 1,372 | +318% | 0 | 0 | — |
case-03 | fail→fail | 15,695 | 17,340 | +10% | 1 | 1 | 0% | 3,400 | 5,138 | +51% | 0 | 0 | — |
case-04 | pass→pass | 15,253 | 15,951 | +5% | 1 | 1 | 0% | 2,871 | 3,966 | +38% | 0 | 0 | — |
case-05 | pass→pass | 9,141 | 10,257 | +12% | 1 | 1 | 0% | 1,715 | 2,955 | +72% | 0 | 0 | — |
case-06 | pass→pass | 11,356 | 14,613 | +29% | 1 | 1 | 0% | 2,351 | 4,199 | +79% | 0 | 0 | — |
case-07 | fail→fail | 9,232 | 2,499 | -73% | 1 | 1 | 0% | 1,881 | 1,395 | -26% | 0 | 0 | — |
case-08 | pass→pass | 3,324 | 1,882 | -43% | 1 | 1 | 0% | 529 | 1,359 | +157% | 0 | 0 | — |
case-09 | pass→pass | 4,171 | 1,325 | -68% | 1 | 1 | 0% | 763 | 1,284 | +68% | 0 | 0 | — |
case-10 | pass→pass | 11,386 | 5,783 | -49% | 1 | 1 | 0% | 2,063 | 2,236 | +8% | 0 | 0 | — |
case-11 | pass→pass | 13,092 | 4,842 | -63% | 1 | 1 | 0% | 2,454 | 2,035 | -17% | 0 | 0 | — |
case-12 | pass→pass | 8,289 | 4,481 | -46% | 1 | 1 | 0% | 1,624 | 1,945 | +20% | 0 | 0 | — |
case-13 | pass→pass | 8,145 | 4,474 | -45% | 1 | 1 | 0% | 1,422 | 1,854 | +30% | 0 | 0 | — |
case-14 | pass→pass | 6,822 | 3,455 | -49% | 1 | 1 | 0% | 1,159 | 1,685 | +45% | 0 | 0 | — |
case-15 | fail→pass | 8,038 | 1,923 | -76% | 1 | 1 | 0% | 1,528 | 1,350 | -12% | 0 | 0 | — |
case-16 | fail→pass | 9,236 | 2,993 | -68% | 1 | 1 | 0% | 1,690 | 1,638 | -3% | 0 | 0 | — |
case-17 | pass→pass | 8,894 | 2,147 | -76% | 1 | 1 | 0% | 1,635 | 1,457 | -11% | 0 | 0 | — |
case-18 | pass→pass | 10,674 | 4,526 | -58% | 1 | 1 | 0% | 2,070 | 1,889 | -9% | 0 | 0 | — |
case-19 | fail→pass | 9,801 | 4,602 | -53% | 1 | 1 | 0% | 1,727 | 1,892 | +10% | 0 | 0 | — |
case-20 | pass→pass | 6,335 | 5,802 | -8% | 1 | 1 | 0% | 1,125 | 2,056 | +83% | 0 | 0 | — |
case-21 | pass→pass | 6,052 | 2,516 | -58% | 1 | 1 | 0% | 1,092 | 1,492 | +37% | 0 | 0 | — |
case-22 | fail→pass | 6,949 | 2,100 | -70% | 1 | 1 | 0% | 1,100 | 1,463 | +33% | 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, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +18 percentage points is the difference between those two pass rates over the 20 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.
Other measured skills in the registry, with their headline benchmark lift.