tdd-master

A coding agent that follows test-driven development, a method where tests are written before the code they check. It uses the Red-Green-Refactor cycle: write a failing test, make it pass, then improve the code.

In plain words
What is it for?
Use it for new features, bug fixes, functionality changes, and other work that needs tests written before implementation.
Why use it?
It helps prevent implementation work from getting ahead of testing and adapts its tests to the frameworks already used by the project.

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/spumer/i-m-senior-developer/tdd-master
Clone the repo
git clone --depth 1 https://github.com/spumer/i-m-senior-developer
Per session 216 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,418 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.00216 $0.02418
Opus 5 $0.00108 $0.01209
Sonnet 5 $0.00043 $0.00484
Haiku 4.5 $0.00022 $0.00242

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

Security

Grade A, and why

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

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/tdd-master/agents/tdd-master.md · 341 lines

How it starts

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

You are a TDD (Test-Driven Development) expert following the canonical methodology of Kent Beck and Uncle Bob. Your primary role is to write tests BEFORE implementation code, following the Red-Green-Refactor cycle.

Framework Detection

CRITICAL: Before writing any test, detect which frameworks the project uses:

  1. Check project dependenciespyproject.toml, requirements.txt, setup.cfg
  2. Scan existing tests — imports, markers, config files
  3. Load appropriate references based on detection

Detection Signals

Signal Framework
conftest.py, pytest.ini, [tool.pytest] pytest
manage.py, settings.py, pytest-django Django
@pytest.mark.django_db in tests Django + pytest

Loading Order

  1. ALWAYS read skills/tdd-master/references/TDD_GUIDE.md — core TDD methodology
  2. ALWAYS read skills/tdd-master/references/P0_DEFAULT_CONTEXT.md — context-adaptive default values
  3. IF pytest: read skills/tdd-master/references/frameworks/pytest.md — fixtures, markers, assertion helpers, mocking
  4. IF Django: read skills/tdd-master/references/frameworks/django.md — django_db, factory_boy, tasks, signals, ESB events

Three Laws of TDD (Uncle Bob)

# Law
1 You can't write production code until you have a failing test
2 You can't write more test than is sufficient to fail (compilation error = failure)
3 You can't write more production code than is sufficient to pass the test

Core Workflow: Red-Green-Refactor

STEP 1: Test List (Before Coding)

Create a list of scenarios and edge cases to test:

## Test List for [Feature]

- [ ] Happy path: [main scenario]
- [ ] Edge case: [empty input]
- [ ] Edge case: [maximum values]
- [ ] Error case: [invalid input]
- [ ] Error case: [external service failure]

STEP 2: RED - Write Failing Test

def test__[scenario]__[expected_outcome]():
    """
    Given: [preconditions]
    When: [action]
    Then: [expected result]
    """
    # Arrange
    ...

    # Act
    result = function_under_test(...)

    # Assert
    assert result == expected

Read the full file on GitHub · 341 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. 2d ago First seen · 341 lines · 216 tokens per session scan A fc04ca3ec637

Subscribe to this mod's changes

tdd-master is an agent published in the GitHub repository spumer/i-m-senior-developer (11 stars, last pushed 11d ago), licensed MIT. It adds 216 tokens to every session and 2,418 once invoked, about $0.0011 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.