test-driven-development

Enforce a strict RED-GREEN-REFACTOR cycle for all code implementation.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/hochoa13/Asistente-Harlest --skill test-driven-development-hochoa13
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/hochoa13/Asistente-Harlest/tree/main/skills/software-development/test-driven-development
Command: npx skills add https://github.com/hochoa13/Asistente-Harlest --skill test-driven-development-hochoa13

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous Test-Driven Development (TDD) workflow, ensuring that code is written to meet specific, tested requirements, thereby reducing bugs and improving code quality.

Core Features & Use Cases

  • Enforces RED-GREEN-REFACTOR cycle: Guides the developer through writing a failing test, writing minimal code to pass, and then refactoring.
  • Prevents common TDD violations: Provides clear rules and rationalizations against skipping steps or compromising the TDD process.
  • Use Case: When starting a new feature, use this Skill to ensure you write a failing test for the desired behavior before writing any implementation code.

Quick Start

Always write a failing test before writing any implementation code.

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 the Test-Driven Development cycle when writing new features?

Test-Driven Development (TDD) is a methodology mandating that every piece of production code is preceded by a failing test. It works by enforcing a RED-GREEN-REFACTOR cycle, ensuring code meets specific requirements and reducing overall bugs.

What is the Test-Driven Development methodology and how does it improve code quality?

Test-Driven Development (TDD) is a methodology mandating that every piece of production code is preceded by a failing test. It works by enforcing a strict RED-GREEN-REFACTOR cycle, ensuring code meets specific requirements and improving overall quality.

How do I start writing code with a test-first approach?

Prevent TDD violations by adhering to strict rules: never skip the failing test step, write only minimal code to pass the test, and refactor exclusively after achieving a green state. This rationalization keeps the development process rigorous and prevents regressions.

When should I refactor code during the TDD process?

You should refactor code during the TDD process only after achieving a green state where your tests pass. This strict sequence ensures you have a safety net of verifiable requirements before improving the code structure or quality.

Why write minimal passing code instead of full implementation in TDD?

Writing minimal passing code in TDD prevents over-engineering and ensures every line of production code has a corresponding test. This strict discipline addresses the problem of writing code without verifiable requirements and prevents future regressions.