What problem does it solve?
This Skill solves the common problem of writing fragile, implementation-coupled tests that break during code refactors even when user-facing behavior remains unchanged, and helps developers build reliable, maintainable software through structured test-first development practices.
Core Features & Use Cases
- Structured TDD Workflow: Step-by-step guidance for the full red-green-refactor loop, including pre-implementation planning, tracer bullet testing, incremental test-implementation cycles, and safe refactoring steps.
- Anti-Pattern Avoidance: Explicit warnings against common TDD mistakes like horizontal slicing (writing all tests before implementation) that lead to low-value, brittle tests that don't reflect real user behavior.
- Test Quality Best Practices: Clear rules for writing behavior-focused integration tests that survive internal refactors, plus guidelines for when and how to mock external system boundaries only.
- Real-World Use Case: When building a new checkout feature for an e-commerce site, use this Skill to write a single test for the successful checkout flow first, implement minimal code to pass the test, then refactor the payment processing logic without breaking existing functionality.
Quick Start
Use the tdd skill to implement the new user password reset feature using test-driven development, following the red-green-refactor loop for each new behavior.