tdd

tdd is a skill for Claude Code, Codex from SetraTheXX/Codex-Engineering-Workflow-Pack. It costs 43 tokens per session (1,040 once invoked), scanned A, original, MIT.

A guide to test-driven development (TDD), where a failing test is written first, the smallest code change makes it pass, and the code is then improved.

In plain words
What is it for?
Use it for new features and bug fixes when acceptance criteria should be implemented and verified through small vertical slices.
Why use it?
It keeps feature work focused on one observable behavior at a time and provides an early check that the implementation works without breaking existing behavior.

Skill for Claude CodeCodex

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/setrathexx/codex-engineering-workflow-pack/tdd
Any agent
npx skills add SetraTheXX/Codex-Engineering-Workflow-Pack --skill tdd
Clone the repo
git clone --depth 1 https://github.com/SetraTheXX/Codex-Engineering-Workflow-Pack

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/setrathexx/codex-engineering-workflow-pack/tdd.svg)](https://agentmods.dev/skills/setrathexx/codex-engineering-workflow-pack/tdd)
Your own site
<a href="https://agentmods.dev/skills/setrathexx/codex-engineering-workflow-pack/tdd"><img src="https://agentmods.dev/badge/skills/setrathexx/codex-engineering-workflow-pack/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,040 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.00043 $0.01040
Opus 5 $0.00022 $0.00520
Sonnet 5 $0.00009 $0.00208
Haiku 4.5 $0.00004 $0.00104

Measured 3d ago against content hash 1328b962bf14, 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 3d 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.

.agents/skills/tdd/SKILL.md · 200 lines

How it starts

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

Test-Driven Development

Use TDD to implement one observable behavior at a time.

The loop is:

one failing test -> smallest implementation -> refactor -> next test

Do not write all tests first. Do not implement the whole feature before the first failing test proves the path.

Read First

Before editing code, inspect:

  • docs/agents/test-commands.md
  • docs/agents/domain.md
  • CONTEXT.md
  • relevant ADRs under docs/adr/
  • existing tests near the behavior
  • package scripts or equivalent task definitions

If setup docs are missing, infer commands from the repo. Ask only if the verification command or behavior target is unclear.

Workflow

1. Clarify Behavior

Identify public behavior before test shape.

Capture:

  • User-visible outcome.
  • Acceptance criteria.
  • Public interface or entry point.
  • Existing behavior that must not regress.
  • Out-of-scope behavior.

Ask the user only for product or acceptance decisions that cannot be answered from files or code.

2. Choose The First Vertical Slice

Pick the thinnest end-to-end behavior that proves the feature direction.

A vertical slice should:

  • Be independently verifiable.
  • Touch real integration points when reasonable.
  • Avoid layer-only work with no observable outcome.
  • Produce a small but meaningful behavior.

If the requested work is large, list slices and start with the smallest useful one.

3. Select Test Level

Prefer tests through public interfaces.

Good targets:

  • Public function or module API.
  • HTTP endpoint.
  • CLI command.
  • UI behavior through user interaction.
  • Integration boundary already used by the repo.

Avoid:

  • Private methods.
  • Internal call counts.
  • Mocking the unit that owns the behavior.
  • Tests that break when implementation changes but behavior stays the same.

See references/test-quality-guide.md for examples.

4. Red

Write exactly one failing test for one behavior.

Then run the focused test command.

Confirm:

  • The test fails.
  • The failure is expected.
  • The test would pass only if the desired behavior exists.

Read the full file on GitHub · 200 lines

Files

What ships with it

2 files 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. 3d ago First seen · 200 lines · 43 tokens per session scan A 1328b962bf14

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository SetraTheXX/Codex-Engineering-Workflow-Pack (1 stars, last pushed 3d ago), licensed MIT. It adds 43 tokens to every session and 1,040 once invoked, about $0.0002 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.