tdd

tdd is a skill for Claude Code, Codex from scalarian/oh-my-codex. It costs 20 tokens per session (293 once invoked), scanned A, original, MIT.

A test-first workflow for defining software behavior with inputs and outputs. It follows the TDD (test-driven development) cycle: write a failing test, make it pass, then clean up the code.

In plain words
What is it for?
Use it for business rules, API agreements, parsing, formatting, validation, state changes, algorithms, and utility functions. It is not intended for styling, configuration-only changes, or exploratory prototypes.
Why use it?
It catches incorrect behavior early and keeps changes protected by tests. It also avoids adding code before the expected result is clear.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for business rules, API agreements, parsing, formatting, validation, state changes, algorithms, and utility functions. It is not intended for styling, configuration-only changes, or exploratory prototypes.

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

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/scalarian/oh-my-codex/tdd.svg)](https://agentmods.dev/skills/scalarian/oh-my-codex/tdd)
Your own site
<a href="https://agentmods.dev/skills/scalarian/oh-my-codex/tdd"><img src="https://agentmods.dev/badge/skills/scalarian/oh-my-codex/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 293 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.00020 $0.00293
Opus 5 $0.00010 $0.00147
Sonnet 5 $0.00004 $0.00059
Haiku 4.5 $0.00002 $0.00029

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

What it actually says

TDD

Purpose

Use $tdd when behavior can be specified before implementation. TDD is for design pressure and regression safety, not for ritual.

Good TDD Candidates

  • business rules
  • API contracts
  • parsing/formatting/validation
  • state transitions
  • algorithms and utility behavior

Skip TDD For

  • pure layout and styling work
  • config-only changes
  • trivial glue code
  • exploratory prototypes where the behavior is not yet known

Iron Law

No production code without a failing test first.

Cycle

  1. Red
    • write the smallest failing test for the next behavior
    • run it and prove it fails for the right reason
  2. Green
    • write the minimum code to make it pass
    • rerun the test and the relevant suite
  3. Refactor
    • clean up only after green
    • keep the suite green after every change

Rules

  • one behavior per cycle
  • do not batch multiple features into one red-green pass
  • prefer regression tests for changed behavior
  • record the verify command in the plan or task notes

Output Standard

  • what behavior the test locked in
  • the failing signal
  • the minimal implementation
  • the final verification command
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. 8d ago First seen · 56 lines · 20 tokens per session scan A 1b49bea58b24

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository scalarian/oh-my-codex (73 stars, last pushed 5mo ago), licensed MIT. It adds 20 tokens to every session and 293 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

tdd-cycle

Execute full TDD red-green-refactor cycle with validation gates. Use when saying "TDD cycle", "test-driven development", or "full TDD workflow".

anton-abyzov/specweave · 33 tokens

atomic-tdd

Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…

damusix/atomic-claude · 142 tokens

ralphctl-test-driven-development

Execute-phase skill — write the failing test before the code that makes it pass; for bug fixes, this is the reproduction test itself. Use for any logic change, bug fix, or behavioural modification; for the full root-cause triage pipeline around an unexpected failure, see ralphctl-debugging-and-error-recovery.

lukas-grigis/ralphctl · 72 tokens

tdd

A test-driven development workflow based on repeating three stages: write a failing test, make it pass, then improve the code. The tests focus on what users can do through public interfaces rather than internal implementation details.

Yulin-Bi/CodeAuto · 53 tokens

go

Go phase. Reads the approved SPEC file, maps Requirements to tasks (plan), executes via TDD (build), and integrates results verifying all Acceptance Criteria.

epicsagas/epic-harness · 33 tokens

test-driven-development

Use when user explicitly requests test-driven development. Triggers: 'TDD', 'write tests first', 'red green refactor', 'test-first', 'start with the test'. Also invoked by develop and executing-plans for implementation tasks. NOT for: full feature work (use develop, which includes TDD internally).

axiomantic/spellbook · 69 tokens