test-driven-development

Enforce a fail-first red-green-refactor workflow with automated test verification.

125|16|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/aaddrick/claude-pipeline --skill test-driven-development-aaddrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/aaddrick/claude-pipeline/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/aaddrick/claude-pipeline --skill test-driven-development-aaddrick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill ensures teams deliver reliable software by forcing a test-driven workflow: write a failing test first, then implement the code to make it pass.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, verify failure, implement minimal code to pass, and refactor while keeping tests green.
  • Scope discipline: applies to new features, bug fixes, and behavior changes to prevent regressions.
  • Living documentation: tests describe expected behavior and serve as executable documentation for future changes.

Quick Start

Run your test suite to see a failing test, write the minimal implementation to pass, and then refactor with confidence.

Frequently Asked Questions about test-driven-development

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 in test-driven development means writing a failing test, implementing minimal code to pass it, and then refactoring while keeping tests green. This enforces a fail-first workflow for reliable software delivery.

How do I start writing unit tests before implementing new features?

To start writing unit tests before implementing new features, run your test suite to see a failing test, write the minimal implementation to make it pass, and then refactor with confidence to ensure maintainable code.

When should I use a test-driven workflow for bug fixes and refactoring?

You should use a test-driven workflow for bug fixes and refactoring to prevent regressions and ensure behavior changes are verified. It applies scope discipline by automating verification across any project modifications.

Does test-driven development work for existing codebases that need behavior changes?

Yes, test-driven development works for existing codebases needing behavior changes by applying automated verification. It guides developers through the red-green-refactor cycle to ensure maintainable code and prevent regressions.

How do unit tests serve as living documentation for future code changes?

Unit tests serve as living documentation by describing expected behavior as executable specifications. When making future code changes, these tests verify modifications automatically and describe exactly how the software should function.

Why write a failing test first instead of writing tests after implementation?

Writing a failing test first forces a test-driven workflow that ensures the test actually validates the requirement. This fail-first approach guarantees automated verification across features and fixes before implementing the code.