What problem does it solve?
This Skill ensures your code is robust and reliable by forcing you to write tests before implementation. It prevents common pitfalls like writing untestable code, missing edge cases, or creating tests that don't actually verify behavior.
Core Features & Use Cases
- Red-Green-Refactor Cycle: Guides you through the core TDD loop: write a failing test (Red), write minimal code to pass (Green), then clean up (Refactor).
- Mandatory Failure Verification: Emphasizes that you must see a test fail before writing code, proving the test actually works.
- Anti-Rationalization: Explicitly counters common excuses for skipping TDD, ensuring consistent application of the methodology.
- Use Case: When implementing any new feature or fixing a bug, use this Skill to guarantee a solid test suite. For example, before writing a new user authentication function, write a test that expects it to fail, then build the function to make that test pass.
Quick Start
Announce skill usage
I'm using the test-driven-development skill to implement this feature.
The skill will then guide you through the Red-Green-Refactor cycle.