tdd
Installation
SKILL.md
Test-Driven Development (TDD)
Apply this skill to execute strict test-first development: write a failing test, implement the minimum code to pass, then refactor while keeping tests green.
Decide when to use TDD
Use this decision table:
| Situation | Use this skill? | Default action |
|---|---|---|
| New utility function | Yes | Run TDD cycle immediately |
| New Effect service | Yes | Define behavior through tests first |
| Complex business logic | Yes | Lock behavior with tests before implementation |
| Bug fix | Yes | Reproduce bug with failing test first |
| UI styling/layout-only change | No | Use standard implementation flow |
| Exploratory prototyping | No | Prototype first, then switch to TDD once behavior stabilizes |
| TRPC endpoint (simple CRUD) | Usually no | Use testing-patterns by default; use this skill only when user explicitly requests test-first/RGR |