test-driven-development

Guide developers through Red-Green-Refactor with failing tests before production code.

Updated May 13, 2026
One-click install
npx skills add https://github.com/kimprobably/maestro-os --skill test-driven-development-kimprobably
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/kimprobably/maestro-os/tree/main/hermes/distribution/maestro-operator/skills/test-driven-development
Command: npx skills add https://github.com/kimprobably/maestro-os --skill test-driven-development-kimprobably

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents shipping broken or unverified functionality by forcing you to specify behavior with a failing test before writing production code.

Core Features & Use Cases

  • Failing test first workflow (Red-Green-Refactor): Write a minimal test that fails for the right reason, implement the smallest change to make it pass, then refactor without adding new behavior.
  • Clear TDD enforcement rules: Use real code and avoid mocks unless unavoidable, and treat “test passes immediately” as a sign the test isn’t proving anything.
  • Targets common engineering work: Works for new features, bug fixes, refactoring, and behavior changes, while discouraging “skip TDD” rationalizations.

Quick Start

Use this approach when you are about to implement a feature or bugfix so you can create a failing test that captures the expected behavior and then iterate until the test passes.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I implement test-driven development for a new feature?

Test-driven development for a new feature requires writing a minimal failing test that specifies the intended behavior, making the smallest code change to pass it, and refactoring without adding new behavior.

What is the red-green-refactor workflow in unit testing?

The red-green-refactor workflow in unit testing is a discipline where you write a failing test for the right reason, implement the smallest production code change to make it pass, then refactor safely.

Why does my test pass immediately before writing production code?

If your test passes immediately, it indicates the test isn't proving anything. Correct failure verification is required to ensure the test actually captures the expected behavior before implementation.

Can I use mocks when doing test-first development?

In test-first development, you should use real code and avoid mocks unless unavoidable. This ensures the failing test accurately verifies the intended behavior of the actual system.

When should I use a failing test first methodology for bug fixes?

Use a failing test first methodology for bug fixes to prevent regressions. It forces you to specify the expected behavior with a failing test before writing the smallest production code change to fix the issue.

What are the limitations of test-driven development for refactoring?

When using test-driven development for refactoring, the limitation is that you must not add new behavior. The process strictly enforces minimal code changes, requiring a failing test first to prove any behavior change.