tdd

Automate red/green/refactor TDD cycles with phase tracking and test execution.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development is hard to adopt without a clear cycle and discipline. This Skill codifies the red/green/refactor workflow and explicit phase prompts to keep teams focused on tests first and incremental improvement.

Core Features & Use Cases

  • Red Phase: Write a failing test for a feature before any implementation.
  • Green Phase: Implement the minimal code to satisfy the test, avoiding extra features.
  • Refactor Phase: Improve design while keeping tests green.
  • Usage & Integration: Use plan mode to explore test strategy and track cycles, with automatic test hooks when test files change.

Quick Start

Start a TDD cycle by running /tdd and then describe the feature to begin the red phase.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I enforce strict test-driven development cycles in my software workflow?

Test-driven development discipline is enforced by automating red/green/refactor cycles with explicit phase prompts. This prevents test-then-implementation shortcuts and maintains one-behavior-per-cycle focus across feature development.

What is the red-green-refactor workflow and how does it drive feature design?

The red-green-refactor workflow drives feature design by writing a failing test first, implementing minimal code to pass it, then improving the design. This cycle keeps development focused on tests first and incremental improvement.

How to prevent writing implementation before tests in agile development?

To prevent writing implementation before tests, the workflow enforces one-behavior-per-cycle discipline and blocks test-then-implementation shortcuts. It coordinates phase tracking to ensure tests always precede code.

Can I automate test execution during the refactor phase?

You can automate test execution during the refactor phase using automatic test hooks. These hooks trigger test execution whenever test files change, ensuring tests stay green while you improve the code design.

Do I need plan mode to explore test strategy for TDD?

You need plan mode to explore test strategy and track red/green/refactor cycles effectively. It provides the environment to design tests before implementation and coordinate phase tracking across features.

When should I not use strict red-green-refactor cycles?

Strict red-green-refactor cycles may not suit exploratory prototyping or spike testing where immediate implementation is needed. The one-behavior-per-cycle discipline is designed for structured feature development, not unstructured experimentation.