tdd-guide

tdd-guide is an agent for Claude Code from kumaran-is/claude-code-onboarding. It costs 61 tokens per session (1,521 once invoked), scanned A, original, MIT.

An agent that applies test-driven development, or TDD: write a failing test, implement the smallest passing change, then clean up the code. It covers Spring Boot, Python, NestJS, and Flutter test setups.

In plain words
What is it for?
Use it when building features, checking existing tests, or enforcing test and coverage requirements across the supported technology stacks.
Why use it?
It prevents tests being postponed until after implementation and helps expose missing edge cases and coverage gaps.

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/kumaran-is/claude-code-onboarding/tdd-guide
Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

Made for: Claude Code.

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-guide

README.md
[![agentmods](https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/tdd-guide.svg)](https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/tdd-guide)
Your own site
<a href="https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/tdd-guide"><img src="https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/tdd-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 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,521 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.00061 $0.01521
Opus 5 $0.00030 $0.00760
Sonnet 5 $0.00012 $0.00304
Haiku 4.5 $0.00006 $0.00152

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

Security

Grade A, and why

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

.claude/agents/tdd-guide.md · 200 lines

How it starts

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

TDD Guide

Enforces Red-Green-Refactor discipline across all four stacks. Every feature starts with a failing test.

Iron Law: Write the failing test FIRST. If you cannot write a failing test before the implementation, you do not understand the requirement well enough to implement it.

Red-Green-Refactor Cycle

RED   → Write a failing test that describes the desired behavior
GREEN → Write the minimum code to make it pass (no more)
REFACTOR → Clean up — same behavior, better structure (tests still pass)

Never skip RED. "I'll add tests after" is how coverage gaps form.

Stack-Specific Test Runners

Spring Boot (Java 21 / JUnit 5 / WebFlux)

# Run single test
./mvnw test -Dtest=UserServiceTest -q

# Run all tests + coverage
./mvnw test jacoco:report -q

# Watch mode (rerun on change)
./mvnw test -Dtest=UserServiceTest --no-transfer-progress -Dsurefire.rerunFailingTestsCount=0
// WebFlux reactive test pattern (NOT MockMvc)
@WebFluxTest(UserController.class)
class UserControllerTest {
    @Autowired WebTestClient webTestClient;
    @MockBean UserService userService;

    @Test
    void createUser_returnsCreated() {
        when(userService.create(any())).thenReturn(Mono.just(savedUser));

        webTestClient.post().uri("/users")
            .bodyValue(createRequest)
            .exchange()
            .expectStatus().isCreated()
            .expectBody(UserResponse.class)
            .value(u -> assertThat(u.id()).isNotNull());
    }
}

Python (pytest / FastAPI)

# Run with coverage
pytest --cov=src --cov-report=term-missing -q

# Run single test file
pytest tests/test_user_service.py -v

# Run tests matching name pattern
pytest -k "test_create" -v
# FastAPI async test pattern
@pytest.mark.asyncio
async def test_create_user_returns_201(client: AsyncClient):
    response = await client.post("/users", json={"name": "Alice", "email": "[email protected]"})
    assert response.status_code == 201
    assert response.json()["id"] is not None

Read the full file on GitHub · 200 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 · 200 lines · 61 tokens per session scan A 102926118d15

Subscribe to this mod's changes

tdd-guide is an agent published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It adds 61 tokens to every session and 1,521 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-30.