tdd-workflow

tdd-workflow is a skill for Claude Code from mnzralee/claude-multi-agent-architecture. It costs 45 tokens per session (3,978 once invoked), scanned A, original, MIT.

A Test-Driven Development workflow, where tests are written before the code and development proceeds through failing tests, working code, and cleanup. It also records separate commits for the failing test and the completed implementation.

In plain words
What is it for?
Use it to implement features in small steps, verify each step with automated tests, and keep an audit trail of the test-first process.
Why use it?
It makes the intended behavior explicit and leaves a checkable history showing that the implementation was verified by the test runner.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions subagents.

Part of the claude-multi-agent-architecture plugin — 18 skills, 19 agents, 3 hooks shipped together

Good fit Use it to implement features in small steps, verify each step with automated tests, and keep an audit trail of the test-first process.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mnzralee/claude-multi-agent-architecture/tdd-workflow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mnzralee/claude-multi-agent-architecture --skill tdd-workflow
Clone the repo
git clone --depth 1 https://github.com/mnzralee/claude-multi-agent-architecture

Made for: Claude Code.

Or install claude-multi-agent-architecture, the plugin that ships this one along with the rest of its 18 skills, 19 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tdd-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/mnzralee/claude-multi-agent-architecture/tdd-workflow/github.svg)](https://agentmods.dev/skills/mnzralee/claude-multi-agent-architecture/tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/mnzralee/claude-multi-agent-architecture/tdd-workflow"><img src="https://agentmods.dev/badge/skills/mnzralee/claude-multi-agent-architecture/tdd-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/mnzralee/claude-multi-agent-architecture/tdd-workflow"><img src="https://agentmods.dev/badge/skills/mnzralee/claude-multi-agent-architecture/tdd-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.03978
Opus 5 $0.00023 $0.01989
Sonnet 5 $0.00009 $0.00796
Haiku 4.5 $0.00005 $0.00398

Measured 10d ago against content hash 89443390374c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tdd-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/tdd-workflow/SKILL.md · 442 lines

How it starts

The opening of the file, as written. The whole thing — 442 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Workflow Skill

Skill Metadata

  • Name: tdd-workflow
  • Description: Test-Driven Development workflow with two-commit audit trail and test-runner-based verification
  • User Invocable: Yes (via /tdd)
  • Companion rule: .claude/rules/tdd-discipline.md (the why and the boundaries)

Overview

This skill implements the canonical Red-Green-Refactor cycle (Kent Beck, 2002) with the additions required for AI-agent-driven development. The discipline is stack-agnostic; examples below use TypeScript / Node / Vitest / Zod, but the cycle and audit rules apply equally to any language and test runner.

  1. Each phase ends with a commit, producing an audit trail.
  2. The trail is verifiable via git log and re-running the test at each commit SHA.
  3. Subagents are isolated so the test author and the implementation author do not collude through a shared context window.
  4. Every claim of "passing" must be backed by a verbatim test runner output block, never narrative.

The cycle target is 1 to 10 minutes per micro-iteration (Beck). If a phase takes longer, the step was too large; split it.

Adapt the runner commands to your project's test toolchain. The examples below use Vitest; substitute Jest, Mocha, pytest, go test, or your framework's equivalent.


TDD Cycle (with audit commits)

RED                              GREEN                          REFACTOR
┌─────────────────────────────┐  ┌──────────────────────────┐  ┌─────────────────────────┐
│ 1. Write failing test       │  │ 1. Smallest prod change  │  │ 1. Restructure          │
│ 2. Run tests, see RED       │  │ 2. Run tests, see GREEN  │  │ 2. Run tests, GREEN     │
│ 3. Capture failure output   │  │ 3. Capture pass output   │  │ 3. Run type-check       │
│ 4. Commit TEST FILE ONLY    │--│ 4. Commit PROD CODE     ─│--│ 4. Commit refactor      │
│    test(scope): add spec    │  │    feat(scope): implement│  │    refactor(scope): ... │
│                             │  │                          │  │                         │
│ Artifact: SHA + red output  │  │ Artifact: SHA + green    │  │ Artifact: SHA + green   │
└─────────────────────────────┘  └──────────────────────────┘  └─────────────────────────┘

Read the full file on GitHub · 442 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 442 lines · 45 tokens per session scan A 89443390374c

Subscribe to this mod's changes

tdd-workflow is a skill published in the GitHub repository mnzralee/claude-multi-agent-architecture (6 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 3,978 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.