tdd

tdd is Matt Pocock's agent skill for test-driven development: the agent agrees which public interfaces to test with you, then works one failing test and one minimal fix at a time.

Checked by CookiesForAI on : license and last change of the skill re-read from GitHub.

Written by

Install TDD

Install the skill with the skills CLI

Terminal
npx skills add mattpocock/skills --skill tdd

Or, in Claude Code, install the whole collection from the official marketplace

Agent chat
/plugin install mattpocock-skills

The author says to pick one route: installing both the plugin and the skills CLI copy leaves every skill twice.

Or paste this into your coding agent: Install the agent skill tdd from github.com/mattpocock/skills. Checked by CookiesForAI on : license and last change of the skill re-read from GitHub. A skill can include scripts that run on your computer, so read its source first.

What TDD does

TDD is a skill in Matt Pocock's skills collection that shapes how an agent writes tests while building a feature or fixing a bug. It loads when you ask for test-first work, mention red, green, refactor, or want integration tests. Its core idea is that tests check behavior through public interfaces, so code can be rewritten without breaking them.

Before writing any test, the agent lists the seams it plans to test, meaning the public boundaries where behavior can be observed, and asks you to confirm them. No test goes in at an unconfirmed seam. The loop then runs in vertical slices: one test, one minimal implementation, repeat. Refactoring is left out of the loop and belongs to a separate review step.

The skill names three anti-patterns: tests coupled to implementation, tautological tests that recompute the expected value the same way the code does, and horizontal slicing where all tests are written before any code. Two short guides cover what a good test looks like and when to mock, which the skill limits to system boundaries such as external APIs, time and randomness.

When to use TDD

  • You want your agent to write tests first instead of after the code.
  • Your agent's tests break on every refactor even when behavior stays the same.
  • You want to decide which parts of a module get tested before the agent starts.
  • Your agent mocks your own modules and you want it to stop.

When to pick something else

  • A strict rule that forbids keeping code written before its test: obra's Test-Driven Development skill in Superpowers enforces that.

Which agents TDD works in

Matt Pocock documents TDD for Claude Code, Codex, Any agent that reads SKILL.md files, through the skills CLI. The open skills CLI also installs it into 78 agents, including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode (we listed it with the CLI on ). See where each agent looks for skills.

TDD license

TDD is published under MIT.

More from Matt Pocock

Lists that include tdd