test-driven-development

Enforce failing tests before implementing production code across testing workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces writing failing tests before implementing production code to prevent regressions, ambiguous requirements, and accumulating technical debt while ensuring behavior is specified and verified.

Core Features & Use Cases

  • Red-Green-Refactor workflow: Instructs developers to write a minimal failing test, implement the smallest change to pass, and then refactor while keeping tests green.
  • Verification gates: Emphasizes confirming tests fail for the expected reason, re-running tests, and ensuring other tests remain passing before marking work complete.
  • Use Cases: Ideal for new features, bug fixes, refactors, and behavior changes where reliable automated tests and clear behavioral contracts are required.

Quick Start

Create a failing test that demonstrates the desired behavior, run the test to confirm it fails for the expected reason, implement the minimal code to make it pass, and then refactor while keeping all tests green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the test-driven development workflow for preventing regressions?

Test-driven development prevents regressions by enforcing a Red-Green-Refactor workflow: write a minimal failing test, implement the smallest code change to pass it, and then refactor while keeping tests green to ensure behavior is verified.

How do I write tests before implementing production code for a new feature?

Create a failing test demonstrating the desired behavior, run it to confirm it fails for the expected reason, implement minimal production code to pass the test, and then refactor while maintaining test hygiene with clear assertions.

When should I use test-driven development for refactoring and bug fixes?

Use test-driven development for refactoring, bug fixes, and behavior changes across unit, integration, and end-to-end testing workflows to establish clear behavioral contracts, prevent ambiguous requirements, and avoid accumulating technical debt.

Does test-driven development work for integration and end-to-end testing?

Test-driven development applies across unit, integration, and end-to-end testing workflows, requiring developers to observe test failures, implement minimal passing code, and maintain verification gates to ensure other tests remain passing.

What are the limitations of minimal mocking in test-driven development?

Test-driven development requires maintaining test hygiene through minimal mocking and clear assertions. If verification gates are skipped, tests may pass for unexpected reasons, failing to specify and verify the intended behavior accurately.