tdd

tdd is a skill for Claude Code, Codex from Justinmendezai/The-Adam-Repo. It costs 54 tokens per session (656 once invoked), scanned A, original, Apache-2.0.

A direct test-driven development workflow that builds one small behavior at a time through failing tests, minimal implementation, and cleanup.

In plain words
What is it for?
Use it for new features, bug fixes, or refactors where the expected behavior can be expressed in tests.
Why use it?
It reduces unnecessary code and helps prevent bugs from returning by requiring each behavior to have a test before implementation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it for new features, bug fixes, or refactors where the expected behavior can be expressed in tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justinmendezai/the-adam-repo/tdd
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.

Any agent
npx skills add Justinmendezai/The-Adam-Repo --skill tdd
Clone the repo
git clone --depth 1 https://github.com/Justinmendezai/The-Adam-Repo

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/justinmendezai/the-adam-repo/tdd/github.svg)](https://agentmods.dev/skills/justinmendezai/the-adam-repo/tdd)
Your own site
<a href="https://agentmods.dev/skills/justinmendezai/the-adam-repo/tdd"><img src="https://agentmods.dev/badge/skills/justinmendezai/the-adam-repo/tdd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/justinmendezai/the-adam-repo/tdd"><img src="https://agentmods.dev/badge/skills/justinmendezai/the-adam-repo/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 656 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00054 $0.00656
Opus 5 $0.00027 $0.00328
Sonnet 5 $0.00011 $0.00131
Haiku 4.5 $0.00005 $0.00066

Measured 12d ago against content hash 6e70d493270c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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 · 76 lines

How it starts

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

tdd

Adapted from Matt Pocock's tdd. For direct work by the agent. (For orchestrated work, see tests-first, which inverts the roles — the orchestrator writes tests for subagents to satisfy.)

The loop

RED → write a failing test that captures the next slice of behavior
GREEN → write the minimum impl that makes it pass; nothing more
REFACTOR → clean up, factor, name well, while green stays green

One small slice per loop. Never write more impl than the current red test demands.

When to use

  • New behavior with a clear user-visible outcome.
  • Bug fix that must not regress.
  • Refactor where you want a safety net before touching anything.

Workflow

1. Pick the smallest meaningful slice

If you can't think of a one-paragraph user-visible behavior, the slice is wrong. Re-cut.

2. RED

Write one test, not three. Make it specific. Run it. Confirm it fails for the right reason — not because of a missing import.

3. GREEN

Write the minimum code that makes it pass. Hardcode if you must. The next test will force generalization.

4. REFACTOR

Once green, look for:

  • Duplication you can DRY (without adding wrong abstractions).
  • Names that confuse on second reading.
  • Long functions that have grown a natural seam.

Run the test after each refactor. If it goes red, you broke a contract. Revert.

5. Repeat

Add the next test. Repeat until the slice is done.

Test quality bar

  • One assertion per test where possible.
  • Test name reads like a sentence: it("returns null when given an empty string").
  • No mocking the system under test.
  • No tests that pass-by-accident (test the failure path explicitly).
  • No beforeEach setup that hides what's actually being tested.

When NOT to use TDD

  • Spike / prototype work where you don't know what the output should look like. Use prototype instead — write throwaway code, learn, then come back and TDD the real version.
  • One-shot scripts.
  • Glue code with trivial logic and well-tested deps.

Read the full file on GitHub · 76 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. 12d ago First seen · 76 lines · 54 tokens per session scan A 6e70d493270c

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository Justinmendezai/The-Adam-Repo (12 stars, last pushed 18d ago), licensed Apache-2.0. It adds 54 tokens to every session and 656 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-31.