tdd-developer

Guide Test-Driven Development through red-green-refactor cycles with failing tests and minimal code.

5|4|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/takusaotome/claude-skills-library --skill tdd-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-developer
Source: https://github.com/takusaotome/claude-skills-library/tree/main/skills/tdd-developer
Command: npx skills add https://github.com/takusaotome/claude-skills-library --skill tdd-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you apply Test-Driven Development (TDD) correctly so you can design and implement features with confidence, using short red-green-refactor cycles instead of writing code without feedback.

Core Features & Use Cases

  • Red-Green-Refactor guidance: Walks you through creating a failing test, implementing the minimum code to pass, and refactoring while keeping tests green.
  • Test design and naming: Provides practical conventions for focused, maintainable tests (AAA structure and clear test names).
  • Edge-case coverage strategy: Encourages you to include invalid inputs, boundary values, empty collections, and error conditions early.
  • Iteration plan for features: Helps you break a feature into small behaviors and implement them one test at a time.

Quick Start

Use this skill when you want to build a small function with TDD by asking it to produce your first failing test and the minimal implementation to make it pass, then repeat for the next behavior.

Frequently Asked Questions about tdd-developer

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

FAQPage Schema
How do I start writing unit tests first using the red-green-refactor cycle?

Unit tests first using red-green-refactor start by writing a failing test for a specific behavior, implementing minimal code to pass it, then refactoring while keeping all tests green. This cycle repeats for each small behavior increment.

What is the AAA structure in test-driven development and how does it guide test design?

The AAA structure in test-driven development organizes tests into Arrange, Act, and Assert sections to clearly separate setup, execution, and verification, ensuring focused and maintainable test design for each behavior.

Can I use test-first workflows with pytest for refactoring existing code?

Test-first workflows with pytest support refactoring existing code by first establishing behavior-focused test coverage, then safely modifying the implementation through short red-green-refactor iterations without breaking existing tests.

How do I break a feature into small behaviors for TDD iteration?

Breaking a feature into small behaviors for TDD iteration involves identifying individual edge cases, invalid inputs, and boundary values, then implementing each behavior one test at a time using the red-green-refactor cycle.

What edge cases should I cover when doing test-first development?

Edge cases in test-first development should include invalid inputs, boundary values, empty collections, and error conditions early in the process to ensure robust behavior coverage during the red-green-refactor cycle.

When should I not use TDD for feature development?

TDD for feature development is less suitable when the expected behavior is poorly defined or highly exploratory, as the red-green-refactor cycle requires clear, testable behaviors to produce meaningful failing tests and minimal implementations.