What problem does it solve?
This skill eliminates bugs before they're written and fosters better design by enforcing the Test-Driven Development (TDD) cycle, ensuring every piece of code is backed by a failing test first. This leads to higher quality, more maintainable code and reduces refactoring fear.
Core Features & Use Cases
- RED/GREEN/REFACTOR Cycle: Guides you through writing a failing test, implementing minimal code to pass, and then refactoring, ensuring a disciplined and safe development process.
- Design-First Approach: Forces you to think about the desired behavior and API before writing implementation, leading to cleaner, more testable code.
- Use Case: When adding a user registration endpoint, this skill will prompt you to write a test that expects a 201 status (RED), then write only the necessary code to make that test pass (GREEN), and finally refactor the controller for better structure while keeping the test green (REFACTOR).
Quick Start
I need to add a new feature to update user profiles. Use the test-driven-development skill to guide my implementation.