Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.
.claude/skills/davila7-tdd-workflow/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 1% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 30% | 0% |
> Write tests first, code second.
🔴 RED → Write failing test
↓
🟢 GREEN → Write minimal code to pass
↓
🔵 REFACTOR → Improve code quality
↓
Repeat...| Focus | Example | |-------|---------| | Behavior | "should add two numbers" | | Edge cases | "should handle empty input" | | Error states | "should throw for invalid data" |
| Principle | Meaning | |-----------|---------| | YAGNI | You Aren't Gonna Need It | | Simplest thing | Write the minimum to pass | | No optimization | Just make it work |
| Area | Action | |------|--------| | Duplication | Extract common code | | Naming | Make intent clear | | Structure | Improve organization | | Complexity | Simplify logic |
Every test follows:
| Step | Purpose | |------|---------| | Arrange | Set up test data | | Act | Execute code under test | | Assert | Verify expected outcome |
| Scenario | TDD Value | |----------|-----------| | New feature | High | | Bug fix | High (write test first) | | Complex logic | High | | Exploratory | Low (spike, then TDD) | | UI layout | Low |
| Priority | Test Type | |----------|-----------| | 1 | Happy path | | 2 | Error cases | | 3 | Edge cases | | 4 | Performance |
| ❌ Don't | ✅ Do | |----------|-------| | Skip the RED phase | Watch test fail first | | Write tests after | Write tests before | | Over-engineer initial | Keep it simple | | Multiple asserts | One behavior per test | | Test implementation | Test behavior |
| Agent | Role | |-------|------| | Agent A | Write failing tests (RED) | | Agent B | Implement to pass (GREEN) | | Agent C | Optimize (REFACTOR) |
> Remember: The test is the specification. If you can't write a test, you don't understand the requirement.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | pass→pass | 10,554 | 6,407 | -39% | 1 | 1 | 0% | 1,990 | 2,019 | +1% | 0 | 0 | — |
case-08 | fail→fail | 13,375 | 11,091 | -17% | 1 | 1 | 0% | 2,823 | 3,052 | +8% | 0 | 0 | — |
case-01 | fail→pass | 20,267 | 13,544 | -33% | 1 | 1 | 0% | 4,008 | 3,668 | -8% | 0 | 0 | — |
case-02 | pass→pass | 10,429 | 10,342 | -1% | 1 | 1 | 0% | 2,239 | 2,908 | +30% | 0 | 0 | — |
case-04 | pass→pass | 7,405 | 5,508 | -26% | 1 | 1 | 0% | 1,473 | 1,783 | +21% | 0 | 0 | — |
case-05 | pass→pass | 15,098 | 14,837 | -2% | 1 | 1 | 0% | 2,761 | 3,360 | +22% | 0 | 0 | — |
case-06 | pass→pass | 15,798 | 11,564 | -27% | 1 | 1 | 0% | 2,688 | 2,862 | +6% | 0 | 0 | — |
case-07 | fail→fail | 12,178 | 13,040 | +7% | 1 | 1 | 0% | 2,489 | 3,254 | +31% | 0 | 0 | — |
case-09 | pass→pass | 8,739 | 8,956 | +2% | 1 | 1 | 0% | 1,649 | 2,615 | +59% | 0 | 0 | — |
case-10 | pass→pass | 9,676 | 6,070 | -37% | 1 | 1 | 0% | 1,640 | 1,747 | +7% | 0 | 0 | — |
case-11 | fail→pass | 16,437 | 13,220 | -20% | 1 | 1 | 0% | 2,964 | 3,358 | +13% | 0 | 0 | — |
case-12 | pass→pass | 10,842 | 7,890 | -27% | 1 | 1 | 0% | 1,999 | 2,212 | +11% | 0 | 0 | — |
case-13 | fail→pass | 10,305 | 5,923 | -43% | 1 | 1 | 0% | 1,836 | 1,886 | +3% | 0 | 0 | — |
case-14 | pass→pass | 10,312 | 9,455 | -8% | 1 | 1 | 0% | 1,958 | 2,688 | +37% | 0 | 0 | — |
case-15 | pass→pass | 9,755 | 6,868 | -30% | 1 | 1 | 0% | 1,809 | 1,959 | +8% | 0 | 0 | — |
case-16 | pass→pass | 11,673 | 8,521 | -27% | 1 | 1 | 0% | 1,962 | 2,214 | +13% | 0 | 0 | — |
case-17 | pass→pass | 9,075 | 4,147 | -54% | 1 | 1 | 0% | 1,525 | 1,459 | -4% | 0 | 0 | — |
case-18 | pass→pass | 13,081 | 9,751 | -25% | 1 | 1 | 0% | 2,123 | 2,475 | +17% | 0 | 0 | — |
case-19 | pass→pass | 7,896 | 5,338 | -32% | 1 | 1 | 0% | 1,337 | 1,641 | +23% | 0 | 0 | — |
case-20 | pass→pass | 10,492 | 7,278 | -31% | 1 | 1 | 0% | 1,823 | 2,108 | +16% | 0 | 0 | — |
case-21 | pass→pass | 13,835 | 11,030 | -20% | 1 | 1 | 0% | 2,357 | 2,872 | +22% | 0 | 0 | — |
case-22 | fail→fail | 17,862 | 14,127 | -21% | 1 | 1 | 0% | 2,888 | 3,143 | +9% | 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 +14 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.
Other measured skills in the registry, with their headline benchmark lift.