tdd

Automate Test-Driven Development with Kent Beck's Red-Green-Refactor cycle.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Traditional development often mixes testing and implementation, leading to late defect discovery and brittle code. This skill provides a structured, repeatable workflow that guides teams to write failing tests first, then implement just enough code to pass, and finally improve structure without changing behavior.

Core Features & Use Cases

  • Red-Green-Refactor workflow: a disciplined cycle with explicit RED, GREEN, and REFACTOR phases and commit-at-each-step discipline.
  • Structured guidance: clear rules for when to write tests, run them, and perform safe refactors.
  • Use Case: apply TDD to a new feature to ensure tests drive design and protect against regressions.

Quick Start

Start by writing a small failing test for a new feature, commit it, then implement the minimal code to pass, and finally refactor while committing each step.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle is a test-driven development workflow where you write a failing test, implement minimal code to pass it, and then improve the structure without changing behavior.

How do I start writing tests before code using a TDD workflow?

Start writing tests before code by creating a small failing test for a new feature, committing it, implementing the minimal code to pass, and refactoring while committing each step.

When should I use test-driven development for a new feature?

Use test-driven development for a new feature when you need tests to drive design, protect against regressions, and ensure late defect discovery does not lead to brittle code.

Does test-driven development enforce commit discipline during refactoring?

Yes, test-driven development enforces commit discipline by requiring explicit commits at the RED, GREEN, and REFACTOR phases to ensure traceability and design stability.

What is the best way to avoid mixing testing and implementation in software engineering?

The best way to avoid mixing testing and implementation is applying a structured red-green-refactor workflow that separates writing tests, implementing features, and refactoring into distinct phases.

Why do I need to commit at each step of the red-green-refactor process?

You need to commit at each step of the red-green-refactor process to enforce phase-based workflow discipline, ensuring traceability and design stability throughout the test-driven development cycle.