What problem does it solve?
This Skill prevents fragile implementations and regressions by forcing you to define expected behavior in a failing test before writing production code.
Core Features & Use Cases
- Test-first implementation: Write a failing test that proves the feature’s intended behavior, then implement only what’s required to make it pass.
- Strict TDD cycle: Red (watch it fail) → Green (watch it pass) → Refactor (clean up without adding behavior).
- Anti-pattern guardrails: Avoid testing mock existence, adding test-only methods to production, and over-mocking without understanding dependencies.
- Behavior documentation: Use tests as living documentation of how the code should behave in real scenarios.
- Use cases: New features, bug fixes, refactors, and behavior changes—especially when you want confidence that the change doesn’t break existing functionality.
Quick Start
Use this skill when you start work on a feature or bugfix by writing a minimal failing test first, then implementing the smallest amount of production code to make that test pass before refactoring.