What problem does it solve?
This Skill eliminates the risk of shipping untested, buggy production code by enforcing the test-driven development (TDD) red-green-refactor workflow, ensuring every piece of production code is validated by a failing test written before implementation.
Core Features & Use Cases
- Mandatory TDD Cycle Enforcement: Requires all new features, bug fixes, and refactors to follow the RED (write failing test), GREEN (write minimal passing code), REFACTOR (clean up code) cycle with no exceptions unless explicitly approved by the user.
- Anti-Pattern Guardrails: Provides clear red flags and rationalization rebuttals to prevent common TDD violations like writing tests after code, skipping tests for "simple" changes, or keeping unverified code as reference.
- Use Case: When implementing a new retry operation for API calls, the Skill guides you to first write a failing test that validates the operation retries 3 times on failure, then implement the minimal code to pass the test, then refactor for readability, ensuring the feature works correctly and no regressions are introduced.
Quick Start
Use the test-driven-development skill to implement the new user login feature by first writing a failing test for successful credential validation, then writing minimal code to pass the test, and finally refactoring the code for clarity and maintainability.