tdd

tdd is a skill for Claude Code, Codex from chipfighter/coding-discipline. It costs 27 tokens per session (167 once invoked), scanned A, original, MIT.

A test-first development workflow, commonly called TDD, where an automated test is written to fail before the implementation is added. The implementation is then made to pass the test and later cleaned up.

In plain words
What is it for?
Use it before implementing testable behavior, especially when fixing bugs or adding features. Follow the red, green, refactor cycle: failing test, smallest passing change, then cleanup.
Why use it?
It helps prevent code from being written without a clear, repeatable definition of correct behavior. The tests also preserve regression coverage, meaning they can detect when later changes break existing behavior.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Part of the coding-discipline plugin — 4 skills shipped together

Good fit Use it before implementing testable behavior, especially when fixing bugs or adding features. Follow the red, green, refactor cycle: failing test, smallest passing change, then cleanup.

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

Made for: Claude Code, Codex.

Or install coding-discipline, the plugin that ships this one along with the rest of its 4 skills.

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/chipfighter/coding-discipline/tdd/github.svg)](https://agentmods.dev/skills/chipfighter/coding-discipline/tdd)
Your own site
<a href="https://agentmods.dev/skills/chipfighter/coding-discipline/tdd"><img src="https://agentmods.dev/badge/skills/chipfighter/coding-discipline/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/chipfighter/coding-discipline/tdd"><img src="https://agentmods.dev/badge/skills/chipfighter/coding-discipline/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 167 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.00027 $0.00167
Opus 5.5 $0.00011 $0.00067
Sonnet 5.5 $0.00005 $0.00033
Haiku 4.5 $0.00003 $0.00017

Measured 15d ago against content hash b729e9ca9d70, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 15d 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.

plugins/coding-discipline/skills/tdd/SKILL.md · 13 lines

What it actually says

  1. Add or adapt the smallest test that expresses the expected behavior. Run it against the baseline and establish that it fails for the intended reason. For a regression, use the actual failing scenario when practical.
  2. Make the smallest implementation change that satisfies the behavior. Rerun the test and the relevant existing checks.
  3. Refactor if it improves the result, then rerun the relevant checks on the final change.

If implementation already exists, preserve it and use a safe baseline or an isolated comparison to check that the test distinguishes the behavior. When the baseline cannot be run, report what was verified.

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. 15d ago Changed · -27 lines · -58 tokens per session b729e9ca9d70
  2. 3mo ago First seen · 40 lines · 85 tokens per session scan A 61b6b0727f0f

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository chipfighter/coding-discipline (25 stars, last pushed 16d ago), licensed MIT. It adds 27 tokens to every session and 167 once invoked, about $0.0001 per session on Opus 5.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

tdd compared with skills from other repositories

tdd next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tddchipfighter/coding-disciplineSkill2516d agoMITA27Claude Code, Codex
ccc-e2eKevinZai/commanderSkill6yesterdayMITA70Claude Code, Codex
ccc-testingKevinZai/commanderSkill6yesterdayMITA41Claude Code
executeskullninja/coco-workflowSkill71mo agoMITA39Claude Code
connectgreenpolo/cc-multi-cli-pluginSkill198todayApache-2.0A11Claude Code
logingreenpolo/cc-multi-cli-pluginSkill198todayApache-2.0A10Claude Code
plan-pipeline-executeFlorianBruniaux/claude-code-ultimate-guideSkill7.6kyesterdayCC-BY-SA-4.0A54Claude Code