# TDD

> TDD is an open-source agent skill for developer tools. Guides an agent through test-first red-green cycles for features and bug fixes. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/Kripu77/software-factory/tree/main/skills/tdd
- **Repository:** https://github.com/kripu77/software-factory
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** tdd
- **Collection:** https://github.com/Kripu77/software-factory
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill sets out a test-driven development loop for an agent. It asks the agent to read a CONTEXT.md file when one exists so test names match the domain glossary, and to respect recorded architecture decisions. Tests are meant to target public interfaces rather than internals, and the agent is told to agree on the boundaries it will test at, written down before the first test, and to confirm them with a human when one is present in the session.

The workflow runs in small cycles: one seam, one test, one minimal implementation, with a failing test always written before the code that makes it pass. The skill also names common anti-patterns to avoid, such as mocking internals, tautological expected values, and writing all tests before all implementation. Refactoring is handled separately and is pointed to a code review step.

The skill is plain instructions in a single SKILL.md file with no scripts. It assumes the agent can read project files and run the project's own tests.

## When your agent uses it

> Use when implementing features or bug fixes test-first.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Kripu77/software-factory/tree/HEAD/skills/tdd)
- [License: MIT](https://github.com/Kripu77/software-factory/tree/HEAD/skills/tdd)

## Features

- **Red-green test cycles:** Enforces writing a failing test first, then the smallest implementation that passes it.
- **Public interface testing:** Directs tests at public boundaries so they read like specs and survive refactors.
- **Seam agreement:** Asks the agent to define and record test seams before writing any test.
- **Domain glossary alignment:** Uses a CONTEXT.md file, when present, so test names match the project's vocabulary.
- **Anti-pattern guardrails:** Flags implementation-coupled, tautological and horizontally sliced tests.

## Good for

- Implement a new feature test-first
- Fix a bug by writing a failing test before changing code
- Plan which public boundaries a feature should be tested through
- Check that a set of tests avoids mocking internals

## Install

### Claude Code

This skill ships in the `software-factory` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Kripu77/software-factory
/plugin install software-factory@software-factory
```

Or copy only this skill to `~/.claude/skills/tdd`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.claude/skills/tdd &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/tdd` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/tdd` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.agents/skills/tdd &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/tdd` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/tdd` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.cursor/skills/tdd &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/tdd` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Kripu77/software-factory.git --path skills/tdd
```

Or copy the folder to `~/.gemini/skills/tdd` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/tdd`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.copilot/skills/tdd &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/tdd` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Kripu77/software-factory.git
```

Then copy `software-factory/skills/tdd` into your agent's skills folder as `tdd`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does TDD run any scripts or tools?

No. The skill has no scripts and sets no allowed tools; it is a SKILL.md instruction file.

### What does TDD need from the project?

It reads CONTEXT.md if the project has one and respects any ADRs, so the agent can match test names to the domain glossary.

### Does TDD handle refactoring?

No. The skill states refactoring is not part of its loop and points to /code-review for it.

### How do I install TDD in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/tdd to use it in all your projects, or to .claude/skills/tdd in one project. Or install the software-factory plugin, which includes it: /plugin marketplace add Kripu77/software-factory, then /plugin install software-factory@software-factory.

### Does TDD run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use TDD?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to TDD?

The closest alternatives to TDD are TDD, TDD workflow, TDD loop, TDD and Django TDD.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [TDD](https://ai-powered.com/skills/tdd): TDD is an open-source agent skill for developer tools.
- [TDD workflow](https://ai-powered.com/skills/tdd-workflow-nabwinsaud): TDD workflow is an open-source agent skill for developer tools.
- [TDD loop](https://ai-powered.com/skills/tdd-loop): TDD loop is an open-source agent skill for developer tools.
- [TDD](https://ai-powered.com/skills/tdd-michael-denyer): TDD is an open-source agent skill for developer tools.
- [Django TDD](https://ai-powered.com/skills/django-tdd): Django TDD is an open-source agent skill for developer tools.
- [Develop](https://ai-powered.com/skills/develop): Develop is an open-source agent skill for developer tools.
- [Cpp testing](https://ai-powered.com/skills/cpp-testing): Cpp testing is an open-source agent skill for developer tools.
- [Test](https://ai-powered.com/skills/test): Test is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/tdd-kripu77
