---
title: "tdd skill: test-driven development with an AI coding agent"
canonical_url: https://cookiesforai.app/skills/mattpocock/tdd
last_updated: 2026-10-02T01:58:30+02:00
type: skill
summary: "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: "npx skills add mattpocock/skills --skill tdd"
related:
  - "https://cookiesforai.app/skills/trailofbits/mutation-testing"
  - "https://cookiesforai.app/skills/microsoft/playwright-cli"
  - "https://cookiesforai.app/skills/obra/systematic-debugging"
  - "https://cookiesforai.app/skills/obra/test-driven-development"
  - "https://cookiesforai.app/skills/mattpocock/grill-me"
---

# 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.

| Fact | Value |
|---|---|
| Publisher | Matt Pocock |
| Source | https://github.com/mattpocock/skills/tree/HEAD/skills/engineering/tdd |
| License | MIT |
| Repository stars | 273,901 on 2026-10-02 |
| Skill name | tdd |
| Category | Testing and debugging |
| Skill last changed | 2026-09-17 |
| Page updated | 2026-10-02 |
| Facts checked | 2026-10-02 |

## Install

Install the skill with the skills CLI:

```
npx skills add mattpocock/skills --skill tdd
```

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

```
/plugin install mattpocock-skills
```

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

## Ask your coding agent

A skill can include scripts that run on your computer, so read its source first: https://github.com/mattpocock/skills/tree/HEAD/skills/engineering/tdd

```text
Install the agent skill tdd from github.com/mattpocock/skills.
```

## What it 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 it

- 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 it works in

Matt Pocock documents it 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 (listed with the CLI on 2026-10-01).

## License

MIT.

## Related

### Related skills for testing and debugging

- [Mutation testing](https://cookiesforai.app/skills/trailofbits/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.
- [Playwright CLI](https://cookiesforai.app/skills/microsoft/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.
- [Systematic Debugging](https://cookiesforai.app/skills/obra/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.
- [Test-Driven Development](https://cookiesforai.app/skills/obra/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.

### More from Matt Pocock

- [Grill me](https://cookiesforai.app/skills/mattpocock/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.

