tdd

Enforce a RED-GREEN-REFACTOR test-first workflow for software projects.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/suhwan/claude-registry --skill tdd-suhwan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/suhwan/claude-registry/tree/main/skills/quality/tdd
Command: npx skills add https://github.com/suhwan/claude-registry --skill tdd-suhwan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a test-first development workflow, preventing production code with no failing tests and improving reliability.

Core Features & Use Cases

  • Red-Green-Refactor discipline that guides developers through failing tests, minimal implementation, and clean refactors.
  • Enforcement rules and prompts ensure tests are written before code and prevent shortcuts.
  • Use Case: A feature team adds a new module and writes a failing test first, then implements the minimum code to satisfy the test.

Quick Start

Use the RED-GREEN-REFACTOR cycle to drive feature development by writing a failing test first, then implementing the minimal code to pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
How does test-first development improve code quality in incremental feature development?

The RED-GREEN-REFACTOR cycle enforces test-first development by requiring a failing test first, implementing minimal code to pass it, and then cleaning up the design. This structured cycle prevents shortcuts and ensures every feature addition is verified incrementally.

How do I enforce failing tests before writing implementation code?

You can enforce failing tests before implementation by applying specific enforcement rules and commands within the development cycle. This mechanism guides developers to write tests first, followed by the minimum code needed to satisfy those tests.

Can I apply the red-green-refactor workflow across different programming languages and codebases?

Yes, the red-green-refactor workflow is applicable across different languages and codebases for software development teams. It verifies compliance with the test-first cycle universally, supporting incremental features, refactors, and QA validation regardless of the specific platform.

What is the best way to prevent production code with no failing tests during QA validation?

The best way to prevent production code without failing tests is to enforce a strict test-first workflow with structured commands. This ensures QA validation processes only accept code that has been driven by previously failing tests, improving overall reliability.

When should I not use a test-first development workflow for refactoring code?

You should reconsider test-first development when your refactoring task lacks a clear path to define failing tests upfront. The workflow mandates structured test creation before code changes, which may not suit exploratory refactoring where expected outcomes are initially undefined.