tdd

tdd is a skill for Claude Code, Codex from ntaffzii/Skill-Agents. It costs 43 tokens per session (472 once invoked), scanned A, original, MIT.

A software development workflow called test-driven development, or TDD, where you write a failing automated test, make the smallest code change that passes it, and then improve the code. It repeats this cycle for each small behavior.

In plain words
What is it for?
Use it when adding a feature or fixing a bug in a project with useful automated tests. It helps clarify edge cases, choose the right test level, and verify each implementation step.
Why use it?
It gives each code change a clear check and catches regressions while the change is being made. It also keeps implementation focused on behavior that users or other code can observe.

Skill for Claude CodeCodex

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

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/ntaffzii/skill-agents/tdd
Any agent
npx skills add ntaffzii/Skill-Agents --skill tdd
Clone the repo
git clone --depth 1 https://github.com/ntaffzii/Skill-Agents

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/ntaffzii/skill-agents/tdd.svg)](https://agentmods.dev/skills/ntaffzii/skill-agents/tdd)
Your own site
<a href="https://agentmods.dev/skills/ntaffzii/skill-agents/tdd"><img src="https://agentmods.dev/badge/skills/ntaffzii/skill-agents/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 472 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.1 $0.00043 $0.00472
Opus 5 $0.00022 $0.00236
Sonnet 5 $0.00009 $0.00094
Haiku 4.5 $0.00004 $0.00047

Measured 6d ago against content hash 0132774d6e06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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/engineering/tdd/SKILL.md · 65 lines

How it starts

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

TDD

Use this skill to make behavior changes with a tight feedback loop.

Workflow

  1. Clarify behavior

    • Identify the user-visible behavior, input, output, and edge cases.
    • Find the smallest vertical slice that proves the behavior.
    • If the request is ambiguous, make a conservative assumption and state it.
  2. Find the test seam

    • Prefer the seam closest to real behavior: integration, API, component, e2e, then unit.
    • Avoid tests that only assert implementation details.
    • If no useful seam exists, note that as design pressure and choose the best available signal.
  3. Red

    • Write one failing test for the next slice.
    • Run only the narrowest relevant test command first.
    • Confirm the failure is for the expected reason.
  4. Green

    • Implement the smallest change that passes the test.
    • Keep changes scoped to the behavior under test.
    • Do not refactor unrelated code during green.
  5. Refactor

    • Improve clarity only after the test passes.
    • Preserve behavior and rerun the relevant tests.
    • Remove duplication only when it is real and local.
  6. Expand

    • Add edge cases only after the core path works.
    • Repeat red-green-refactor for each slice.
    • Finish by running the broader relevant suite.

Test Quality Rules

  • A good test fails before the fix and passes after it.
  • Test names should describe behavior, not implementation.
  • Do not mock the thing being tested.
  • Prefer fixtures over hand-built objects when local patterns already use fixtures.
  • Keep assertions specific enough to catch the bug or behavior contract.

Verification

  • The new or changed test fails before the implementation when practical.
  • The focused test command passes after the implementation.
  • A broader relevant suite passes when the change touches shared behavior.
  • Untested risk is named when broader validation is not practical.

Completion Report

End with:

  • Behavior implemented
  • Tests added or changed
  • Commands run
  • Any untested risk

Read the full file on GitHub · 65 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. 6d ago First seen · 65 lines · 43 tokens per session scan A 0132774d6e06

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository ntaffzii/Skill-Agents (4 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 472 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.