tdd

Guide software projects through disciplined RED, GREEN, and REFACTOR phases.

7|2|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/mthines/agent-skills --skill tdd-mthines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/mthines/agent-skills/tree/main/skills/tdd
Command: npx skills add https://github.com/mthines/agent-skills --skill tdd-mthines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers rigorously implement and maintain high-quality code by enforcing strict test-driven development processes.

Core Features & Use Cases

  • Workflow Enforcement: Guides users through RED-GREEN-REFACTOR cycles to ensure disciplined testing and coding.
  • Test Discovery & Validation: Assists in identifying existing tests, establishing test setup, and verifying proper failure and success conditions.
  • Use Case: A developer wants to add a new feature, using this Skill to write a failing test, implement minimal code, and refactor confidently without breaking existing functionality.

Quick Start

Use the tdd skill to implement a new feature by first writing a failing test, then making it pass, and finally refactoring for clarity and quality.

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 when adding new features?

Test-driven development improves code quality by requiring a failing test before implementation. This Skill enforces the RED, GREEN, and REFACTOR cycle to maintain high code quality and ensure maintainability across your software projects.

What is the best way to refactor existing code without breaking current functionality?

Refactoring existing code safely requires running automated quality checks after making tests pass. This Skill facilitates the REFACTOR phase to improve clarity while verifying that existing functionality remains intact through continuous test validation.

How do I discover and set up tests for an existing codebase?

Discovering tests for an existing codebase involves identifying current test coverage and validating failure conditions. This Skill assists in test discovery and validation to ensure your test setup properly verifies existing code behavior.

Does test-driven development work for refactoring legacy code with no existing tests?

Test-driven development for legacy code involves writing new tests for existing behavior before refactoring. This Skill supports writing tests for existing code, enabling you to safely improve untested software through the standard test cycle.

Why does my test cycle fail to catch regressions during refactoring?

A test cycle fails to catch regressions when tests do not properly validate failure and success conditions. This Skill enforces rigorous test validation to ensure your tests accurately capture and detect broken functionality during refactoring.