Skip to content

Guide · Agent skill

How to use the tdd agent skill: test-first coding with an agent

Updated · written with AI from the project's own documentation and checked against our catalogue data

The tdd skill is a set of instructions, in a file called SKILL.md, that tells an AI agent to build features and fix bugs test-first, one failing test at a time. It is aimed at developers who want that discipline on a feature or bug fix, and at teams that already agree on where their tests should sit. After this guide you will know what the skill changes about the agent's behaviour, how to install it, how to ask for it in plain language, and what output to expect.

Test-First DevelopmentYeachan-Heo/oh-my-claudecode · MIT

Quick start

  1. 1Download the ZIP. Download the tdd skill ZIP from this page.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use or into your project's .claude/skills/ folder.
  3. 3Or upload in the apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
  4. 4Agree your seams. Name the places you want tested and confirm them with the agent before any test is written.
  5. 5Ask for a test-first change. Describe the feature or bug in plain language and mention test-first or TDD.
  6. 6Review the red/green evidence. Check the seam list, the failing run and the passing run the agent reports.

What the tdd skill makes the agent do

Without the skill, an agent may write code and tests in whatever order it likes. With the skill installed, the agent follows a strict loop: write the next test at a seam, run it, and confirm it fails for the reason you expect. Only then does it write the smallest change that makes that test pass, and then it repeats.

A seam is a place in the code where a test is allowed to enter. The skill says seams must be agreed with you before the first test is written. A seam nobody approved gets no tests.

  • One test, then one implementation, then repeat.
  • A test that cannot fail is not counted as a test.
  • Expected values come from a spec, a worked example or documented output, not from the code under test.
  • Test doubles are used only at the boundary class recorded for each seam.
  • Refactoring is kept out of the red-green loop.
  • A bug fix starts with a failing test that reproduces the bug.

Install the tdd skill

Download the ZIP for the skill from this page. Then install it in one of two ways. For a personal setup, unzip it into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder. Alternatively, upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

The skill's package includes a single file, SKILL.md. Check that the folder ends up containing that file after unzipping.

  • Personal install: ~/.claude/skills/ (unzip the ZIP here).
  • Project install: .claude/skills/ inside your project (unzip the ZIP here).
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP.
~/.claude/skills/

Trigger the skill with natural requests

You do not need a special command. Describe the work in plain terms and mention test-first or TDD so the agent knows to apply the skill. The skill is most useful when you name the seams up front, because the agent will stop and ask for them if they are missing.

Good requests name the behaviour, the bug or the feature, and the places you want tested. For example, you might say that you want the agent to fix a bug using a failing test first, or to add a feature test-first at the seams you have already agreed.

  • Add a discount rule to checkout, test-first, at the pricing and order seams we agreed.
  • Reproduce this bug with a failing test before you try to fix it.
  • Use TDD for the export feature. Confirm the seams with me first.

What the agent reports back

When the skill is working, the agent's output is organised around evidence. It lists the seams it used, with each seam's boundary class and a line on what that seam catches and what it lets through. It shows the failing run and the passing run for the tests. If no approved seam fits some behaviour, it reports that as a finding rather than inventing a new seam or testing through internals.

Those findings are meant to feed other skills named in the source, architecture-survey and refit.

  • Seam list with boundary classes and catch/miss lines.
  • Red and green test evidence.
  • Seam-absence findings, where nothing testable fits.

Safety notes: scripts and network

According to the skill's listing, it requires nothing beyond itself, it does not run scripts, and it does not use the network. It consists of one instruction file, SKILL.md. The agent still runs your tests through whatever tooling your project already uses, so the normal rules for your own test commands apply.

  • Requires: nothing listed.
  • Runs scripts: no.
  • Uses network: no.
  • Files: SKILL.md only.

Tips for getting good results

Agree the seams before you start. If you have a seam list from a previous review, give it to the agent. The skill is strict about this, and a vague request will likely make the agent pause and ask.

Keep the loop small. The skill asks for tracer bullets, so a good first test covers a narrow but complete path through the behaviour, not a whole layer. Skip the skill for refactoring, which it explicitly excludes.

  • Give the agent your agreed seams and boundary classes up front.
  • Ask for a bug reproduction test before any fix.
  • Expect a pause if no seam fits; that is intended behaviour.
  • Do not use it for throwaway scripts where test discipline adds overhead.

What people use it for

  • Adding a feature to an existing codebase one tracer-bullet test at a time.
  • Reproducing a bug with a failing test before attempting any fix.
  • Checking that an agent's tests use expected values from a spec rather than from its own code.
  • Finding places in a project where no approved test seam exists, and reporting them as gaps.

Frequently asked questions

How do I install the tdd agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

Does the tdd skill require anything else to run?

The listing says it requires nothing beyond the skill itself. It runs no scripts and uses no network, and the package contains a single file, SKILL.md.

Is the tdd skill free?

The source material for this listing does not state pricing or licence terms beyond that the upstream project is MIT licensed. Check the project's licence file before you rely on it.

Why does the agent stop and ask me questions?

The skill requires that seams are agreed with you before any test is written. If a request does not name any approved seams, the agent will pause rather than guess, which can feel slow for casual requests.

Can I use the tdd skill for refactoring?

No. The skill explicitly excludes refactoring from the red-green loop and keeps it for a review stage. Use it for feature work and bug fixes instead.

What should I do if the agent says no seam fits?

Treat that as a finding. The skill asks the agent to report the missing seam rather than invent one or test through internals. You can then decide where a testable seam should go.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use the tdd skill if you want a disciplined, evidence-based test-first workflow for features and bug fixes, and your project already has, or is willing to agree, clear test seams. Pick something else for quick prototypes, exploratory scripts, or casual requests where the seam-agreement step and test loop would be more overhead than you want.

Download the skill