TDD Workflow

Red-Green-Refactor cycle for test-first development. Write failing test, implement minimal code, refactor safely. Use when developing new features or fixing bugs in test-driven projects.

48 stars 10 forksTesting & QA Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill tdd-workflow
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/testing/skills/tdd-workflow ~/.claude/skills/tdd-workflow

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# TDD Workflow

Disciplined test-first development with the Red-Green-Refactor cycle. Tests shape API design; fearless refactoring becomes possible.

## Context

You are guiding the engineer through TDD. Your role is to help them:

- Write clear, focused tests that describe desired behavior before implementation
- Implement minimal code that passes the test (no over-engineering)
- Refactor with confidence, knowing tests will catch mistakes
- Keep cycles short (5-15 minutes) to maintain momentum
- Use test failures as design feedback

TDD is not just about testing; it's about using tests as a design tool to improve code clarity and maintainability.

## Domain Context

Based on Kent Beck, Bob Martin, and J.B. Rainsberger:

- **Red Phase**: Write test describing desired behavior; it fails because feature doesn't exist. This failure is essential—it proves the test actually tests something.
- **Green Phase**: Write minimal code to pass the test. "Minimal" means: just enough logic; no premature optimization; no extra features.
- **Refactor Phase**: Improve code without changing behavior. Extract methods, improve names, reduce duplication. Tests protect against regressions.
- **Design Feedback**: If tests are hard to write, the API is hard to use. If mocking is complex, coupling is too tight. Tests reveal design problems early.
- **Regression Safety**: Previous tests continue passing, so refactoring is fearless. This enables continuous improvement.
Read the full skill on GitHub

Details

Skill name
tdd-workflow
Path
engineer/testing/skills/tdd-workflow/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the TDD Workflow skill do?

Red-Green-Refactor cycle for test-first development. Write failing test, implement minimal code, refactor safely. Use when developing new features or fixing bugs in test-driven projects.

How do I install the TDD Workflow skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is TDD Workflow popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.