tdd

tdd is a skill for Claude Code from diegoesolorzano/spec-plan-ship. It costs 95 tokens per session (1,739 once invoked), scanned A, original, MIT.

A coding workflow based on TDD, or test-driven development: write a test that fails, make the smallest code change that passes it, then improve the code.

In plain words
What is it for?
Plan tests for feature work and bug fixes, implement behavior through the red-green-refactor cycle, and use existing test plans or feature requirements as guidance.
Why use it?
It exposes missing or incorrect behavior early and keeps changes tied to checks that can be run again later.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Plan tests for feature work and bug fixes, implement behavior through the red-green-refactor cycle, and use existing test plans or feature requirements as guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/diegoesolorzano/spec-plan-ship/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 diegoesolorzano/spec-plan-ship --skill tdd
Clone the repo
git clone --depth 1 https://github.com/diegoesolorzano/spec-plan-ship

Made for: Claude Code.

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/diegoesolorzano/spec-plan-ship/tdd.svg)](https://agentmods.dev/skills/diegoesolorzano/spec-plan-ship/tdd)
Your own site
<a href="https://agentmods.dev/skills/diegoesolorzano/spec-plan-ship/tdd"><img src="https://agentmods.dev/badge/skills/diegoesolorzano/spec-plan-ship/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,739 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.
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.00095 $0.01739
Opus 5 $0.00048 $0.00870
Sonnet 5 $0.00019 $0.00348
Haiku 4.5 $0.00010 $0.00174

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

How it starts

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

Test-Driven Development

You are a QA-minded Developer. You write tests BEFORE implementation code. Always.

Core Cycle: RED → GREEN → REFACTOR

RED:      Write a test that fails (it MUST fail — if it passes, your test is wrong)
GREEN:    Write the MINIMUM code to make the test pass (no more)
REFACTOR: Improve the code while keeping tests green

Procedure

Step 1: Understand What to Test

  • Check for test design artifacts first (in priority order). Resolve them by the feature's {id} — read the **Feature ID:** field from the plan or any artifact in play, then look up the exact paths docs/specs/{id}-tests.md and docs/specs/{id}-plan.md (do NOT glob blindly across all plans):
    1. Look for docs/specs/{id}-tests.md (full test plan from /test-plan). If found, use it as the primary source of test cases.
    2. Check the feature plan docs/specs/{id}-plan.md for a ## Test Matrix section. If found, use the per-task cases and shared fixtures from it.
    3. If neither exists, design tests based on the task's Do/Produces blocks.
  • If given a plan file path, read it and identify tasks marked Tests: Yes
  • If given a task description, clarify what behavior needs testing
  • Pure function override: If a task is marked Tests: No but contains pure functions with clear input/output contracts (math, transformations, validators, formatters), write unit tests for them anyway. Tests: No means "no integration/E2E test at this task level" — not "this code should never be tested."

Step 2: Identify Test Type

Choose the right level based on what you're testing:

What Test Type Speed Scope
Pure functions, utilities, helpers Unit Fast (<50ms) Single function
API routes, database operations Integration Medium (<500ms) Multiple units
User flows, full workflows E2E Slow (<10s) Entire system

Use ALL levels. A well-tested feature has:

  • Unit tests for pure logic and utilities
  • Integration tests for API routes and service interactions
  • E2E tests for critical user flows against the real system

Read the full file on GitHub · 191 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. 7d ago First seen · 191 lines · 95 tokens per session scan A e6aa0036fd4f

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository diegoesolorzano/spec-plan-ship (5 stars, last pushed 3d ago), licensed MIT. It adds 95 tokens to every session and 1,739 once invoked, about $0.0005 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.