01
It starts by itself
you start a feature. Runs in Claude Code routine.
- ↻ you start a feature
user asks to build a feature or fix a bug test-first
Features built test-first, one small step at a time.
Install the TDD skill and make it a habit: follow https://gethabit.dev/skills/mattpocock/tdd.md
1.1M installs300K starsMIT licenceSource on GitHub ↗

TDD
by Matt Pocock · 1.1M installs
The skill
Teaches your agent to write a test first, then the code.
Only when you ask.
Fewer bugs
Features built test-first, one small step at a time. Fewer bugs and safer changes.
↻ Runs by itselfwhen you start a feature
When does it start? How does it check its work? What does it remember?
Stops after 5 slices per run or 2 failed tries to turn one test green.
Your agent reads GLOSSARY.md if it exists and respects ADRs in the area.
It proposes the public seams to test, each with what it catches and misses, and you confirm.
When the interface shape is unclear, it calls the codebase design skill for the vocabulary.
It writes one failing test at a confirmed seam.
It writes only enough code to make that test pass.
It marks the slice done on the board and starts the next one.
Refactoring waits for the review stage with the code review skill.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the TDD skill helps.
The skill writes no test at a seam you have not agreed, so effort lands on the paths that matter.
No. Refactoring is left out of the red to green cycle and handed to the code review skill.
Tests tied to internals, tests that recompute the expected value, and writing all tests before any code.
Copy the prompt at the top into your agent. It installs the skill from mattpocock/skills and sets up the habit. Or run npx skills add mattpocock/skills --skill tdd.
Yes. It is published under MIT. Habit is free too.
Install the TDD skill and make it a habit: follow https://gethabit.dev/skills/mattpocock/tdd.md
All Matt Pocock skills →More code skills →
Works in
Made by Matt Pocock, published under MIT. Habit links to the original and never changes it. Is this your skill?