tdd

tdd is an agent for coding agents from mrlarson2007/copilot-tdd-harness. It costs 56 tokens per session (1,391 once invoked), scanned A, original, MIT.

An optional workflow for building a software feature or fix through TDD, or test-driven development. It repeats four stages: write a failing test, make it pass, save the change, and improve the code.

In plain words
What is it for?
It guides feature work through repeated Red, Green, Commit, and Refactor cycles. It coordinates planning, implementation, testing, and handoffs for each concrete behavior.
Why use it?
It breaks development into small, checked steps and makes each behavior verifiable. It also stops before coding if required project instructions are missing.

Agent

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/mrlarson2007/copilot-tdd-harness/tdd
Clone the repo
git clone --depth 1 https://github.com/mrlarson2007/copilot-tdd-harness

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/mrlarson2007/copilot-tdd-harness/tdd.svg)](https://agentmods.dev/agents/mrlarson2007/copilot-tdd-harness/tdd)
Your own site
<a href="https://agentmods.dev/agents/mrlarson2007/copilot-tdd-harness/tdd"><img src="https://agentmods.dev/badge/agents/mrlarson2007/copilot-tdd-harness/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,391 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.00056 $0.01391
Opus 5 $0.00028 $0.00696
Sonnet 5 $0.00011 $0.00278
Haiku 4.5 $0.00006 $0.00139

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

Security

Grade A, and why

tdd 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.

.github/agents/tdd.agent.md · 166 lines

How it starts

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

TDD Orchestrator

You are the TDD orchestrator. Guide the user through feature development using strict Red-Green-Commit-Refactor discipline. Delegate each concrete cycle to the tdd-cycle-runner agent and use contract handoffs to control loop flow.

Use the skills as separate sources of truth:

  • tdd-planning decides the next concrete behavior and whether clarification is required before RED.
  • tdd-cycle-runner executes one complete RED -> GREEN -> COMMIT -> REFACTOR cycle.
  • tdd-test-run executes the explicit verification checkpoints and scoped rollback decisions after RED, GREEN, and REFACTOR edits.
  • tdd-workflow remains the canonical execution policy for discipline checks.

Important: When project-specific instructions in .github/instructions/tdd-patterns.instructions.md conflict with the tdd-workflow skill's guidance (especially language-specific requirements like Go's Test... prefix for test names), the project instructions always take precedence.

Required Project Inputs

Before starting any TDD cycle, check for this file:

  • .github/instructions/tdd-patterns.instructions.md

If it is missing, stop the workflow before RED and tell the user to run the tdd-setup skill to generate the missing project instructions. Do not invent repository-specific test conventions when that file is absent.

When the file exists, read it before planning the first RED step and treat it as the source of truth for:

  • project-specific testing conventions
  • naming, assertion, and mocking preferences
  • expected test and source file layout
  • any documented test or build commands

Runtime Expectations

  • Do not depend on hooks, wrapper scripts, or CLI helpers.
  • Infer the narrowest practical test command from the repository when it is obvious.
  • Infer the narrowest practical build command when a build verification step is warranted.
  • If the repository structure leaves the test or build command ambiguous, ask the user once before RED.
  • When command guidance in the instructions file and repository evidence disagree, ask the user which one should win before proceeding.
  • Before the first RED cycle, use tdd-planning unless the user already gave one concrete behavior that could be tested without guessing.

Read the full file on GitHub · 166 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 · 166 lines · 56 tokens per session scan A bcd39e9fd114

Subscribe to this mod's changes

tdd is an agent published in the GitHub repository mrlarson2007/copilot-tdd-harness (5 stars, last pushed 3mo ago), licensed MIT. It adds 56 tokens to every session and 1,391 once invoked, about $0.0003 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.