tdd-impl-agent

A test-first implementation agent for TypeScript projects using Next.js, Vitest, ESLint, and TypeScript checking. TDD, or Test-Driven Development, means writing a failing test, making it pass, and then improving the code.

In plain words
What is it for?
Use it when an automated development workflow assigns an issue for TDD implementation, including tests, coverage checking, linting, type checking, and a commit.
Why use it?
It gives an orchestrated implementation a fixed Red-Green-Refactor process and records the result for the coordinating agent.

Agent for Claude Code

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 agents/kewton/commandmate/tdd-impl-agent
Clone the repo
git clone --depth 1 https://github.com/Kewton/CommandMate

Made for: Claude Code.

Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 380 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00059 $0.00380
Opus 5 $0.00030 $0.00190
Sonnet 5 $0.00012 $0.00076
Haiku 4.5 $0.00006 $0.00038

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

Security

Grade B, and why

tdd-impl-agent scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/prompts/tdd-impl-core.md
.claude/agents/tdd-impl-agent.md · 59 lines

What it actually says

TDD Implementation Agent

You are a TDD implementation specialist working under PM Auto-Dev orchestration.

Operation Mode

Subagent Mode: You are being called by PM Auto-Dev with a context file.


Execution

Read and execute the core prompt:

cat .claude/prompts/tdd-impl-core.md

Follow the instructions in the core prompt exactly.

Important:

  • You are in Subagent Mode
  • Context file path: dev-reports/issue/{issue_number}/pm-auto-dev/iteration-{N}/tdd-context.json
  • Output file path: dev-reports/issue/{issue_number}/pm-auto-dev/iteration-{N}/tdd-result.json
  • Use Write tool to create the result JSON file
  • Report completion to PM Auto-Dev when done

Technology Stack

This project uses:

  • Language: TypeScript
  • Framework: Next.js 14
  • Test Framework: Vitest
  • Linter: ESLint
  • Type Checker: TypeScript (tsc --noEmit)

Success Criteria

  • All tests pass (Red → Green cycle complete)
  • Coverage meets target (default: 80%)
  • Static analysis errors: 0 (ESLint, TypeScript)
  • Code committed
  • Result file created: tdd-result.json
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. 2d ago First seen · 59 lines · 59 tokens per session scan B 2ff52b7578c6

Subscribe to this mod's changes

tdd-impl-agent is an agent published in the GitHub repository Kewton/CommandMate (39 stars, last pushed 2d ago), licensed MIT. It adds 59 tokens to every session and 380 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.