red-green-tdd

Automate bug fixes by writing failing tests and implementing minimal code changes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/nclandrei/dotfiles --skill red-green-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: red-green-tdd
Source: https://github.com/nclandrei/dotfiles/tree/main/config/skills/red-green-tdd
Command: npx skills add https://github.com/nclandrei/dotfiles --skill red-green-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers through red-green TDD to fix bugs by first writing a failing test and then implementing the minimal change required to pass, reducing guesswork and preventing regression.

Core Features & Use Cases

  • Write a failing test that reproduces the bug to anchor the fix.
  • Implement the smallest possible code change to make the test pass.
  • Use this approach across typical bug fixes in unit-level or module-level code to ensure reliability and regression protection.

Quick Start

Write a failing test that reproduces the bug, then implement the minimal fix to make the test pass.

Frequently Asked Questions about red-green-tdd

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

FAQPage Schema
How do I fix bugs using test-driven development?

Test-driven development fixes bugs by guiding you to write a failing test that reproduces the issue, then implementing the minimal code change needed to pass it. This reduces guesswork and prevents regression in typical codebases.

What is the red-green TDD process for debugging?

The red-green TDD process for debugging involves writing a failing test that captures the bug, confirming the test fails, and modifying the source code with the smallest possible fix to turn the test green. It anchors bug fixes in unit-level tests.

Do I need a unit testing framework to apply red-green TDD?

Yes, you need a unit testing framework to apply red-green TDD. The workflow requires access to the project's source code to add tests and modify code, relying on the framework to observe test failures and confirm passing results.

When should I use red-green test-driven development for bug fixes?

Use red-green test-driven development for bug fixes when working on unit-level or module-level code to ensure reliability. It is ideal for typical codebases where you need to reproduce a bug with a failing test before applying a minimal fix.

What's the best way to prevent regression when fixing a bug?

The best way to prevent regression when fixing a bug is to anchor the fix with a failing test using red-green TDD. By implementing only the minimal change needed to pass the test, you ensure the bug is reliably fixed without introducing new issues.