tdd

tdd is a skill for Claude Code, Codex from sordi-ai/skill-everything. It costs 29 tokens per session (903 once invoked), scanned A, original, MIT.

A test-first workflow called test-driven development, or TDD, where you write a failing test, make it pass with the smallest change, and then improve the code.

In plain words
What is it for?
Use it when adding behavior or fixing bugs to define requirements with tests and build the change in small, checked steps.
Why use it?
It helps prevent implementation from defining the expected behavior after the fact, which can produce tests that merely approve existing mistakes.

Skill for Claude CodeCodex

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

Good fit Use it when adding behavior or fixing bugs to define requirements with tests and build the change in small, checked steps.

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

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/sordi-ai/skill-everything/tdd.svg)](https://agentmods.dev/skills/sordi-ai/skill-everything/tdd)
Your own site
<a href="https://agentmods.dev/skills/sordi-ai/skill-everything/tdd"><img src="https://agentmods.dev/badge/skills/sordi-ai/skill-everything/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 903 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.00029 $0.00903
Opus 5 $0.00015 $0.00451
Sonnet 5 $0.00006 $0.00181
Haiku 4.5 $0.00003 $0.00090

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

How it starts

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

Sub-Skill: Test-Driven Development

Purpose: Prevents the common failure mode where agents write implementation first and tests second — producing tests that validate the code as-written rather than the intended behavior.

Rules

The Red-Green-Refactor Cycle

  1. MUST: Always write a failing test before writing production code. The test defines the desired behavior. If you cannot articulate a failing test, you do not yet understand the requirement. Reference: ERR-2026-017.

  2. MUST: Never write more production code than necessary to pass the current failing test. Resist the urge to implement the full feature. One test, one behavior, one pass. Then refactor.

  3. SHOULD: After each green test, look for refactoring opportunities before writing the next test. Refactoring under green tests is safe. Refactoring without tests is gambling.

  4. AVOID: Writing multiple tests at once before making any pass. One failing test at a time keeps feedback loops tight and prevents losing track of which behavior you are implementing.

Test Design

  1. SHOULD: Name tests to describe the scenario and expected outcome, not the function under test. test_empty_cart_returns_zero_total not test_calculate_total. The name is documentation.

  2. MUST: Ensure each test is independent and can run in any order. Shared mutable state between tests causes flaky suites. Use setup/teardown or fresh fixtures per test.

  3. SHOULD: Test behavior, not implementation. Assert on outputs and observable side effects, not internal method calls. Implementation-coupled tests break on every refactor.

  4. AVOID: Testing private methods directly. Test through the public API. If a private method needs its own tests, it probably belongs in a separate module.

Coverage and Boundaries

  1. SHOULD: Cover the happy path, at least one edge case, and at least one error case per public function. Three tests minimum per meaningful behavior.

  2. AVOID: Chasing 100% line coverage as a goal. Coverage measures execution, not correctness. A test that executes code without asserting anything is worthless. Aim for high branch coverage on business logic.

Read the full file on GitHub · 70 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 · 70 lines · 29 tokens per session scan A 6a8b01708c80

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository sordi-ai/skill-everything (20 stars, last pushed 3mo ago), licensed MIT. It adds 29 tokens to every session and 903 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-30.

Related

Other skills, from other repositories

agent-evaluation

Use when testing skills, commands, or agents for quality. Use after creating new skills, before deploying agents, or when debugging inconsistent agent behavior. Triggers on "evaluate", "test quality", "is this skill working", or QA of AI workflows.

guia-matthieu/clawfu-skills · 55 tokens

tdd

TDD with red-green-refactor loop and vertical slices. Triggers: TDD, test-first, red-green-refactor, test driving development.

softspark/ai-toolkit · 33 tokens

triage-issue

Bug triage: explores codebase for root cause, files GitHub issue with TDD fix plan. Triggers: triage, investigate bug, fix plan, root cause, file issue, bug report.

softspark/ai-toolkit · 47 tokens

tdd-workflow

Enforce practical Test-Driven Development for code changes in Go services. Use for new features, bug fixes, refactors, API changes, and new modules. Requires Red-Green-Refactor evidence, defect-hypothesis-driven tests, killer cases, and coverage gates (line + risk-path).

johnqtcg/awesome-skills · 65 tokens

developing-features-tdd

Build a new feature using strict test-driven development — UNDERSTAND → DESIGN → RED → VERIFY RED → GREEN → VERIFY GREEN → REFACTOR → VALIDATE → REPEAT. Use when building a new feature with TDD, when the user says "TDD this", "tests first", "red green refactor", or asks for feature work that needs to be verifiable…

Cristhianzl/claude-skills-czl · 106 tokens

fixing-bugs

Fix a bug using strict TDD — UNDERSTAND → REPRODUCE (RED) → VERIFY RED → FIX → VERIFY GREEN → VALIDATE → REFACTOR. Use when the user reports a bug, asks to fix something, mentions a Sentry/error/regression, or pastes a stack trace. Bugs require a failing test that proves the bug existed before any code change. For…

Cristhianzl/claude-skills-czl · 105 tokens