test-driven-development

Enforce test-first development with a RED-GREEN-REFACTOR workflow.

1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/danilonovaisv/PROMPT-APP --skill test-driven-development-danilonovaisv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/danilonovaisv/PROMPT-APP/tree/main/.agent/skills/test-driven-development
Command: npx skills add https://github.com/danilonovaisv/PROMPT-APP --skill test-driven-development-danilonovaisv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces risk by ensuring features are implemented to pass explicit tests before code, preventing scope creep and ambiguous requirements.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test first, then implement the minimal code to pass, and refactor while preserving test coverage.
  • Guardrails for new features, bug fixes, and refactors to maintain design clarity and regression protection.
  • Use case: at the start of a feature or bug fix, articulate intent with a failing test to guide implementation and verification.

Quick Start

Write a failing test first, then implement the minimal code to pass, and 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
How does test-driven development reduce software bugs?

Test-driven development reduces bugs by enforcing a test-first workflow where you write a failing test before implementation, ensuring features satisfy explicit requirements and preventing scope creep.

How do I apply the red-green-refactor cycle when adding new features?

To apply red-green-refactor, write a failing test for the new feature, implement the minimal production code required to pass that test, then refactor the code while keeping all tests green.

Can I use test-driven development for refactoring existing code?

Yes, test-driven development supports refactoring by using automated test suites as guardrails. You articulate intent with failing tests to guide changes and maintain regression protection for existing software.

What is the best way to start a bug fix using test-first development?

The best way to start a bug fix with test-first development is to articulate the issue by writing a failing test that reproduces the bug, then implement the minimal code to make it pass.

Why write a failing test before writing production code?

Writing a failing test before production code ensures the test actually validates the feature, prevents ambiguous requirements, and guides the implementation of only the minimal code necessary to pass.