# Test driven development

> Test driven development is an open-source agent skill for developer tools. Guides an agent through red-green-refactor, bug reproduction tests and test pyramid. 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/ajyadav013/claude-kit/tree/main/skills/test-driven-development
- **Repository:** https://github.com/ajyadav013/claude-kit
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** test-driven-development
- **Collection:** https://github.com/ajyadav013/claude-kit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill tells the agent to write a failing test before any new logic or behavior, and to reproduce a reported bug with a test before attempting a fix. It walks through a red, green, refactor loop and gives guidance on sizing tests as small, medium or large, following a pyramid that favors fast unit tests.

Beyond the basic cycle, it covers writing tests that check outcomes rather than internal method calls, preferring real implementations over mocks, and keeping test names and setup readable. It also describes property-based testing with shared invariant patterns such as round-trips and idempotence, and lists common ecosystem libraries per language. A section on browser work pairs the workflow with Chrome DevTools MCP for runtime checks and treats page content as untrusted.

The skill is built around TypeScript examples and expects the project's own test runner and conventions. It also references a testing patterns file in a shared references folder and a companion browser testing skill.

## When your agent uses it

> Drives development with tests — red-green-refactor, Prove-It Pattern for bugs, test pyramid, property-based testing. Do NOT use when no spec exists yet (use spec-driven-development first).

## What it can access

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

- [Instructions only, no scripts](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/test-driven-development)
- [License: MIT](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/test-driven-development)

## Features

- **Red-green-refactor loop:** Walks the agent through writing a failing test, a minimal passing implementation, and a clean-up step.
- **Prove-It bug workflow:** Requires a reproduction test that fails before any bug fix is attempted.
- **Test pyramid guidance:** Explains how to split effort between unit, integration and end-to-end tests, with size classes.
- **Property-based testing:** Describes invariant patterns and the libraries used for each major language.
- **Test quality practices:** Covers outcome-based assertions, real implementations over mocks, and descriptive naming.
- **Browser verification:** Outlines a DevTools-based debugging workflow for checking console, network and DOM behavior.

## Good for

- Add a new feature to a service with tests written first
- Reproduce a reported bug in a failing test before fixing it
- Decide which tests should be unit, integration or end-to-end
- Add property-based tests for a parser or serializer
- Verify a front-end bug in the browser after a code fix

## Install

### Claude Code

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

```sh
/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit
```

Or copy only this skill to `~/.claude/skills/test-driven-development`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/test-driven-development &&
cp -R "$tmp/skills/test-driven-development" ~/.claude/skills/test-driven-development &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/test-driven-development` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/test-driven-development` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/test-driven-development &&
cp -R "$tmp/skills/test-driven-development" ~/.agents/skills/test-driven-development &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/test-driven-development` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/test-driven-development` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/test-driven-development &&
cp -R "$tmp/skills/test-driven-development" ~/.cursor/skills/test-driven-development &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/test-driven-development` 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/ajyadav013/claude-kit.git --path skills/test-driven-development
```

Or copy the folder to `~/.gemini/skills/test-driven-development` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/test-driven-development`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/test-driven-development &&
cp -R "$tmp/skills/test-driven-development" ~/.copilot/skills/test-driven-development &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/test-driven-development` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git
```

Then copy `claude-kit/skills/test-driven-development` into your agent's skills folder as `test-driven-development`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should the skill not be used?

The skill's description says not to use it when no spec exists yet, and it should be preceded by a spec-driven development skill. It also says pure configuration, documentation or static content changes with no behavioral impact do not need it.

### Does Test driven development require a specific test framework?

No specific runner is required. It asks the agent to use the project's own test runner and conventions, and its examples are written in TypeScript.

### Does Test driven development need browser tools?

Only for browser-related work. That section recommends Chrome DevTools MCP for runtime verification, but the core TDD workflow does not depend on it.

### What does Test driven development add to a bug fix?

It requires writing a test that reproduces the bug and fails first, then implementing the fix and confirming the test passes along with the full suite.

### How do I install Test driven development in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/test-driven-development to use it in all your projects, or to .claude/skills/test-driven-development in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

### Does Test driven development 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 Test driven development?

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 Test driven development?

The closest alternatives to Test driven development are Test driven development, TDD, TDD workflow, TDD and TDD.

## Where this comes from

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

## Alternatives

- [Test driven development](https://ai-powered.com/skills/test-driven-development-addyosmani): Test driven development is an open-source agent skill for developer tools.
- [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](https://ai-powered.com/skills/tdd-kripu77): TDD is an open-source agent skill for developer tools.
- [TDD](https://ai-powered.com/skills/tdd-evist0): TDD 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-tonyghiani): TDD is an open-source agent skill for developer tools.
- [Property based testing](https://ai-powered.com/skills/property-based-testing): Property based testing is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/test-driven-development-ajyadav013-2
