test-driven-development

Enforce the Red-Green-Refactor cycle from planning to deployment.

2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/roderik/mpe --skill test-driven-development-roderik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/roderik/mpe/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/roderik/mpe --skill test-driven-development-roderik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a test-driven development workflow by requiring a failing test before implementing production code.

Core Features & Use Cases

  • Red-Green-Refactor: Write a failing test, confirm it fails, then implement the minimum code to pass and repeatedly refactor for quality.
  • Scope across tasks: Use for new features, bug fixes, and refactoring to prevent regressions and improve design.
  • Testing discipline: Ensure tests describe intended behavior and are kept up-to-date with changes in code.

Quick Start

Begin by writing a small failing test for the desired feature, run the tests to see the failure, implement the minimal code to pass, run tests again, and refactor for readability and maintainability.

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 (TDD) is a workflow requiring a failing test before writing production code. The Red-Green-Refactor cycle means writing a failing test, implementing the minimal code to pass it, and repeatedly refactoring for quality.

How do I start writing unit tests before implementing a new feature?

To start unit testing with TDD, write a small failing test for the desired feature and run it to confirm the failure. Then, implement the minimum production code to pass the test before refactoring for readability and maintainability.

Can I use test-first development for bug fixes and refactoring existing code?

Yes, test-first development applies to bug fixes and refactoring to prevent regressions and improve software design. Writing tests that describe intended behavior ensures code correctness across these tasks.

What's the best way to maintain testing discipline when code changes?

The best way to maintain testing discipline is keeping tests updated with code changes to ensure they describe intended behavior. Enforcing the test-driven development workflow prevents regressions throughout the software engineering process.

Why does test-driven development require a failing test before implementation?

Test-driven development requires a failing test before implementation to enforce code correctness and ensure the test accurately describes intended behavior. This discipline prevents over-engineering by guiding minimal code changes.