test-driven-development

test-driven-development is a skill for Claude Code, Codex from vignesh2027/AI-AGENT-SKILLS. It costs 14 tokens per session (697 once invoked), scanned A, original, MIT.

A development method called test-driven development, or TDD, where you write a failing test before the code, make it pass with the smallest implementation, and then clean up the design.

In plain words
What is it for?
Use it for new business logic, bug fixes, difficult-to-test code, and edge cases such as empty or boundary inputs.
Why use it?
It defines expected behavior early, reduces unnecessary code, and leaves tests that check the implementation as it grows.

Skill for Claude CodeCodex

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

Good fit Use it for new business logic, bug fixes, difficult-to-test code, and edge…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vignesh2027/ai-agent-skills/test-driven-development
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 vignesh2027/AI-AGENT-SKILLS --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/vignesh2027/AI-AGENT-SKILLS

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 test-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/test-driven-development.svg)](https://agentmods.dev/skills/vignesh2027/ai-agent-skills/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/test-driven-development"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/test-driven-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 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.00014 $0.00697
Opus 5 $0.00007 $0.00349
Sonnet 5 $0.00003 $0.00139
Haiku 4.5 $0.00001 $0.00070

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

Security

Grade A, and why

test-driven-development 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 6d 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/test-driven-development/SKILL.md · 74 lines

How it starts

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

Overview

TDD is not about testing — it's about design. Writing tests first forces you to define the interface before the implementation, catches over-engineering, and creates a living specification. The test suite is proof of correctness, not evidence of effort.

When to Use

  • Before implementing any function, class, or service with business logic
  • When fixing a bug (write a test that reproduces it first)
  • When the implementation will be difficult to test after the fact

Process

Step 1: Write a failing test (Red)

Write the simplest test that captures one behavior. Run it. It must fail. If it passes without implementation, the test is wrong.

Step 2: Write the minimum implementation (Green)

Write the least code that makes the test pass. Do not add functionality that isn't tested yet. Resist the urge to generalize.

Step 3: Refactor (Refactor)

Now that the test passes, clean the implementation. Extract duplication, improve names, simplify logic. Run tests after each change.

Step 4: Repeat for the next behavior

Add one behavior at a time. The test suite grows incrementally.

Step 5: Write edge case tests

After the happy path works: test empty inputs, boundary values, error conditions, concurrent access, and failure modes.

Step 6: Test the contract, not the implementation

Tests should describe what the function does, not how it does it. Avoid testing internal state — test inputs and outputs.

Step 7: Keep tests fast and independent

Each test must run in isolation. No shared mutable state between tests. Tests that require a specific order are fragile.

Step 8: Maintain the test suite

A test that is wrong is worse than no test. Delete tests that no longer represent the system. Update tests when behavior intentionally changes.

Anti-Rationalizations

"I'll add tests after I'm done implementing" Tests written after implementation test what the code does. Tests written before implementation test what the code should do. These are different.

Read the full file on GitHub · 74 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. 6d ago First seen · 74 lines · 14 tokens per session scan A 6e565c1f1ecd

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository vignesh2027/AI-AGENT-SKILLS (2 stars, last pushed 8d ago), licensed MIT. It adds 14 tokens to every session and 697 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.