test-driven-development

Enforce the RED-GREEN-REFACTOR cycle to prevent untested production changes.

Updated Aug 20, 2025
One-click install
npx skills add https://github.com/BRANDNEWSHVT/mercora --skill test-driven-development-brandnewshvt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/BRANDNEWSHVT/mercora/tree/main/storefront-nuxt/.agents/skills/test-driven-development
Command: npx skills add https://github.com/BRANDNEWSHVT/mercora --skill test-driven-development-brandnewshvt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Promotes reliable, maintainable code by ensuring development is guided by tests before production code, reducing regressions and defects.

Core Features & Use Cases

  • Enforces the RED-GREEN-REFACTOR cycle across development.
  • Prevents production changes without failing tests.
  • Improves documentation of intended behavior through tests.

Quick Start

Write a failing test for the next feature, then implement only enough production code to make that 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 the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle in test-driven development enforces writing a failing test first, implementing just enough production code to pass it, then refactoring to maintain quality and prevent regressions.

How do I start writing features using a test-first workflow?

To start a test-first workflow, write a failing unit test for your next feature, then implement only the minimum production code required to make that test pass, ensuring tests guide your implementation.

Does test-driven development prevent untested production changes during refactoring?

Yes, test-driven development prevents untested production changes by requiring failing tests before any feature work, bug fixes, or refactoring, ensuring intended behavior is documented and regressions are reduced.

When should I apply test-driven development best practices?

You should apply test-driven development best practices during feature work, bug fixes, and refactors to maintain code quality, document intended behavior through tests, and prevent regressions across your software.

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

Test-driven development requires a failing test first to ensure tests guide implementation and refactoring decisions, preventing untested code from reaching production and reducing future defects and regressions.