tdd

tdd is a skill for Claude Code, Codex from ahonn/dotfiles. It costs 119 tokens per session (977 once invoked), scanned A, original, MIT.

A test-first workflow in which a failing test is written, the code is changed until it passes, and the result is kept as a regression check.

In plain words
What is it for?
Use it for non-trivial domain logic when the user or project explicitly asks for TDD, meaning test-driven development.
Why use it?
It helps verify behavior while it is being implemented and prevents known bugs from returning.

Skill for Claude CodeCodex

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

Made for: Claude Code, Codex.

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/ahonn/dotfiles/tdd.svg)](https://agentmods.dev/skills/ahonn/dotfiles/tdd)
Your own site
<a href="https://agentmods.dev/skills/ahonn/dotfiles/tdd"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 977 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.00119 $0.00977
Opus 5 $0.00060 $0.00489
Sonnet 5 $0.00024 $0.00195
Haiku 4.5 $0.00012 $0.00098

Measured yesterday against content hash fae7ff3f767c, 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 yesterday.

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/skills/tdd/SKILL.md · 49 lines

How it starts

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

Test-Driven Development

TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle — consult them before and during the loop, not after.

Not the default workflow. Most tasks use AGENTS.md test modes skip, verify-only, or add-tests without this skill. Only continue past the gate when mode is tdd (or the user explicitly ordered test-first).

When exploring the codebase, read the project's domain docs if they exist (CLAUDE.md, glossary, ADRs) so test names and interface vocabulary match the project's domain language.

Gate (before any red test)

Answer all three before writing a failing test:

  1. Harness? Is there a runnable test runner for this change surface (or is the user asking to introduce one for real domain logic)?
  2. Logic-bearing? Is the behavior domain logic / regression-worthy — not config, docs, Nix, pure UI chrome, rename, or scaffolding?
  3. Opt-in? Did the user ask for TDD/test-first/red-green, or is AGENTS test mode explicitly tdd?

If any answer is no → stop. State Test mode: skip | verify-only | add-tests and a one-line rationale. Do not invent a harness, force red→green, or load the rest of this skill as a mandatory process.

What a good test is

Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.

See tests.md for examples and mocking.md for mocking guidelines.

Seams — where tests go

A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.

Test only at pre-agreed seams. Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything — agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.

Read the full file on GitHub · 49 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 49 lines · 119 tokens per session scan A fae7ff3f767c

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository ahonn/dotfiles (62 stars, last pushed 4d ago), licensed MIT. It adds 119 tokens to every session and 977 once invoked, about $0.0006 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-09-03.

Related

Other skills, from other repositories

coding

Principles for writing and designing code, covering API and abstraction design, naming, comment discipline, and standards of evidence for claims about code behavior. Use whenever the task is to write or modify code, design an API or software architecture, or review code.

ryota2357/dotfiles · 53 tokens

implement__feature

実装タスクを 3 段階で自律遂行するときに起動する。Phase 1 で実装計画と テストリストを立案して skeptical-reviewer の反証評価を通し、Phase 2 で Sonnet 5 モデル固定のサブエージェント tdd-implementer に作業単位ごとの TDD 実装を委譲し、Phase 3 で reviewcode シリーズによるコードレビューを 全 pass または 3 回の反復まで実施する。.

shunsock/dotfiles · 127 tokens

test-expert

Testing methodologies, test-driven development (TDD), unit and integration testing, and testing best practices across multiple frameworks. Use when the user needs to write tests, implement TDD, or improve test coverage and quality.

einverne/dotfiles · 47 tokens

assess-quality

Foundational quality framework: the five questions (readable, easy to start, expands without bloat, consistent, intentional) every other dev skill is judged against, plus the dual-audience and workshop principles. Use when onboarding to a project, defining a quality bar, setting an assessment checklist, or arbitrating…

urmzd/dotfiles · 120 tokens

create-oss-skill

Create well-formed Agent Skills following the agentskills.io specification. Scaffold directories, write SKILL.md files, bundle scripts, and structure instructions for progressive disclosure. Use when creating a new skill, reviewing skill structure, optimizing a skill description, or setting up evals for skill quality.

urmzd/dotfiles · 63 tokens

orchestrate-agents

Orchestrate multiple agent CLIs (Claude, Codex, Antigravity) via tmux with a shared fleet store, dispatching one guardian subagent per pane. Survey-first: inspects and adopts existing tmux sessions, windows, and agent panes before creating anything new. Use when running a multi-agent session, dispatching parallel…

urmzd/dotfiles · 83 tokens