tdd-playbook

Enforce one failing test at a time with minimal code to pass.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/mikivujkovic/claude-code-ddd-tdd-bdd --skill tdd-playbook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-playbook
Source: https://github.com/mikivujkovic/claude-code-ddd-tdd-bdd/tree/main/.claude/skills/tdd-playbook
Command: npx skills add https://github.com/mikivujkovic/claude-code-ddd-tdd-bdd --skill tdd-playbook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a practical framework for practicing Test-Driven Development (TDD) with a focus on domain behavior, helping teams write smaller, testable units and avoid overfitting to UI.

Core Features & Use Cases

  • Red/Green/Refactor discipline: Start with a failing test, implement the minimum code to pass, and refactor once green.
  • Domain-first testing: Prioritize unit tests that capture domain invariants over UI tests.
  • Incremental design: Break work into tiny, verifiable steps to reduce risk and facilitate learning.

Quick Start

Describe a new domain rule, write a minimal failing test, implement just enough code to pass, and refactor when green.

Frequently Asked Questions about tdd-playbook

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

FAQPage Schema
How do I practice test-driven development without writing too much code?

Test-driven development follows the red-green-refactor cycle: write one failing test, implement minimal code to pass it, then refactor when green. This discipline prevents over-engineering and keeps your implementation focused on actual requirements.

Why should I prioritize unit tests over UI tests in TDD?

Domain-first testing captures core business logic and invariants in unit tests, which are faster to write, run, and maintain than UI tests. This approach reduces overfitting to interface details and ensures your domain behavior is solid before testing UI integration.

How do I break down development work into smaller, verifiable steps?

Incremental design in TDD involves describing one domain rule at a time, writing a minimal failing test for it, implementing just enough code to pass, and refactoring. This workflow reduces risk, makes debugging easier, and provides clear checkpoints for progress.

What's the best way to maintain disciplined test-driven workflows on a team?

Enforce one failing test at a time, require minimal implementation to pass each test, and refactor only when tests are green. This strict red-green-refactor discipline prevents shortcuts, keeps code reviews focused, and makes knowledge transfer clearer for new team members.

Can I use TDD for both new features and refactoring existing code?

TDD applies to new development through red-green-refactor cycles. For refactoring, ensure tests are green before making changes, then refactor with confidence that tests catch regressions. The discipline remains the same: minimal changes per step, tests always green before proceeding.