Skip to content

bcostaaa01/tdd-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

A Claude Code skill that enforces the Red → Green → Refactor TDD cycle for new feature implementations.

Usage

/tdd <feature description>

Example:

/tdd implement a modularized Calculator class in JavaScript that adds two numbers

How It Works

The skill locks you into one TDD phase per response — it will never write a test and its implementation at the same time.

Phase 1: RED

Claude writes a failing test file only. No production code is touched.
You run the suite and confirm it fails before moving on.

Phase 2: GREEN

Claude writes the minimum production code to make the failing test pass.
No extra logic, no future-proofing, no speculative methods.
You run the suite and confirm it is green before moving on.

Phase 3: REFACTOR

Claude proposes a cleaned-up version of the code.
The test suite must remain green after every refactor.

Rules

- Tests are written before any production code
- Only external system boundaries are mocked (databases, network APIs) — never internal logic
- Each response does exactly one phase
- Production code does only what the current test demands

About

A Claude skill to implement a feature using TDD to get early feedback rather than writing tests after.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors