tdd

tdd is a skill for Claude Code, Codex from KaelSensei/MagicAIBuilder. It costs 50 tokens per session (845 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 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 845 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.00050 $0.00845
Opus 5.5 $0.00020 $0.00338
Sonnet 5.5 $0.00010 $0.00169
Haiku 4.5 $0.00005 $0.00085

Measured 7d ago against content hash 202d1e6fd27a, 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 7d 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 · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 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.

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.

Red -> Super Green -> Refining Refactoring

Red: establish the next design requirement

  • Choose one observable behavior 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.

Super Green: satisfy only that requirement

  • Implement the simplest sufficient behavior with clear names, correct placement and the project's existing safety and quality standards.
  • Minimal does not mean deliberately dirty. Clean code does not mean advanced architecture: do not add future enum values, factories, interfaces, generic extension points or unrequested error cases.
  • Progress through small transformations when appropriate, rather than jumping to the imagined final design. Keep code quality separate from behavioral scope.
  • Run the focused test and relevant regressions. If another behavior is needed, begin another Red cycle instead of silently extending the implementation.

Read the full file on GitHub · 84 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. 7d 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 50 tokens to every session and 845 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

Other skills, from other repositories

server-side-calls

Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.

trpc/trpc · 61 tokens

pytest-suite

Write or extend the backend test suite following this project's conventions. Use when adding tests for a new service/route/repository, when coverage is missing, or when asked to test a feature. Knows the mocked-session + httpx AsyncClient setup so tests run with no database.

vstorm-co/full-stack-ai-agent-template · 59 tokens

common-subagent-driven-development

Execute multi-task implementation plans by dispatching a fresh implementer subagent per task with independent review gates. Use when implementing plans, executing multi-task PRs, or transitioning from planning to implementation.

HoangNguyen0403/agent-skills-standard · 45 tokens

implement-feature

Implement an approved feature plan with fresh-context slices, TDD, revision-bound evidence, and PR-ready output.

HoangNguyen0403/agent-skills-standard · 25 tokens

add-test

Add tests following project test patterns.

fpindej/netrock · 6 tokens

common-tdd

Guides quality-first TDD for new behavior, bug fixes, and test changes. Selects the smallest test layer, proves a distinct regression risk, and runs bounded RED-GREEN-REFACTOR verification.

HoangNguyen0403/agent-skills-standard · 46 tokens