Guides Red-Green-Refactor TDD cycle: write failing tests, implement minimally, then refactor. Use when implementing logic, fixing bugs, or changing behavior.
How this skill is triggered — by the user, by Claude, or both
Slash command
/v1truv1us-ai-eng-system:test-driven-developmentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write a failing test first, then implement the minimum code to pass, then refactor. Tests are proof that the system behaves as intended. This is the canonical Build-phase testing skill.
Write a failing test first, then implement the minimum code to pass, then refactor. Tests are proof that the system behaves as intended. This is the canonical Build-phase testing skill.
Tests should be Descriptive And Meaningful Phrases. Prefer readability over test-code abstraction. Duplication in test setup is acceptable when it makes the test self-contained.
If you liked it, you should have put a test on it. If behavior matters, a test should verify it.
it('should return 404 when user does not exist')it('works')Before writing tests, define the public interface:
| Rationalization | Reality |
|---|---|
| "I will add tests later" | Later never comes. Untested code is unverifiable code. |
| "TDD slows me down" | TDD slows down typing but speeds up delivery by reducing debugging time. |
| "This is too simple to test" | Simple code can have simple bugs. Simple tests are cheap to write. |
| "I need to implement first to know what to test" | Defining expected behavior first is exactly the point. |
| Excuse | Counter |
|---|---|
| "I'll add tests after the code works" | Tests written after code are biased to the implementation. TDD drives better design. |
| "This function is too simple to test" | Simple functions become complex. Tests document expected behavior and catch regressions. |
| "Testing takes too much time" | Untested code takes more time debugging. Tests are an investment, not a cost. |
| "The manual testing is enough" | Manual testing isn't repeatable. Automated tests catch regressions that manual testing misses. |
| "I need to implement first to know what to test" | Defining expected behavior first is exactly the point. Tests specify behavior before code. |
npx claudepluginhub v1truv1us/ai-eng-systemCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
2plugins reuse this skill
First indexed Jul 8, 2026