tdd-cycle

tdd-cycle is a skill for Claude Code, Codex from MountainUnicorn/add. It costs 25 tokens per session (2,961 once invoked), scanned A, original, MIT.

A complete Test-Driven Development cycle, meaning tests are written before code, followed by implementation, cleanup, and final checks.

In plain words
What is it for?
Use it to write failing tests from acceptance criteria, add the smallest code that passes them, improve the result without breaking tests, and run production-readiness checks.
Why use it?
It turns a feature specification into tested code through clear stages and keeps a traceable link between requirements, tests, and implementation.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside the plugin that ships it — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed.

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.

agentmods
npx agentmods add skills/mountainunicorn/add/tdd-cycle
Any agent
npx skills add MountainUnicorn/add --skill tdd-cycle
Clone the repo
git clone --depth 1 https://github.com/MountainUnicorn/add

Made for: Claude Code, Codex.

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-cycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/mountainunicorn/add/tdd-cycle.svg)](https://agentmods.dev/skills/mountainunicorn/add/tdd-cycle)
Your own site
<a href="https://agentmods.dev/skills/mountainunicorn/add/tdd-cycle"><img src="https://agentmods.dev/badge/skills/mountainunicorn/add/tdd-cycle.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00025 $0.02961
Opus 5 $0.00013 $0.01481
Sonnet 5 $0.00005 $0.00592
Haiku 4.5 $0.00003 $0.00296

Measured 4d ago against content hash 292ba947bbcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd-cycle 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 4d 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.

core/skills/tdd-cycle/SKILL.md · 309 lines

How it starts

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

ADD TDD Cycle Skill v{{VERSION}}

Execute a complete Test-Driven Development cycle for a feature from the specification through production-quality code.

Overview

The TDD Cycle is the primary "do the work" skill in Agent Driven Development. It orchestrates the full lifecycle:

  1. RED — Write failing tests from spec acceptance criteria
  2. GREEN — Implement minimal code to pass those tests
  3. REFACTOR — Improve code quality while keeping tests green
  4. VERIFY — Run all quality gates to ensure production readiness

This skill coordinates sub-agents (test-writer, implementer, reviewer, verify) and maintains traceability between specs, tests, and implementation.

Sub-Agent Dispatch Prompt Template

Every Task-tool dispatch from this skill (test-writer, implementer, reviewer, verify) MUST emit a prompt body laid out per rules/cache-discipline.md. Construct the prompt as follows — the STABLE block is byte-identical across every dispatch in a session; only the VOLATILE block changes per role.

  • Active autoload:true rule bodies, in stable order
  • Tier-1 knowledge active view (knowledge/global.md)
  • Tier-2 active view (~/.claude/add/library-active.md) if present
  • Project identity summary from .add/config.json
  • Active learnings view (.add/learnings-active.md)
  • Full body of the current spec under work
  • Role (test-writer | implementer | reviewer | verify)
  • MODEL: capability tier per role — test-writer: editor, implementer: editor, reviewer: architect, verify: editor (tiers per rules/model-roles.md, never hardcoded model names)
  • BUDGET: max tokens for this dispatch — per the maturity Resource Budgets table in ${CLAUDE_PLUGIN_ROOT}/references/swarm-protocol.md (overridable via .add/config.jsonswarm.budgets)
  • Per-call TASK / SCOPE / SPEC REFERENCE / SUCCESS CRITERIA / RESTRICTIONS
  • AC subset for this dispatch
  • Per-call hints — recent edits, tool outputs, working-set diffs

Read the full file on GitHub · 309 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. 4d ago First seen · 309 lines · 25 tokens per session scan A 292ba947bbcd

Subscribe to this mod's changes

tdd-cycle is a skill published in the GitHub repository MountainUnicorn/add (11 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 2,961 once invoked, about $0.0001 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-30.