tdd

Guide test-driven development through red-green-refactor cycles with public interfaces.

6|2|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/acaprino/claude-code-daodan --skill tdd-acaprino
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/acaprino/claude-code-daodan/tree/main/plugins/testing/skills/tdd
Command: npx skills add https://github.com/acaprino/claude-code-daodan --skill tdd-acaprino

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Tests verify behavior through public interfaces, enabling safer refactors and more reliable feature delivery by applying test-driven development principles.

Core Features & Use Cases

  • Planning & design guidance: define public interfaces before coding and align tests with user-facing behavior.
  • Tracer Bullet workflow: write a single end-to-end test to validate critical paths.
  • Incremental loop: implement just enough code to pass each test and repeat for subsequent behaviors.
  • Refactor discipline: apply safe refactors after tests pass to improve structure without changing behavior.

Quick Start

Plan the feature by defining the public interface, write a single tracer bullet test that exercises it end-to-end, implement the minimal code to pass that test, and repeat until the feature is complete.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start test-driven development for a new feature?

Begin test-driven development by defining the public interface, writing a single tracer bullet test for an end-to-end path, implementing minimal code to pass it, and repeating this incremental loop until the feature is complete.

What is the red-green-refactor cycle in software testing?

The red-green-refactor cycle is a test-driven development workflow where you write a failing test, implement just enough code to pass it, and then refactor safely to improve structure without changing behavior.

When should I use a tracer bullet workflow in TDD?

Use a tracer bullet workflow in test-driven development to validate critical end-to-end paths early by writing a single test that exercises the public interface, ensuring safe incremental delivery before adding subsequent behaviors.

How does test-driven development improve refactoring safety?

Test-driven development improves refactoring safety by verifying behavior through public interfaces. Passing tests confirm that structural changes during the refactor phase do not alter the expected user-facing behavior.

Do I need to define interfaces before writing integration tests?

Yes, you should define public interfaces before writing integration tests in test-driven development. Aligning tests with user-facing behavior and predetermined interfaces ensures disciplined test-first workflows and safe incremental delivery.

What is the best way to enforce minimal implementation in TDD?

The best way to enforce minimal implementation in test-driven development is to write failing tests first and implement only enough code to pass each test, repeating this incremental loop to avoid over-engineering and enable safe refactors.