tdd

Enforce failing tests before production code using Red-Green-Refactor cycles.

4|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/rbaumier/skills --skill tdd-rbaumier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/rbaumier/skills/tree/main/tdd
Command: npx skills add https://github.com/rbaumier/skills --skill tdd-rbaumier

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents untested, fragile, or incorrect implementations by ensuring developers specify desired behavior as failing tests before writing production code.

Core Features & Use Cases

  • Test-first workflow: Requires writing a failing acceptance test, then using Red-Green-Refactor cycles on unit tests to drive implementation.
  • Quality guardrails: Ensures each change is verified by tests, reduces regressions, and documents intended behavior.
  • Use Cases: Implementing new features, fixing bugs, refactoring modules, and validating behavior changes across codebases.

Quick Start

Write a failing acceptance test that describes the feature from the user's perspective, run the tests to confirm the failure, then implement the minimal code to make it pass and refactor while keeping tests green.

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 it prevent untested code?

Test-driven development prevents untested code by enforcing a test-first workflow where you must specify desired behavior as a failing test before writing any production code.

How do I apply Red-Green-Refactor cycles when implementing new features?

To apply Red-Green-Refactor cycles, first write a failing acceptance test, then implement the minimal code to make the unit tests pass, and finally refactor while keeping the tests green.

Can I use test-first workflows for fixing bugs and refactoring modules?

Yes, you can use test-first workflows for fixing bugs and refactoring modules by writing an initial failing test that verifies the expected behavior change before modifying the production code.

What's the best way to start writing an acceptance test for a new feature?

The best way to start writing an acceptance test is to describe the feature from the user's perspective, run the tests to confirm the expected failure, and then implement the minimal code to pass.

Why should I verify that my tests fail for the expected reasons before writing code?

Verifying that tests fail for the expected reasons ensures your tests are actually validating the intended behavior change, preventing false positives and incorrect implementations from passing the test suite.