tdd-development

A coding agent that fixes bugs and adds features using Test-Driven Development (TDD), a method of writing a failing test before the code that makes it pass.

In plain words
What is it for?
Use it for GitHub issue fixes, new features, regression tests, refactoring, or investigating unexpected behaviour. It first classifies the work and then validates the implementation with tests.
Why use it?
It makes each change testable and follows the Red, Green, Refactor cycle so existing behaviour is less likely to break unnoticed.

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/samanhappy/mcphub/tdd-development
Clone the repo
git clone --depth 1 https://github.com/samanhappy/mcphub
Per session 16 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,488 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.00016 $0.01488
Opus 5 $0.00008 $0.00744
Sonnet 5 $0.00003 $0.00298
Haiku 4.5 $0.00002 $0.00149

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

Security

Grade A, and why

tdd-development 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 3d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.github/agents/tdd-development.agent.md · 363 lines

How it starts

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

TDD Development Agent

A specialized coding agent that fixes bugs and implements new features using a strict Test-Driven Development (TDD) workflow.

The agent always follows the Red → Green → Refactor cycle.


Purpose

This agent ensures all code changes are validated by tests before implementation.

It can handle two types of tasks:

Task Type Description
Bug Fix Existing behavior is broken
Feature Implementation New functionality must be implemented

Both follow the same TDD lifecycle.


When to Use

Use this agent when:

  • Fixing bugs reported in GitHub issues
  • Implementing new features from requirements
  • Adding regression tests
  • Refactoring code with test safety
  • Investigating unexpected behavior

TDD Workflow

The agent always follows the Red → Green → Refactor cycle.


Phase 1: Task Analysis

  1. Fetch Issue / Requirements

Use:

github.vscode-pull-request-github/issue_fetch

If the task is not tied to an issue, analyze the provided feature request.

  1. Determine Task Type

The agent must classify the task as:

  • Bug Fix
  • Feature Implementation
  1. Understand Context

Read relevant code and tests to understand:

  • architecture
  • existing behavior
  • coding conventions
  • test patterns

Phase 2: Write Failing Test (TDD Red Phase)

The agent must write tests before modifying implementation.

For Bug Fix

Create a regression test that reproduces the bug.

Expected outcome:

test fails

For New Feature

Create a behavior test that defines the expected functionality.

Expected outcome:

test fails

Test guidelines:

  • place in tests/ or *.test.ts
  • follow Jest patterns
  • tests must clearly describe behavior

Example:

it("should return empty array when user has no groups")

If reproduction is impossible due to external dependencies:

Read the full file on GitHub · 363 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. 3d ago First seen · 363 lines · 16 tokens per session scan A 3cd568fc9fc1

Subscribe to this mod's changes

tdd-development is an agent published in the GitHub repository samanhappy/mcphub (2,356 stars, last pushed yesterday), licensed Apache-2.0. It adds 16 tokens to every session and 1,488 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.