TDD Expert

TDD Expert is a skill for Claude Code, Codex from SkillMedev/legacy-modernization. It costs 129 tokens per session (1,452 once invoked), scanned A, original, MIT.

A test-first development guide based on TDD, or test-driven development. It follows a repeated cycle: write one failing test, add the smallest code that passes it, then improve the code.

In plain words
What is it for?
Use it when building a feature test-first, planning edge cases, or practicing the red-green-refactor cycle.
Why use it?
Writing tests before implementation clarifies the required behavior and catches missing cases early. It also makes later refactoring safer because the tests describe what must keep working.

Skill for Claude CodeCodex

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

Good fit Use it when building a feature test-first, planning edge cases, or practicing the red-green-refactor cycle.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skillmedev/legacy-modernization/tdd-expert
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 SkillMedev/legacy-modernization --skill tdd-expert
Clone the repo
git clone --depth 1 https://github.com/SkillMedev/legacy-modernization

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 Expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/tdd-expert.svg)](https://agentmods.dev/skills/skillmedev/legacy-modernization/tdd-expert)
Your own site
<a href="https://agentmods.dev/skills/skillmedev/legacy-modernization/tdd-expert"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/tdd-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,452 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.00129 $0.01452
Opus 5 $0.00064 $0.00726
Sonnet 5 $0.00026 $0.00290
Haiku 4.5 $0.00013 $0.00145

Measured 8d ago against content hash f48baffa426d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

TDD Expert 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 8d 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-expert/SKILL.md · 116 lines

How it starts

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

TDD Expert

Test-driven development produces code where every line exists because a test demanded it - which means every line is covered, the design is testable by construction, and refactoring is safe. The costly mistake this skill prevents is writing production code ahead of the tests: untested branches accumulate, the tests become an afterthought that mirrors the implementation, and the safety net has holes exactly where the bugs are.

Operating procedure

Order is the whole method - each step is only safe because the previous one finished.

Step 1: Gather inputs and write the test list

Before any test, collect: the behavior being built (one sentence), the interface it will be called through, and the known edge cases. Then write the test list: a plain bullet list of every behavior and edge case you can think of - happy path, empty input, boundaries, error cases. This is planning, not test code; add to it whenever a new case occurs to you mid-cycle instead of breaking the current cycle to chase it. If requirements are ambiguous, write the ambiguity into the list as a question and pick a defensible default, labeled as a guess.

Step 2: Red

Pick ONE item from the list - the simplest one that teaches you something. Write one failing test that describes the desired behavior through the public interface. Run it and watch it fail with the failure you expected. A test you never saw fail proves nothing: it may be testing nothing, or passing for the wrong reason.

Step 3: Green

Write the minimum code to pass - ugly, hardcoded, whatever. Minimum means minimum: hardcoding the expected return value is correct at this stage; the next test will force the generalization. Never write production code without a failing test that requires it, and never write ahead of the current test.

Step 4: Refactor

Only with all tests green: remove duplication, improve names, extract structure. Do not add behavior - behavior changes require going back to Red. Run the tests after every refactoring move.

Read the full file on GitHub · 116 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. 8d ago First seen · 116 lines · 129 tokens per session scan A f48baffa426d

Subscribe to this mod's changes

TDD Expert is a skill published in the GitHub repository SkillMedev/legacy-modernization (2 stars, last pushed 2mo ago), licensed MIT. It adds 129 tokens to every session and 1,452 once invoked, about $0.0006 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

issue-driven-development

Use for any development work - the master 13-step coding process that orchestrates all other skills, ensuring GitHub issue tracking, proper branching, TDD, code review, and CI verification.

troykelly/claude-skills · 42 tokens

tdd-full-coverage

Use when implementing features or fixes - test-driven development with RED-GREEN-REFACTOR cycle and full code coverage requirement.

troykelly/claude-skills · 30 tokens

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code.

obra/superpowers · 17 tokens

test-first-bugs

Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.

jamditis/claude-skills-journalism · 35 tokens

openspec-plus-tdd

MANDATORY skill that activates whenever code is written to implement an OpenSpec change task. Triggers: openspec-plus-apply is active, /opsx-apply is running, the user is implementing tasks from an OpenSpec change, an implementer subagent dispatched by openspec-plus-apply is starting work, or the user invokes phrases…

sudokar/openspec-plus · 190 tokens

nl-to-constraints

Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints. Use when converting informal requirements into structured, testable specifications with explicit constraints. Outputs in multiple formats including BDD-style Given-When-Then, JSON…

ArabelaTso/Skills-4-SE · 64 tokens