test-driven-development

Write failing tests first, then implement minimal code to pass them.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/haulcommand-max/haul-command --skill test-driven-development-haulcommand-max
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/haulcommand-max/haul-command/tree/main/vendor/superpowers/skills/test-driven-development
Command: npx skills add https://github.com/haulcommand-max/haul-command --skill test-driven-development-haulcommand-max

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) defines and validates software behavior by writing failing tests before implementing code, guiding design and preventing regressions.

Core Features & Use Cases

  • Define expected behavior with failing tests to drive implementation.
  • Apply Red-Green-Refactor to feature development, bug fixes, and refactors.
  • Improve maintainability and design quality by validating behavior at unit and integration levels.

Quick Start

Write a failing test that captures the desired behavior, then implement the minimal code to make the test 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 defines and validates software behavior by writing failing tests before implementing code. The red-green-refactor cycle ensures tests fail when behavior is missing, pass after minimal implementation, and remain maintainable during safe refactors.

How do I apply test-driven development to fix bugs and add new features?

Apply test-driven development by writing a failing test that captures the desired behavior for your bug fix or feature. Then implement the minimal code required to make the test pass, ensuring correct behavior validation at both unit and integration levels.

Can I use test-driven development for both unit and integration level testing?

Yes, test-driven development is suitable for validating behavior at both unit and integration levels. It enforces the red-green-refactor cycle across feature development, bug fixes, and refactors to improve maintainability and prevent regressions.

What's the best way to start writing tests first for a new software behavior?

The best way to start writing tests first is to define expected behavior with a failing test that captures the desired outcome. Implement the minimal code to pass the test, driving your software design and preventing future regressions.

When should I not use test-driven development for my software testing?

Test-driven development is designed for defining and verifying behavior by writing tests first. It may not suit exploratory software testing or UI design tasks where behavior is not yet defined enough to write failing tests before implementation.