test-driven-development

Enforce test-first development with Red-Green-Refactor cycles.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/miles990/claude-starter-kit --skill test-driven-development-miles990
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/miles990/claude-starter-kit/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/miles990/claude-starter-kit --skill test-driven-development-miles990

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides teams to write failing tests before implementing production code, eliminating guesswork and reducing regressions.

Core Features & Use Cases

  • Red-Green-Refactor cycles to ensure code only goes green after tests pass.
  • Early validation of requirements for new features, bug fixes, and refactors.
  • Framework-agnostic guidance that can adapt to any test runner and language.

Quick Start

Tell Claude to adopt TDD for your next feature: write a failing test first, then implement the minimal code to pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does the Red-Green-Refactor cycle work?

Test-driven development (TDD) is a test-first development process where you write a failing test, implement minimal code to pass it, then refactor. The Red-Green-Refactor cycle enforces this sequence to validate requirements early and reduce regressions across any project.

How do I start writing failing tests before implementing production code for new features?

To start test-first development, instruct your AI assistant to adopt TDD for your next feature: write a failing test first, then implement the minimal production code required to pass all tests. This enforces early validation of requirements before functional code exists.

Can I use test-driven development with any test runner or programming language?

Yes, test-driven development is framework-agnostic. You can apply the Red-Green-Refactor workflow across any project by adapting the guidance to your specific test runner and programming language to validate requirements and reduce regressions.

Does test-driven development apply to bug fixes and refactoring existing code?

Test-driven development applies to new features, bug fixes, and refactors. By writing a failing test that captures the bug or desired refactored behavior first, you ensure code only goes green after tests pass, eliminating guesswork and reducing future regressions.

Why should I write a failing test before writing any production code?

Writing a failing test before production code ensures test-first development by validating requirements early. This practice eliminates guesswork, confirms the test actually checks the intended behavior, and reduces regressions by enforcing minimal code that passes all tests.