tdd

tdd is a skill for Claude Code, Codex from PrabhdeepSingh/claude-plugins. It costs 80 tokens per session (3,316 once invoked), scanned A, original, MIT.

A guide to test-driven development, a method where you write a failing test, make the smallest code change that passes it, and then improve the code. A test is an automated check of expected behavior.

In plain words
What is it for?
Writing or changing code, fixing bugs, adding tests, and deciding what parts of a system should be replaced with test doubles.
Why use it?
It uses tests to define the design before implementation, helping prevent accidental behavior and making changes easier to maintain.

Skill for Claude CodeCodex

Part of the sonu plugin — 26 skills, 3 commands 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/prabhdeepsingh/claude-plugins/tdd
Any agent
npx skills add PrabhdeepSingh/claude-plugins --skill tdd
Clone the repo
git clone --depth 1 https://github.com/PrabhdeepSingh/claude-plugins

Made for: Claude Code, Codex.

Or install sonu, the plugin that ships this one along with the rest of its 26 skills, 3 commands.

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/prabhdeepsingh/claude-plugins/tdd.svg)](https://agentmods.dev/skills/prabhdeepsingh/claude-plugins/tdd)
Your own site
<a href="https://agentmods.dev/skills/prabhdeepsingh/claude-plugins/tdd"><img src="https://agentmods.dev/badge/skills/prabhdeepsingh/claude-plugins/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,316 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.00080 $0.03316
Opus 5 $0.00040 $0.01658
Sonnet 5 $0.00016 $0.00663
Haiku 4.5 $0.00008 $0.00332

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

sonu/skills/tdd/SKILL.md · 157 lines

How it starts

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

TDD — test-first, every time

Tests aren't something you write when the feature is done. They're the tool you use to design the feature. A test written before the code is a precise, executable specification; a test written after is just an assertion that you didn't introduce new bugs today. Code written test-first is more focused, more decoupled, and easier to maintain than code written any other way — the test forces you to think about the interface before the implementation, and that pressure is the real payoff.

Follow these rules the same way you follow [[code-standards]] — as the instincts of someone who's maintained production code for two decades, not as bureaucracy.

How to apply this

Before writing a single line of production code, write the failing test. Let the test drive the design. Then write the minimum code to make it pass. Then refactor. That's the loop — run it in small increments, constantly, for every behavior you add.

Discover the stack before the first red — the loop is universal; the commands are not. Find the build system from its manifest (package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, Gemfile, a Makefile); prefer checked-in wrappers (./gradlew, ./mvnw, make test, a repo script) over globally installed tools; learn both the focused-single-test command (run during the loop) and the full-suite command (run before completion) — they differ in every framework; and read the README/CONTRIBUTING and CI workflow files, because those show the commands that actually gate merges. Never assume a default like npm test — a wrong guess reads as "no tests exist" and derails the whole loop.

Invoked directly as /sonu:tdd: apply the loop to $ARGUMENTS — the text typed after the invocation; if that token appears literally or is empty, apply it to the current change in context. This produces test and implementation files in the working tree, not a printed plan. If the codebase's test structure is unclear, read the existing tests first to establish conventions before adding new ones. For the full design → build → hand-off lifecycle, run /sonu:build instead — it runs this same methodology as its build phase and adds the design gate before and the self-review after.

Read the full file on GitHub · 157 lines

Files

What ships with it

1 file 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. 4d ago First seen · 157 lines · 80 tokens per session scan A 5299324b38f3

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository PrabhdeepSingh/claude-plugins (3 stars, last pushed 4d ago), licensed MIT. It adds 80 tokens to every session and 3,316 once invoked, about $0.0004 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

create-app

Guided journey from a raw app idea to a validated, cleanly architected first version that ships on a sustainable cadence. Orchestrates ten skills phase by phase - lean-startup, design-sprint, clean-architecture, domain-driven-design, clean-code, pragmatic-programmer, system-design, ios-hig-design, 37signals-way…

wondelai/skills · 217 tokens

create-business

Guided journey from raw idea to a validated, positioned, priced business with a chosen beachhead. Orchestrates ten skills phase by phase - jobs-to-be-done, mom-test, design-sprint, lean-startup, good-strategy-bad-strategy, blue-ocean-strategy, obviously-awesome, hundred-million-offers, monetizing-innovation…

wondelai/skills · 211 tokens

clean-architecture

Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to entities. Use when the user mentions "architecture layers", "dependency rule", "ports and adapters (hexagonal)", "onion architecture", "screaming architecture", "where should business logic go"…

wondelai/skills · 147 tokens

cold-start-problem

Start and scale networked products using Andrew Chen's "The Cold Start Problem" framework for network effects. Use when the user mentions "network effects", "chicken and egg", "cold start", "two-sided marketplace", "atomic network", "hard side", "liquidity", "critical mass", "invite-only launch", "how do I get my…

wondelai/skills · 168 tokens

influence-psychology

Apply the seven principles of ethical persuasion (reciprocity, commitment, social proof, authority, liking, scarcity, unity) to product design, copy, and sales. Use when the user mentions "social proof", "persuasive copy", "why users dont convert", "ethical persuasion", "reciprocity", "scarcity tactics", "commitment…

wondelai/skills · 156 tokens

watch

File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through /do. Use for automatic reactions to file changes; do NOT use for…

SethGammon/Citadel · 70 tokens