tdd

tdd is a skill for Claude Code, Codex from lwalden/AIAgentMinder. It costs 15 tokens per session (1,020 once invoked), scanned A, original, MIT.

A guided Test-Driven Development (TDD) workflow, where you write a failing test, make the smallest change that passes it, and then improve the code.

In plain words
What is it for?
Use it to plan a feature, follow red-green-refactor steps, review existing tests, and design tests around public functions, endpoints, or APIs.
Why use it?
It provides a clear way to build features while keeping tests focused on how the code is used, so internal changes are less likely to break them.

Skill for Claude CodeCodex

Part of the aiagentminder plugin — 15 skills, 16 agents, 5 hooks shipped together

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 skills/lwalden/aiagentminder/tdd
Any agent
npx skills add lwalden/AIAgentMinder --skill tdd
Clone the repo
git clone --depth 1 https://github.com/lwalden/AIAgentMinder

Made for: Claude Code, Codex.

Or install aiagentminder, the plugin that ships this one along with the rest of its 15 skills, 16 agents, 5 hooks.

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/skills/lwalden/aiagentminder/tdd.svg)](https://agentmods.dev/skills/lwalden/aiagentminder/tdd)
Your own site
<a href="https://agentmods.dev/skills/lwalden/aiagentminder/tdd"><img src="https://agentmods.dev/badge/skills/lwalden/aiagentminder/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,020 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.00015 $0.01020
Opus 5 $0.00008 $0.00510
Sonnet 5 $0.00003 $0.00204
Haiku 4.5 $0.00002 $0.00102

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

skills/tdd/SKILL.md · 104 lines

How it starts

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

/aiagentminder:tdd - Test-Driven Development

Guided TDD workflow for implementing features through red-green-refactor cycles. This is the full methodology behind the one-line TDD discipline embedded in the dev and item-executor agent profiles: "Write a failing test first. Implement the minimal solution. Refactor after green."

Core principle: Tests verify behavior through public interfaces, not implementation details. A good test survives internal refactors because it doesn't care about internal structure.


Step 0: Read Context

The day-to-day TDD discipline lives inline in the dev and item-executor agent profiles; this skill is the full structured methodology behind it. No separate rule file is loaded.

Also read docs/strategy-roadmap.md for scope context and any testing strategy notes.


Step 1: Planning

Before writing any code:

  1. Read existing tests in the project to learn the test framework, naming conventions, file organization, and assertion style. Match the project's patterns.
  2. Identify the public interface — what functions, endpoints, or APIs will callers use? Aim for a small interface with deep implementation (fewer methods, simpler parameters, complexity hidden inside).
  3. List 3-7 behaviors to test — describe what the system does, not how. Each behavior should be observable through the public interface.
    • Good: "returns 404 when user not found"
    • Bad: "calls findById with the user ID"
  4. Design for testability — accept dependencies as parameters instead of creating them internally. Return results instead of producing side effects. Keep the surface area small.
  5. Present the test plan to the user for approval.

You cannot test everything. Focus testing effort on critical paths and complex logic, not every edge case. Confirm priorities with the user.


Step 2: Tracer Bullet

Write ONE test that confirms ONE thing about the system — the simplest vertical slice of the feature.

RED:   Write the test → it fails (confirms test infrastructure works)
GREEN: Write minimal code to pass → it passes

Read the full file on GitHub · 104 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. 5d ago First seen · 104 lines · 15 tokens per session scan A ea824ea0d1df

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository lwalden/AIAgentMinder (4 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 1,020 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-31.

Related

Other skills, from other repositories

atdd-team

Use to orchestrate a team-based ATDD workflow — six phases (spec writing, spec review, pipeline generation, implementation, refine, verify & harden) each handled by a fresh agent so no role erodes across a long-running feature. Triggers — "build a feature with a team", "use ATDD with agents", "create an ATDD team"…

swingerman/engineer · 114 tokens

atdd

Use to write a feature's acceptance specs and generate its test pipeline — Checkpoint 3 of the DAE pipeline. The engineer-namespace entry point into the atdd plugin's acceptance workflow. Triggers — "/engineer.atdd", "write the spec", "Checkpoint 3", "formalize the ACs as specs", "generate the test pipeline".

swingerman/engineer · 76 tokens

super-ralph-wiggum

Run Claude Code in autonomous iteration loops until task completion — PRD-based feature development, test coverage improvement, lint fixing, documentation generation, dataset creation, or framework migrations. Uses in-session loop mechanism with specialized templates. Triggers on autonomous loop, iterate until done…

tdimino/claude-code-minoan · 76 tokens

typescript-eval

Test TypeScript code snippets before persisting as skills.

vellum-ai/vellum-assistant · 14 tokens

xp-tdd-practices

Read this guideline when creating implementation tasks, doing TDD, deciding task order, or working on any feature with observable behavior.

pablo-albaladejo/kaiord · 32 tokens

brainstorming-and-tdd

Clarify behavior and use test-first implementation when applicable.

Sistema2D/FrameCode-VibeWork · 18 tokens