tdd

tdd is a skill for Claude Code, Codex from KaelSensei/MagicAIBuilder. It costs 58 tokens per session (2,094 once invoked), scanned A, original, MIT.

A test-first method for designing software and fixing bugs. TDD, or test-driven development, means writing a small automated test, seeing it fail, then making the smallest code change that passes it.

In plain words
What is it for?
Use it before changing production behavior, to reproduce bugs with tests, or to check whether a claimed test-first development cycle actually happened.
Why use it?
It prevents untested behavior from being added and provides visible evidence that each change is required and works.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it before changing production behavior, to reproduce bugs with tests, or to check whether a claimed test-first development cycle actually happened.

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

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/kaelsensei/magicaibuilder/tdd/github.svg)](https://agentmods.dev/skills/kaelsensei/magicaibuilder/tdd)
Your own site
<a href="https://agentmods.dev/skills/kaelsensei/magicaibuilder/tdd"><img src="https://agentmods.dev/badge/skills/kaelsensei/magicaibuilder/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/kaelsensei/magicaibuilder/tdd"><img src="https://agentmods.dev/badge/skills/kaelsensei/magicaibuilder/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,094 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.00058 $0.02094
Opus 5.5 $0.00023 $0.00838
Sonnet 5.5 $0.00012 $0.00419
Haiku 4.5 $0.00006 $0.00209

Measured 17d ago against content hash f1a52d92925d, 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 17d 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 · 204 lines

How it starts

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

Test-Driven Design

TDD is a software design discipline, not merely a testing technique. Write an automated test before the corresponding production behavior, observe it fail, then let small increments drive an emergent design. Tests added after an implementation can provide regression coverage, but are not evidence of TDD.

The project contract is docs/engineering/tdd-with-ai.md. The test strategy (fakes, contracts, characterization) is docs/adr/0005-testing-strategy-fakes-contracts-and-characterization.md.

Three Constraints

  1. Do not write new production behavior without a failing test requiring it.
  2. Write no more test code than needed to expose the next missing behavior.
  3. Write no more production behavior than needed to pass that test while preserving existing contracts.

A missing symbol or compilation failure can be Red when it directly expresses the intended missing API. An unavailable runner, dependency, credential or network service is an environment blocker, not proof of a behavioral Red.

Test List: plan the behaviors first

Every plan starts with a test list: the behaviors to cover, in domain language (glossary terms from CONTEXT.md), including edge cases and failures. It goes in the plan and in the PR body.

  • Take exactly one item per cycle.
  • Add a behavior you discover to the list; do not implement it on the spot.
  • An item that nobody asked for is a scope question for the owner, not a test.

Red -> Super Green -> Refining Refactoring

Red: establish the next design requirement

  • Choose one observable behavior from the list and write the smallest deterministic test.
  • Complete one test's observed Red, minimal Green and optional refactor before introducing the next missing behavior. Do not batch new failing tests or distinct parameterized cases and implement them together. Writing tests first without these feedback cycles is test-first, not this TDD contract.
  • Run it before implementation and inspect the actual failure. Confirm that it fails because the behavior is absent, not because the fixture is broken.
  • For a bug, reproduce the reported scenario and retain the regression test.
  • Record the focused command, test and expected failure. Never invent Red evidence or describe an unexecuted test as verified.

Read the full file on GitHub · 204 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. 17d ago Changed · +120 lines · +8 tokens per session f1a52d92925d
  2. 1mo ago First seen · 84 lines · 50 tokens per session scan A 202d1e6fd27a

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository KaelSensei/MagicAIBuilder (2 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 2,094 once invoked, about $0.0002 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-10-10.

Related

tdd compared with skills from other repositories

tdd next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tddKaelSensei/MagicAIBuilderSkill2todayMITA58Claude Code, Codex
organization-best-practiceskrivoox/agent-stack-templateSkill302mo agoMITA61Claude Code, Codex
react-hook-formkrivoox/agent-stack-templateSkill302mo agoMITA85Claude Code, Codex
vibe-specConnorrmcd6/vibe-specSkill94mo agoMITA109Claude Code
shadcnkrivoox/agent-stack-templateSkill302mo agoMITA94Claude Code, Codex
interface-designkrivoox/agent-stack-templateSkill302mo agoMITA78Codex
vercel-react-best-practiceskrivoox/agent-stack-templateSkill302mo agoMITA67Claude Code, Codex