Agent skill

Test Driven Development

by bobmatnyc in bobmatnyc/claude-mpm

Write the test first, watch it fail, write minimal code to pass

MITAuto-check passedTesting & QA

Install Test Driven Development

skills CLI
$ npx skills add bobmatnyc/claude-mpm --skill test-driven-development -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bobmatnyc/claude-mpm test-driven-development --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bobmatnyc/claude-mpm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/claude_mpm/skills/bundled/testing/test-driven-development .claude/skills/test-driven-development && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
test-driven-development
GitHub stars
155
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
483 words
Files
6 (incl. references)
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Write the test first, watch it fail, write minimal code to pass

  • Works in 4 steps: RED: Write a failing test first → GREEN: Write minimal code to make test… → REFACTOR: Improve code while keeping… → …
  • Tasks that involve Test-driven development
  • SKILL.md covers Overview, When to Use This Skill, The Iron Law and Core Principles, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Test Driven Development is an agent skill from bobmatnyc/claude-mpm. Write the test first, watch it fail, write minimal code to pass

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/anti-patterns.md`, `references/examples.md` and `references/integration.md`).

It sits in Testing & QA, covering Test-driven development. The repository describes itself as: Claude Multi-Agent Project Manager — multi-channel orchestration, GitHub-first SDK mode, and plugin system for Claude. The licence is MIT.

When your agent uses it

  • Tasks that involve Test-driven development

Example prompts

  • “/test-driven-development”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. RED: Write a failing test first
  2. GREEN: Write minimal code to make test pass
  3. REFACTOR: Improve code while keeping tests green
  4. NEVER: Write implementation before tests

What it can do on your machine

Read from SKILL.md and the folder at commit 25203d3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Driven Development loads about 1.2k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 22 tokens; SKILL.md has 483 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bobmatnyc/claude-mpm at commit 25203d3, republished under its MIT licence (© bobmatnyc). 483 words, ~1,204 tokens.

Download SKILL.mdSave it as .claude/skills/test-driven-development/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
test-driven-development
description
Write the test first, watch it fail, write minimal code to pass
version
3.2.0
category
testing
author
Jesse Vincent
license
MIT
source
https://github.com/obra/superpowers-skills/tree/main/skills/testing/test-driven-development
progressive_disclosure.references
workflow.md, examples.md, philosophy.md, anti-patterns.md, integration.md
context_limit
800
tags
tdd, testing, red-green-refactor, test-first
effort
high

Test-Driven Development (TDD)

Overview

Write the test first. Watch it fail. Write minimal code to pass.

Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.

This skill enforces strict test-first development following the RED/GREEN/REFACTOR cycle. Violating the letter of the rules is violating the spirit of the rules.

When to Use This Skill

Always:

  • New features
  • Bug fixes
  • Refactoring
  • Behavior changes

Exceptions (ask human partner):

  • Throwaway prototypes
  • Generated code
  • Configuration files

Thinking "skip TDD just this once"? Stop. That's rationalization.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? Delete it. Start over.

No exceptions:

  • Don't keep it as "reference"
  • Don't "adapt" it while writing tests
  • Delete means delete

Core Principles

  1. RED: Write a failing test first
  2. GREEN: Write minimal code to make test pass
  3. REFACTOR: Improve code while keeping tests green
  4. NEVER: Write implementation before tests

Quick Start

The RED/GREEN/REFACTOR Cycle
RED → Verify RED → GREEN → Verify GREEN → REFACTOR → Repeat
  1. RED: Write one minimal test showing desired behavior
  2. Verify RED: Run test, confirm it fails for right reason
  3. GREEN: Write simplest code to pass test
  4. Verify GREEN: Run test, confirm it passes
  5. REFACTOR: Clean up while keeping tests green
  6. Repeat: Next test for next feature

Cycle Details

RED: Write one minimal test (one behavior, clear name, real code) Verify RED: MANDATORY - watch it fail for right reason GREEN: Write simplest code to pass (no extras) Verify GREEN: MANDATORY - watch it pass, all tests pass REFACTOR: Clean up while keeping tests green (optional)

Navigation

For detailed information:

  • Workflow: Complete RED/GREEN/REFACTOR workflow with detailed examples
  • Examples: Real-world TDD scenarios with step-by-step walkthroughs
  • Philosophy: Why order matters and why tests-after don't work
  • Anti-patterns: Common mistakes, rationalizations, and red flags
  • Integration: Using TDD with debugging and other skills
Show full SKILL.md (189 more words)Show less

Key Reminders

  • ALWAYS write the test BEFORE implementation
  • Make each test fail FIRST to verify it's testing something
  • Keep implementation minimal - just enough to pass tests
  • Refactor only when tests are green
  • One cycle at a time - small steps
  • If test passes immediately, it's not testing new behavior

Red Flags - STOP and Start Over

If you catch yourself:

  • Writing code before test
  • Test passes immediately
  • Can't explain why test failed
  • "I'll test after"
  • "Keep as reference"
  • "Already spent X hours, deleting is wasteful"
  • "Tests after achieve the same purpose"

ALL of these mean: Delete code. Start over with TDD.

Why Order Matters

Tests-after pass immediately (proves nothing), test-first fail then pass (proves it works). See Philosophy for detailed explanation.

Integration with Other Skills

  • systematic-debugging: Create failing test in Phase 4 (bug reproduction)
  • verification-before-completion: Verify tests exist and watched them fail
  • defense-in-depth: Add validation tests after implementing feature

Real-World Impact

From TDD practice:

  • Test-first: 95%+ first-time correctness
  • Test-after: 40% first-time correctness
  • TDD time: 25-45 minutes per feature (including tests)
  • Non-TDD time: 15 minutes coding + 60-120 minutes debugging

TDD is pragmatic - finds bugs before commit, prevents regressions, documents behavior, enables refactoring.

© bobmatnyc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in src/claude_mpm/skills/bundled/testing/test-driven-development of bobmatnyc/claude-mpm.

  • SKILL.md
  • references/anti-patterns.md
  • references/examples.md
  • references/integration.md
  • references/philosophy.md
  • references/workflow.md

Open the folder on GitHubat commit 25203d3

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in bobmatnyc/claude-mpm, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Test Driven Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Test Driven Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Driven Development this skillbobmatnyc/claude-mpm1551 repos~1.2kAutomated safety check: PassMIT
TDDpietheinstrengholt/rssmonster56430 repos~906Automated safety check: PassMIT
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDsanity-io/sanity6.4k20 repos~1kAutomated safety check: PassMIT
Test Driven Developmentfarm-fe/farm5.6k51 repos~2.5kAutomated safety check: PassMIT
Tapd Story PipelineTencentBlueKing/bk-bcs840—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • TDD

    pietheinstrengholt/rssmonster

    Test-driven development. An agent skill from pietheinstrengholt/rssmonster.

    564 GitHub starsUsed in 30 repos~906 tokens
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Testing & QAAuto-check passed
  • A skill your agent uses when implementing any feature or bugfix, before writing implementation code

    5.6k GitHub starsUsed in 51 repos~2.5k tokens
    Testing & QAAuto-check passed
  • Tapd Story Pipeline

    TencentBlueKing/bk-bcs

    单需求实现流水线——把一个 TAPD 需求从零推进到代码提交。自动串联技术澄清、 开发计划、任务拆分、TDD 实现、架构/安全校验、代码提交六个阶段。

    840 GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Absolute Init

    maddhruv/absolute

    One-time setup for absolute: interview how you want it to behave (output style, autonomy, TDD strictness, spec dir, families) + detect the stack once, then write .absolute.config.json (project…

    218 GitHub starsUsed in 1 repo~3k tokens
    Testing & QAAuto-check passed

More from bobmatnyc/claude-mpm

All 52 skills in this repo
  • Build MCP Server

    bobmatnyc/claude-mpm

    Create high-quality MCP servers that enable LLMs to effectively interact with external services.

    155 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Env Manager

    bobmatnyc/claude-mpm

    Environment variable validation, synchronization, and management across local development, CI/CD, and deployment platforms

    155 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check: notes
  • Session Analyzer

    bobmatnyc/claude-mpm

    Debug and teach agentic coding: a deterministic-first session timeline + cost report, with optional narrative polish and a standalone JSX visualiser.

    155 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Software Patterns

    bobmatnyc/claude-mpm

    Decision framework for architectural patterns including DI, SOA, Repository, Domain Events, Circuit Breaker, and Anti-Corruption Layer.

    155 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Verification Before Completion

    bobmatnyc/claude-mpm

    Run verification commands and confirm output before claiming success

    155 GitHub starsUsed in 2 repos~1k tokens
    Auto-check passed
  • Dependency Audit

    bobmatnyc/claude-mpm

    Dependency audit and cleanup workflow for maintaining healthy project dependencies.

    155 GitHub stars~3.5k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Test Driven Development

What does Test Driven Development do?

Write the test first, watch it fail, write minimal code to pass. Test Driven Development is an agent skill from bobmatnyc/claude-mpm.

When should I use Test Driven Development?

Test Driven Development fits situations like: tasks that involve Test-driven development.

How do I install Test Driven Development in Claude Code?

Run `npx skills add bobmatnyc/claude-mpm --skill test-driven-development -a claude-code`. Or copy the skill folder (src/claude_mpm/skills/bundled/testing/test-driven-development in bobmatnyc/claude-mpm) into .claude/skills/test-driven-development in your project. Claude Code loads it when a task matches its description.

How do I install Test Driven Development in Codex?

Run `npx skills add bobmatnyc/claude-mpm --skill test-driven-development -a codex`. Or copy the skill folder (src/claude_mpm/skills/bundled/testing/test-driven-development in bobmatnyc/claude-mpm) into .agents/skills/test-driven-development in your project. Codex loads it when a task matches its description.

Can I use Test Driven Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bobmatnyc/claude-mpm --skill test-driven-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-driven-development, .gemini/skills/test-driven-development, .github/skills/test-driven-development and .opencode/skills/test-driven-development in your project.

What does Test Driven Development need to run?

SKILL.md names no scripts, command-line tools or credentials: Test Driven Development is instructions for the agent only.

Does Test Driven Development access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Test Driven Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Test Driven Development use?

Test Driven Development is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Driven Development use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17k tokens, read only when the agent opens those files.

What are the alternatives to Test Driven Development?

Skills that share tags, products or a category with Test Driven Development: TDD (pietheinstrengholt/rssmonster, 564 stars), TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), TDD (sanity-io/sanity, 6.4k stars) and Test Driven Development (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Driven Development?

bobmatnyc (a GitHub user) maintains it in bobmatnyc/claude-mpm, which has 155 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on August 31, 2026.

Source: bobmatnyc/claude-mpm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.