tdd

tdd is a skill for Claude Code, Codex from yugasun/aiops. It costs 17 tokens per session (215 once invoked), scanned A, original, Apache-2.0.

A test-driven development (TDD) guide that builds software in small cycles: write a failing test, add the minimum code to pass it, then improve the code. Tests check behavior through the parts of the program users or other code call.

In plain words
What is it for?
Use it to plan and implement features one behavior at a time, choose testable public interfaces, and refactor only after tests pass.
Why use it?
It reduces speculative code and keeps tests focused on behavior, so they are less likely to break when the internal implementation changes.

Skill for Claude CodeCodex

Part of the aiops plugin — 23 skills, 9 agents shipped together

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

Made for: Claude Code, Codex.

Or install aiops, the plugin that ships this one along with the rest of its 23 skills, 9 agents.

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/yugasun/aiops/tdd.svg)](https://agentmods.dev/skills/yugasun/aiops/tdd)
Your own site
<a href="https://agentmods.dev/skills/yugasun/aiops/tdd"><img src="https://agentmods.dev/badge/skills/yugasun/aiops/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 215 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.00017 $0.00215
Opus 5 $0.00009 $0.00108
Sonnet 5 $0.00003 $0.00043
Haiku 4.5 $0.00002 $0.00021

Measured 5d ago against content hash 5fa58d44a02f, 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 5d 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 · 28 lines

What it actually says

TDD

Tests verify behavior through public interfaces, not implementation. Good tests survive refactors; bad tests break on rename.

See tests.md and mocking.md for examples.

Anti-pattern: horizontal slices

Don't write all tests then all code. One behavior: RED → GREEN → repeat.

Workflow

  1. Plan — read CONTEXT.md/ADRs. Confirm interface changes and behaviors to test with user.
  2. Tracer bullet — one test, one minimal implementation, passes.
  3. Loop — one test at a time; only code to pass current test; no speculation.
  4. Refactor — only when GREEN; see refactoring.md.

Per-cycle checklist

  • Describes behavior, not implementation
  • Uses public interface only
  • Minimal code for this test
Files

What ships with it

3 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. 5d ago First seen · 28 lines · 17 tokens per session scan A 5fa58d44a02f

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository yugasun/aiops (4 stars, last pushed 16d ago), licensed Apache-2.0. It adds 17 tokens to every session and 215 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-31.

Related

Other skills, from other repositories