tdd

Guide Test-Driven Development with the Red-Green-Refactor cycle and test pyramid.

Updated May 11, 2026
One-click install
npx skills add https://github.com/LeonardoDiasRR/dev-harness --skill tdd-leonardodiasrr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/LeonardoDiasRR/dev-harness/tree/main/skills/tdd
Command: npx skills add https://github.com/LeonardoDiasRR/dev-harness --skill tdd-leonardodiasrr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the challenges of implementing Test-Driven Development (TDD) in software development, providing detailed guidelines, patterns, and case studies.

Core Features & Use Cases

  • TDD Principles and Laws: Explains the core concepts and the Three Laws of TDD.
  • Test Pyramid: Offers a structured approach to testing, focusing on unit, integration, and end-to-end tests.
  • Frontend and Backend TDD: Provides practical examples using React Testing Library, Vitest, and mocks/stubs/fakes.
  • Patterns and Best Practices: Delivers guidelines for writing clean, maintainable, and effective tests.
  • Empirical Studies: Cites research on the benefits of TDD in software quality and productivity.

Quick Start

Start your TDD journey by following the Red-Green-Refactor cycle with this Skill.

Frequently Asked Questions about tdd

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 software development approach where you write tests before production code to improve design and quality. It follows the Red-Green-Refactor cycle: write a failing test, make it pass, then refine the code.

How do I apply TDD principles in frontend and backend development?

You can apply TDD principles in frontend and backend development by using practical examples with tools like React Testing Library and Vitest. This Skill provides specific patterns and best practices for writing clean, maintainable tests across both environments.

What is the test pyramid and how do I structure unit, integration, and end-to-end tests?

The test pyramid offers a structured approach to testing by categorizing tests into unit, integration, and end-to-end levels. It guides developers on how to balance test coverage and execution speed to maximize software quality and maintainability.

Does Test-Driven Development actually improve software quality and productivity?

Test-Driven Development improves software quality and productivity based on cited empirical studies. By writing tests before production code, developers can identify defects early, enhance software design, and ensure long-term maintainability.

What are the Three Laws of TDD and why do they matter for maintainable tests?

The Three Laws of TDD are core principles that enforce writing tests before production code, ensuring continuous feedback. Adhering to these laws delivers guidelines for writing clean, maintainable, and effective tests throughout the development lifecycle.