test-driven-development

Guide developers through the Red-Green-Refactor cycle with failing-first tests.

13|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/abeldotam/bmad-viewer --skill test-driven-development-abeldotam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/abeldotam/bmad-viewer/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/abeldotam/bmad-viewer --skill test-driven-development-abeldotam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing code without tests leads to fragile software and hard refactors. This skill codifies a disciplined approach to ensure correctness by driving development with tests, catching regressions early, and guiding clean design.

Core Features & Use Cases

  • Red-Green-Refactor workflow: Write a failing test, implement minimal code to pass, and refactor for clarity.
  • Fail-fast validation: Ensure behavior is verified before production code is written.
  • Safe refactoring and maintenance: Guarantees that changes don't regress existing behavior across features and bug fixes.
  • Use Case: A feature team adds a new module; they write a failing test first, then implement just enough code to pass, ensuring robust design from the start.

Quick Start

Consistently apply the Red-Green-Refactor cycle: write a failing test, watch it fail, implement the simplest code to pass, then refactor.

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 involves writing a failing test, implementing minimal code to pass, and refactoring for clarity to ensure code correctness and safe maintenance.

How do I use TDD to safely refactor existing software?

Use test-driven development to safely refactor software by writing failing tests first to verify behavior, then implementing minimal production code to pass them, preventing regressions during maintenance.

Can I apply test-driven development to both feature development and bug fixes?

Yes, you can apply test-driven development to both feature development and bug fixes, using the Red-Green-Refactor workflow to drive design and ensure changes do not regress existing behavior.

When should I not use test-driven development for a software project?

You should avoid test-driven development when your software project lacks clear behavioral specifications or requires rapid prototyping without immediate quality assurance constraints.

What is the best way to start a new module using test-driven development?

The best way to start a new module using test-driven development is to write a failing test first, watch it fail, implement just enough code to pass, and then refactor for robust design.