test-driven-development

Enforce test-first development by writing a failing test before production code.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/ben-mad-jlp/claude-mermaid-collab --skill test-driven-development-ben-mad-jlp
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/ben-mad-jlp/claude-mermaid-collab/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/ben-mad-jlp/claude-mermaid-collab --skill test-driven-development-ben-mad-jlp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams ensure quality by requiring a failing test before any production code, reducing regressions and guiding correct design from the outset.

Core Features & Use Cases

  • Red-Green-Refactor workflow: Write a minimal failing test, implement just enough code to pass, and refactor for readability.
  • Design-aligned testing: Tests map to design requirements or wireframes when available, ensuring implementation follows specified behavior.
  • Use Case: When adding a new feature, start with a failing test, then incrementally implement until all tests pass.

Quick Start

  1. Create a failing test for the desired behavior, then implement code to pass it.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I use test-driven development to add new features reliably?▼

Test-driven development adds features reliably by requiring a failing test before implementation, then incrementally writing code to pass it. This workflow reduces regressions and guides correct design from the outset.

What is the red-green-refactor cycle in TDD?▼

The red-green-refactor cycle in TDD is a workflow where you write a minimal failing test, implement just enough code to pass it, and refactor the code for readability. It drives incremental and reliable implementation.

Can I apply test-first development to bug fixes and refactoring?▼

Yes, test-first development applies to bug fixes and refactoring across any programming language. It enforces writing a failing test that verifies expected behavior before modifying production code.

How do TDD tests map to design documents and wireframes?▼

TDD tests map to design documents by verifying behavior specified in requirements or wireframes. This ensures the implementation follows the specified design and tests remain minimal and focused.

Does test-driven development work with any programming language?▼

Test-driven development works across any programming language and project type. It enforces a test-first discipline independent of specific frameworks, guiding teams through universal red-green-refactor cycles.

Why write a failing test before production code?▼

Writing a failing test before production code ensures the test actually verifies the desired behavior. It reduces regressions, confirms the requirement is unmet, and drives reliable incremental implementation.