tdd

Enforce vertical slicing and behavior-focused testing through public interfaces.

3|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/XinAloha/skills --skill tdd-xinaloha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/XinAloha/skills/tree/main/methodology/tdd
Command: npx skills add https://github.com/XinAloha/skills --skill tdd-xinaloha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the common pitfalls of Test-Driven Development, such as horizontal slicing (writing all tests before implementation) and coupling tests to internal implementation details rather than observable behavior.

Core Features & Use Cases

  • Vertical Slicing Workflow: Guides the user through a cycle of one test followed by one minimal implementation, ensuring the system is always in a verifiable state.
  • Behavior-Driven Design: Focuses on testing public interfaces and system behavior, ensuring tests remain robust even after internal refactoring.
  • Deep Module Design: Provides principles for creating small interfaces with deep implementations, reducing cognitive load and maintenance debt.

Quick Start

Apply the tdd skill to guide the development of the new data collector module by defining the most critical public behavior first.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I prevent TDD tests from breaking during refactoring?

Vertical slicing in Test-Driven Development means writing one test followed by one minimal implementation. This cycle keeps the system verifiable at each step, avoiding horizontal slicing where all tests are written before any implementation begins.

What is vertical slicing in Test-Driven Development?

Vertical slicing in Test-Driven Development involves writing one test followed by one minimal implementation. This cycle keeps the system continuously verifiable, avoiding horizontal slicing where all tests are written before implementation begins.

How do I structure modules for maintainable software design?

Structure modules for maintainable software design by creating deep modules with small interfaces and deep implementations. This reduces cognitive load and maintenance debt while ensuring public behaviors are thoroughly verified through behavior-focused testing.

Does Test-Driven Development work for legacy code refactoring?

Test-Driven Development supports legacy code refactoring by enforcing behavior-focused testing through public interfaces. Decoupling tests from implementation details ensures critical system paths remain verified while improving maintainability and code quality.

Why do my unit tests fail when I change internal code?

Unit tests fail during internal code changes because they are coupled to implementation details rather than observable behavior. Testing through public interfaces ensures tests remain robust and decoupled from internal system refactoring.