findaskill

—skills · counting…

30,375MCP servers

SkillsMCP serversAgent BuilderRun agentSoon
Sign in
  1. Home
  2. Skills
  3. Coding & Development
  4. tdd
Coding skillsVerified Skill

tdd: Claude Code Skill & Agent Tool

An open-source skill by mattpocock (opens in a new tab), published in the mattpocock/skills (opens in a new tab) repository on GitHub. Generates tests first and builds features or bug fixes through a strict red-green-refactor loop, with clear guidance on where tests belong and the anti-patterns that make suites brittle.

Install tdd

Requires Node.js
$ npx skills add mattpocock/skills --skill tdd

Run this command in your project terminal to install this skill for Claude Code.

What this skill does

tdd is Matt Pocock's test-driven development skill for AI coding agents. It is the reference the agent consults on every red-green cycle so the loop produces tests worth keeping, not just tests that pass. Good tests, in this skill, verify behavior through public interfaces rather than implementation details: they read like a specification and survive a refactor.

Before writing anything, the agent agrees with you on the seams — the public boundaries where behavior is observed — and notes what each seam catches and what it misses. No test is written at an unconfirmed seam, so testing effort lands where it matters. The loop itself is strict: red before green, one seam, one test and one minimal implementation per cycle, with no speculative features.

The skill also names the anti-patterns that make suites brittle: implementation-coupled tests that mock internal collaborators, tautological assertions that recompute the expected value, and horizontal slicing, where all tests are written before any code. Refactoring is left to the review stage. Use it with Claude Code whenever you build a feature or fix a bug and want a regression test to prove it.

Key Capabilities

  • Strict red-green loop: write the failing test first, then only enough code to pass
  • Agrees the seams (public interfaces) with you before any test is written
  • Tests behavior through public interfaces, never implementation details
  • Flags anti-patterns: implementation-coupled, tautological and horizontally sliced tests
  • Reads the project's GLOSSARY.md and ADRs so tests use your domain language

How to use with Claude Code & AI Agents

  1. 01

    Install the skill

    Run the command above at the root of your project. The CLI asks which agents to set up — Claude Code, Cursor and other supported agents — and adds tdd to the project, so teammates who pull the repository get it too. Add -g to install it for your user account across every project.
  2. 02

    Open a new agent session

    Start a fresh Claude Code session in that project so the agent loads the new skill. This skill needs no extra tool or API key.
  3. 03

    Ask in plain words

    Describe the task, for example:“Fix the rounding bug in invoice totals test-first, red then green.”The agent matches your request to the skill's description and follows its SKILL.md instructions step by step. Read them on GitHub before using the skill on a system that matters.

Skill details

Author
mattpocock (opens in a new tab)
Repository
mattpocock/skills (opens in a new tab)
Install name
tdd
Category
Coding & Development
Works with
  • Claude Code
  • Cursor
  • Agent CLI
Requirements
  • Node.js (runs the installer)
View source on GitHub (opens in a new tab)

Verified by findaskill: the repository exists and npx skills add finds this skill under this exact name.

Related Skills in Coding & Development

  • mattpocock

    code-review

    Reviews every change since a commit, branch or tag along two axes — your repository's documented coding standards and the original issue or spec — running both reviews in parallel and reporting them side by side.

    View skill
  • github

    refactor

    Surgical refactoring that improves maintainability without changing behavior: extract functions, rename variables, break up god functions, tighten types and remove code smells step by step.

    View skill
Back to all Coding & Development skills

By using it, you agree to our Terms and Privacy Policy. . Contact us.

Explore Skills & Tools

findaskill

The open skills directory for Claude Code & AI agents

© 2026 findaskill

Categories

  • Coding
  • SEO
  • Scraping
  • DevOps
  • Security
  • MCP

Featured Skills

  • seo-auditMarketing & Technical SEO
  • firecrawl-seo-auditWeb Crawling & Audit
  • audit-websiteAutomated Code Fixer
  • web-quality-seoLighthouse & Standards

Platform & Legal

  • Skills Catalog
  • Categories
  • MCP Directory
  • Terms
  • Privacy