tdd

Verify software behavior through public interfaces using red-green-refactor cycles.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/dgowrie/claude-workflows --skill tdd-dgowrie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/dgowrie/claude-workflows/tree/main/skills/tdd
Command: npx skills add https://github.com/dgowrie/claude-workflows --skill tdd-dgowrie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Verify software behavior through public interfaces.

Core Features & Use Cases

  • Red-Green-Refactor cycle: drive feature development with small, auditable tests for each change.
  • Public-interface testing: ensures tests verify behavior through public APIs, not internals.
  • Vertical slicing discipline: emphasizes incremental delivery and robust feedback loops across the stack.

Quick Start

Walk through a concrete feature using a red-green-refactor cycle to demonstrate TDD in action.

Frequently Asked Questions about tdd

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

FAQPage Schema
How does the red-green-refactor cycle drive feature development?

The red-green-refactor cycle drives feature development by writing a failing test, writing code to pass it, then refactoring. It ensures small, auditable tests verify software behavior through public interfaces for each change.

What is public-interface testing and why use it for TDD?

Public-interface testing verifies software behavior through public APIs rather than internal implementations. It prevents regressions by ensuring tests check external behavior, making refactoring safer and tests more robust against internal changes.

How do I apply test-driven development to bug fixes and integration tests?

Apply test-driven development to bug fixes by writing a failing test that reproduces the bug, then fixing the code. The workflow supports unit and integration levels across feature development and bug fixes in software projects.

Can I use this TDD workflow for incremental delivery and vertical slicing?

Yes, this TDD workflow supports vertical slicing discipline through incremental delivery. It emphasizes robust feedback loops across the stack using planning, tracer bullets, and one-test-at-a-time iterations.

What is the best way to start a TDD cycle for a new feature?

Start a TDD cycle by planning the feature, then walk through a concrete feature using a red-green-refactor cycle. This demonstrates TDD in action with strict adherence to one-test-at-a-time iterations.

When should I avoid strict red-green-refactor workflows?

Strict red-green-refactor workflows may not suit exploratory prototyping where public interfaces are undefined. The workflow requires testable public interfaces to verify behavior and prevent regressions effectively.