tdd

Guide vertical slice TDD cycles with one-test-one-implementation tracer bullets.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/Herxinsasa/Skills-Collector --skill tdd-herxinsasa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Herxinsasa/Skills-Collector/tree/main/mattpocock-skills/skills/engineering/tdd
Command: npx skills add https://github.com/Herxinsasa/Skills-Collector --skill tdd-herxinsasa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of writing fragile, implementation-coupled tests that break during code refactors, and avoids the horizontal slicing anti-pattern where bulk test writing leads to validating imagined behavior instead of actual user-facing system functionality.

Core Features & Use Cases

  • Vertical Slice TDD Workflow: Enforces one-test-one-implementation tracer bullet cycles instead of writing all tests before all code, ensuring tests validate real behavior as it is built.
  • Behavior-Focused Test Guidelines: Provides clear rules for writing integration-style tests that verify public interfaces, survive internal refactors, and describe what the system does rather than how it does it.
  • Supporting Best Practices: Includes reference materials for designing deep modules, creating testable interfaces, proper mocking at system boundaries only, and identifying refactor opportunities after TDD cycles.
  • Use Case: For example, when building a new user authentication feature, use this Skill to first write a test for successful email/password login, implement the minimal code to pass the test, then refactor the internal auth logic without breaking the test.

Quick Start

Use the tdd skill to implement the new order export feature by first writing a test for exporting orders to CSV, then writing the minimal code to pass that test, followed by refactoring once all tests pass.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop test-driven development tests from breaking during code refactoring?

Test-driven development tests break during refactoring when they are implementation-coupled. You can eliminate this by writing behavior-focused tests that validate public interfaces and use mocking exclusively at system boundaries to survive internal structural changes.

What is the red-green-refactor cycle and how does vertical slice TDD improve it?

The red-green-refactor cycle involves writing a failing test, implementing minimal code to pass it, then refactoring. Vertical slice TDD improves this by enforcing one-test-one-implementation tracer bullet cycles, ensuring tests validate actual user-facing functionality.

How do I write integration tests that verify actual system behavior instead of imagined workflows?

To write integration tests that verify actual system behavior, avoid the horizontal slicing anti-pattern of bulk test writing. Use vertical slice TDD cycles to build features incrementally, ensuring tests describe what the system does rather than how it does it.

When should I use mocking in unit testing and integration testing workflows?

You should use mocking in unit testing and integration testing workflows exclusively at system boundaries. This behavior-focused testing approach keeps your test suite maintainable and supports safe code refactoring without causing unnecessary test breakage.

Can I use test-driven development for both new feature development and bug fixing?

Yes, you can use test-driven development for both new feature development and bug fixing. The red-green-refactor workflow applies across all software projects, guiding you to write tests for specific behaviors before implementing the minimal code required.