tdd

tdd is a command for coding agents from Ashfaqbs/software-dev-ai-claude-toolkit. It costs 4 tokens per session (286 once invoked), scanned A, original, MIT.

A command that applies test-driven development (TDD): write a failing test, make it pass with the smallest implementation, then improve the code while keeping tests passing.

In plain words
What is it for?
Use it to implement a requested change in Java, Python, JavaScript, Express, or React projects. It also guides test coverage for normal, boundary, and error behavior.
Why use it?
It gives implementation work a fixed testing order, reducing the chance that code is written without tests or that edge and error cases are missed.

Command

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 commands/ashfaqbs/software-dev-ai-claude-toolkit/tdd
Clone the repo
git clone --depth 1 https://github.com/Ashfaqbs/software-dev-ai-claude-toolkit

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/commands/ashfaqbs/software-dev-ai-claude-toolkit/tdd.svg)](https://agentmods.dev/commands/ashfaqbs/software-dev-ai-claude-toolkit/tdd)
Your own site
<a href="https://agentmods.dev/commands/ashfaqbs/software-dev-ai-claude-toolkit/tdd"><img src="https://agentmods.dev/badge/commands/ashfaqbs/software-dev-ai-claude-toolkit/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 286 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.00004 $0.00286
Opus 5 $0.00002 $0.00143
Sonnet 5 $0.00001 $0.00057
Haiku 4.5 $0.00000 $0.00029

Measured 4d ago against content hash db99357a845b, 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.

commands/tdd.md · 35 lines

What it actually says

TDD Workflow

Implement the following using strict TDD: $ARGUMENTS

Process

1. RED — Write Failing Tests First

  • Define what the code should do via test cases.
  • Cover the happy path, edge cases, and error cases.
  • Run tests — they MUST fail. If they pass, the tests are wrong.

2. GREEN — Minimal Implementation

  • Write the minimum code to make tests pass.
  • No premature optimization. No extra features.
  • Run tests — all must pass.

3. IMPROVE — Refactor

  • Clean up the implementation while keeping tests green.
  • Extract common logic, improve naming, simplify.
  • Run tests again — still green.

Stack-Specific Tools

  • Java/Spring Boot: JUnit 5 + Mockito. Use @SpringBootTest for integration tests, Testcontainers for real DB.
  • Python/FastAPI: pytest + pytest-asyncio. Use httpx.AsyncClient for API tests.
  • JavaScript: Jest or Vitest. Use supertest for Express API tests. React Testing Library for components.

Rules

  • Never write implementation before a failing test exists.
  • If you're unsure what to test, ask before proceeding.
  • Target 80%+ coverage on the new code.
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 · 35 lines · 4 tokens per session scan A db99357a845b

Subscribe to this mod's changes

tdd is a command published in the GitHub repository Ashfaqbs/software-dev-ai-claude-toolkit (24 stars, last pushed 6mo ago), licensed MIT. It adds 4 tokens to every session and 286 once invoked, about $0.0000 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.