Skip to content
Skill

TDD

Guides an agent through test-first red-green cycles for features and bug fixes

TDD is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
6
Last commit
License
MIT
Listing updated

Similar skills

About TDD

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (1 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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

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

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

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

More from Kripu77/software-factory

  1. Lets an agent drive a real browser to QA a running web app and capture evidence

    • Open source
    • 6 GitHub stars
    • Developer tools
  2. Runs an intentionally harsh maintainability review of code changes on request

    • Open source
    • 6 GitHub stars
    • Developer tools
  3. Guides an agent through implementing a spec or GitHub ticket inside a repo checkout

    • Open source
    • 6 GitHub stars
    • Developer tools
  4. Runs an AI agent as a software factory tech lead that triages work and dispatches it

    • Open source
    • 6 GitHub stars
    • Developer tools
  5. Watches a pull request's CI checks and fixes failures until they pass

    • Open source
    • 6 GitHub stars
    • Developer tools
  6. Generates Mermaid diagram code for flowcharts, sequence, ER, Gantt and more

    • Open source
    • 6 GitHub stars
    • Design and media