tdd

Enforce a Red-Green-Refactor TDD cycle for bug fixes and features.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that code changes follow the Test-Driven Development (TDD) methodology, preventing regressions and improving code quality by enforcing a Red-Green-Refactor cycle.

Core Features & Use Cases

  • Bug Fixes: Guarantees that a failing test is written before any fix is implemented, proving the bug's existence.
  • New Features: Enforces writing tests first for new feature development, ensuring testability and correctness from the start.
  • Workflow Enforcement: Guides the user through the Red (failing test), Green (minimal implementation), and Refactor stages, with clear confirmation steps.
  • Use Case: When a bug is reported, you use this skill to first write a test that fails due to the bug, then implement the minimal code to make it pass, ensuring the bug is fixed and won't reappear.

Quick Start

Initiate the TDD cycle by writing a failing test for the code you intend to modify.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I enforce a test-driven development workflow for bug fixes?

To enforce a test-driven development workflow for bug fixes, you must first write a failing test that proves the bug's existence, then implement the minimum code required to make it pass.

What is the Red Green Refactor cycle and when should I use it?

The Red Green Refactor cycle is a test-driven development process where you write a failing test, implement minimal code to pass it, and then optionally refactor. Use it to prevent regressions and improve code quality.

How to start writing tests first for new feature development?

To start writing tests first for new feature development, initiate the cycle by writing a failing test for the intended code modification, ensuring testability and correctness from the very start.

Does this TDD workflow support multi-stack projects?

Yes, this TDD workflow supports multi-stack projects by resolving stack-specific test commands, allowing you to maintain the Red Green Refactor cycle across different technology stacks.

What is the best way to prevent code regressions when adding new features?

The best way to prevent code regressions when adding new features is to enforce a strict test-driven development methodology, mandating that tests are written before the actual feature implementation.