tdd-green

Implement minimal code to pass a failing test in the GREEN phase.

Updated Nov 10, 2025
One-click install
npx skills add https://github.com/SwiftyJunnos/Claude-Code-with-TDD --skill tdd-green-swiftyjunnos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-green
Source: https://github.com/SwiftyJunnos/Claude-Code-with-TDD/tree/main/.claude/skills/tdd-green
Command: npx skills add https://github.com/SwiftyJunnos/Claude-Code-with-TDD --skill tdd-green-swiftyjunnos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of writing the minimum necessary code to make a failing test pass, adhering strictly to the GREEN phase of the TDD cycle.

Core Features & Use Cases

  • Minimal Implementation: Writes only the code required to satisfy the current failing test.
  • TDD Adherence: Ensures strict adherence to the RED → GREEN → REFACTOR cycle.
  • Use Case: After writing a failing test for a new user registration feature, use this skill to implement the most basic backend logic that allows the test to pass.

Quick Start

Implement the minimum code required to make the current failing test pass.

Frequently Asked Questions about tdd-green

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

FAQPage Schema
What is the minimum code needed to make a failing test pass in TDD?

The minimum code to make a failing test pass is the simplest possible solution that satisfies the test's requirements without premature optimization or additional features. It ensures all existing tests remain green while strictly adhering to the RED → GREEN → REFACTOR cycle.

How do I implement the GREEN phase of Test-Driven Development?

To implement the GREEN phase, you write only the code required to satisfy the current failing test. This approach focuses on the most basic logic that allows the test to pass, ensuring strict adherence to the TDD cycle without adding unrequested features.

Does TDD green phase implementation affect existing tests?

TDD green phase implementation ensures all existing tests remain green. By focusing on the minimum code required to pass the current failing test, it prevents regressions and maintains the integrity of the broader test suite during development.

When should I write just enough code to pass a test?

You should write just enough code to pass a test immediately after writing a failing test for a new feature. This TDD practice prevents premature optimization and additional features, ensuring the simplest possible solution satisfies the test's requirements.