tdd

Guide test-driven development with integration-style tests using public interfaces.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill tdd-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/shushuzn/Rairos/tree/main/skills/tdd
Command: npx skills add https://github.com/shushuzn/Rairos --skill tdd-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you avoid brittle development by guiding you to specify behavior with tests first, then implement only what is needed.

Core Features & Use Cases

  • Integration-style behavior verification: Write tests that exercise public interfaces so they survive refactors.
  • Tracer-bullet TDD cycle: Use a tight red→green→refactor loop with one failing test at a time.
  • Test quality guidance: Detect and avoid anti-patterns like horizontal slicing and implementation-coupled tests.

Use Case: You’re fixing a bug in a core user flow and want confidence the public behavior is correct without over-mocking internals.

Quick Start

Use the tdd skill to help you design one integration-style test for the next user-facing behavior you want to make pass, then implement the minimal change to go from red to green before refactoring.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle is a test-driven development process where you write one failing integration test, implement the minimal code to make it pass, and then safely refactor the implementation.

How do I write integration-style tests that survive refactoring?

To write integration-style tests that survive refactoring, exercise public interfaces to verify behavior and avoid mocking internal collaborators or verifying implementation details.

Why does mocking internal collaborators make my tests brittle?

Mocking internal collaborators makes tests brittle because it couples assertions to implementation details rather than public behavior, causing tests to break during refactoring even when user-facing functionality remains correct.

How do I apply vertical slicing when designing tests for a new feature?

Apply vertical slicing by designing one integration-style test for a single user-facing behavior, then implement only the minimal change required to drive that specific test from red to green.

When should I use tracer bullets instead of horizontal slicing for bug fixing?

Use tracer bullets for bug fixing when you need a tight red-green-refactor loop to verify core user flow behavior, avoiding horizontal slicing which tests layers independently and misses integration failures.

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

Test-driven development works for both feature development and bug fixing by converting desired behaviors into integration-style tests that use public interfaces to ensure reliable refactoring cycles.