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.

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

Terminal
/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. 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 October 1, 2026). See where each agent looks for skills.

TDD license

TDD is published under MIT.

  • Mutation testing: mutation-testing is Trail of Bits' agent skill for configuring mutation testing campaigns with its mewt or muton tools, reading surviving mutants, telling equivalent mutants from real test gaps, and hunting bugs they expose. (7,328 repository stars on October 2, 2026)
  • Playwright CLI: playwright-cli is Microsoft's agent skill for driving a real browser from the terminal: open pages, click and fill by element reference, take snapshots and screenshots, mock requests and generate Playwright tests. (13,721 repository stars on October 2, 2026)
  • Systematic Debugging: Systematic Debugging is an agent skill from Superpowers that makes your agent find the root cause of a bug or failing test before it proposes any fix, instead of guessing. (293,976 repository stars on October 2, 2026)
  • Test-Driven Development: Test-Driven Development is an agent skill from Superpowers: your agent writes a failing test first, watches it fail, then writes only the code needed to make it pass. (293,976 repository stars on October 2, 2026)

More from Matt Pocock

  • Grill me: grill-me is Matt Pocock's agent skill that turns your agent into a relentless interviewer, asking numbered rounds of questions about a plan or design until every decision is settled. (273,901 repository stars on October 2, 2026)

Lists that include tdd