tdd

Automate the RED-GREEN-REFACTOR test-driven development workflow with failing tests first.

20|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/HerbertJulio/specialist-agent --skill tdd-herbertjulio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/HerbertJulio/specialist-agent/tree/main/skills/tdd
Command: npx skills add https://github.com/HerbertJulio/specialist-agent --skill tdd-herbertjulio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures correctness in software development by advocating test-driven development before implementation.

Core Features & Use Cases

  • Structured RED-GREEN-REFACTOR workflow that enforces writing failing tests before coding.
  • Supports planning, executing, and reviewing tests to improve design and stability.
  • Use Case: when adding a new feature, fixing a bug, or refactoring, this process guarantees test coverage from the start.

Quick Start

Begin a RED-GREEN-REFACTOR cycle by writing a failing test for the target behavior, implement the minimal code to pass, then refactor for clarity.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I enforce a strict test-driven development workflow for new features?

To enforce test-driven development, use a structured RED-GREEN-REFACTOR cycle that requires writing a failing test first, implementing minimal code to pass, and then refactoring for clarity. This guarantees verifiable test coverage before production changes.

What is the RED-GREEN-REFACTOR cycle in software testing?

The RED-GREEN-REFACTOR cycle is a test-driven development process where you first write a failing test (RED), implement the minimal code to make it pass (GREEN), and then refactor the code for clarity and stability without changing its behavior.

How do I fix bugs using test-driven development?

To fix bugs using test-driven development, begin by writing a failing test that reproduces the specific bug. Then, implement the minimal code changes required to make the test pass, ensuring the repair is verified by clear cycle reporting before deployment.

Can I use automated test runner detection when refactoring code?

Yes, automated test runner detection is supported during the refactoring phase. It automatically identifies and executes your testing framework, allowing you to continuously verify code stability and test coverage while improving design clarity.

Does test-driven development work for refactoring existing code?

Yes, test-driven development is highly effective for refactoring existing code. By establishing verifiable test coverage first, you can safely improve design and structural clarity while ensuring the software's original behavior remains correct and stable.

Why should I write a failing test before implementing code?

Writing a failing test before implementing code ensures correctness by defining the exact target behavior upfront. This disciplined test-driven development approach prevents over-engineering and guarantees that your implementation meets the specified requirements from the start.