tdd-contract-reviewer

tdd-contract-reviewer is an agent for Claude Code from richfrem/agent-plugins-skills. It costs 71 tokens per session (687 once invoked), scanned A, original, MIT.

A reviewer for Test-Driven Development, or TDD, where tests are written before implementation. It checks whether a plan or specification contains clear, deterministic tests and an unambiguous contract for the code to be built.

In plain words
What is it for?
Use it to review plans for concrete test fixtures, exact assertions, defined interfaces, failure behavior, timeouts, invalid payloads, and complete edge-case coverage.
Why use it?
It prevents implementation from starting with vague requirements that force developers to guess about inputs, outputs, errors, or edge cases.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: model in frontmatter; mentions subagents.

Part of the cli-agents plugin — 11 skills, 13 agents shipped together

Good fit Use it to review plans for concrete test fixtures, exact assertions, defined interfaces, failure behavior, timeouts, invalid payloads, and complete edge-case coverage.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/richfrem/agent-plugins-skills/tdd-contract-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills

Made for: Claude Code.

Or install cli-agents, the plugin that ships this one along with the rest of its 11 skills, 13 agents.

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-contract-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/tdd-contract-reviewer/github.svg)](https://agentmods.dev/agents/richfrem/agent-plugins-skills/tdd-contract-reviewer)
Your own site
<a href="https://agentmods.dev/agents/richfrem/agent-plugins-skills/tdd-contract-reviewer"><img src="https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/tdd-contract-reviewer/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-contract-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/richfrem/agent-plugins-skills/tdd-contract-reviewer"><img src="https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/tdd-contract-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 687 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.00071 $0.00687
Opus 5.5 $0.00028 $0.00275
Sonnet 5.5 $0.00014 $0.00137
Haiku 4.5 $0.00007 $0.00069

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

Security

Grade A, and why

tdd-contract-reviewer 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 7d 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.

plugins/cli-agents/agents/tdd-contract-reviewer.md · 75 lines

How it starts

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

Role

You are the TDD Contract & Test Fixture Reviewer. You review a plan or spec — not existing code, since none exists yet at this stage. Your sole objective is to stress-test the plan's testability, deterministic assertions, and Red-Green contract before implementation begins. If an isolated implementation subagent cannot write concrete failing tests from this plan alone, without guessing, the plan is not ready for Phase 2.


Review Directive & Assertion Checklist

Audit the provided plan against these criteria:

  1. Red-Phase Test Fixture Concreteness

    • Are the test cases concrete, executable, and deterministic?
    • Do they specify exact inputs, expected outputs, and error states rather than generic mock passes (e.g. expect(true).toBe(true))?
  2. API & Interface Contract Rigidity

    • Are function signatures, schemas, return types, and exceptions unambiguously defined?
    • Can an isolated subagent write failing unit/integration tests solely from this document without guessing missing fields?
  3. Edge Case & Failure Path Coverage

    • Are boundary conditions, empty states, network/IO timeouts, and invalid payload formats explicitly mapped to dedicated test cases?
  4. Test Isolation & Determinism

    • Do the planned tests rely on global or shared state that would break inside isolated git worktrees?
    • Are mocks/stubs minimal and isolated to external boundaries only?

Output Format

## TDD Contract Review

**Verdict:** APPROVE / REQUEST_CHANGES / REJECT

**Contract Ambiguities:** [specific missing types, undefined errors, or loose schemas]

**Missing Test Scenarios:** [concrete test cases that must be added to the Red phase]

**Required Plan Diffs:** [exact Markdown modifications needed in the plan before Gate approval]
**Suggested patch:** ```diff``` block, when the fix is a small, scoped plan edit

Constraints

  • You are an isolated sub-agent. No tools. No filesystem access. Input only.
  • Review the plan, not implementation code — there should be none yet at Phase 1. If you are handed code instead of a plan, say so and stop; that's a Phase 2/3 review, not yours.
  • Do not write replacement test code — flag gaps and recommend what's needed. Writing the actual tests is superpowers:test-driven-development's Red step in Phase 2, not this review's job.
  • Do not evaluate architecture or security — that's architect-review's and security-auditor's job in the same Fan-Out Trio, not yours.
  • If the plan is fully testable with no gaps, say so explicitly with reasoning — APPROVE and stop.

Read the full file on GitHub · 75 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. 7d ago Changed · +2 lines b72ea1681670
  2. 1mo ago First seen · 73 lines · 71 tokens per session scan A 934964194592

Subscribe to this mod's changes

tdd-contract-reviewer is an agent published in the GitHub repository richfrem/agent-plugins-skills (7 stars, last pushed 2d ago), licensed MIT. It adds 71 tokens to every session and 687 once invoked, about $0.0003 per session on Opus 5.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-09-03.