test-driven-development

Enforce a red-green-refactor cycle where tests drive code implementation.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/danmartinez78/echo-ghost-backup --skill test-driven-development-danmartinez78
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/danmartinez78/echo-ghost-backup/tree/main/skills/software-development/test-driven-development
Command: npx skills add https://github.com/danmartinez78/echo-ghost-backup --skill test-driven-development-danmartinez78

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Write robust software by enforcing a test-first workflow, ensuring tests drive design and prevent regressions.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, see it fail, then implement minimal code to pass and refactor.
  • Clear test naming and one-behavior-per-test guidance to improve reliability.
  • Applicable to feature development, bug fixes, and refactoring across projects and languages.

Quick Start

Write a failing test for the new feature, run tests to observe failure, then implement the minimal code to pass and refactor.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce a test-driven development workflow for feature work and bug fixes?

To enforce test-driven development, you specify a strict red-green-refactor cycle where production code appears only after a failing test is observed, ensuring tests drive design and prevent regressions.

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

The red-green-refactor cycle is a test-driven development workflow where you write a failing test, implement minimal code to pass it, and then refactor, ensuring one behavior per test to improve reliability.

Can I apply test-first discipline to refactoring existing code across different languages?

Yes, test-first discipline applies to feature development, bug fixes, and refactoring across projects and languages, requiring minimal implementation guided by clear test naming and one behavior per test.

How do I start writing a failing test for a new feature?

To start writing a failing test for a new feature, specify the required behavior, run tests to observe the failure, then implement the minimal production code to pass and refactor.

Why does test-driven development require seeing a test fail before writing production code?

Test-driven development requires seeing a test fail before writing production code to enforce test-first discipline, ensuring tests genuinely drive software design and catch regressions across languages and environments.