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.
npx skills add DevelopersGlobal/ai-agent-skills --skill test-driven-developmentgit clone --depth 1 https://github.com/DevelopersGlobal/ai-agent-skillsWrote 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.
[](https://agentmods.dev/skills/developersglobal/ai-agent-skills/test-driven-development)<a href="https://agentmods.dev/skills/developersglobal/ai-agent-skills/test-driven-development"><img src="https://agentmods.dev/badge/skills/developersglobal/ai-agent-skills/test-driven-development/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.
<a href="https://agentmods.dev/skills/developersglobal/ai-agent-skills/test-driven-development"><img src="https://agentmods.dev/badge/skills/developersglobal/ai-agent-skills/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.00848 |
| Opus 5.5 | $0.00013 | $0.00339 |
| Sonnet 5.5 | $0.00006 | $0.00170 |
| Haiku 4.5 | $0.00003 | $0.00085 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
TDD is the discipline of writing a failing test before writing implementation code. It forces you to think about the interface before the internals, produces tests that actually test behavior (not just coverage), and gives you a safety net for every refactor.
AI agents skip tests constantly. This skill makes tests non-optional.
When to Use
- Starting any new feature or function
- Fixing any bug (write a test that reproduces the bug first)
- Refactoring existing code (ensure test coverage before you start)
Process
Step 1: Write a Failing Test (Red)
- Write a test for the behavior you want — before writing implementation.
- The test should describe what the code does, not how:
- ✅
test("returns 404 when user not found") - ❌
test("calls findById with the user id")
- ✅
- Run the test. Confirm it fails for the right reason (not a syntax error — a missing implementation).
Verify: Test runs and fails with a clear "not implemented" or "undefined" error.
Step 2: Write Minimum Code (Green)
- Write the minimum implementation to make the test pass.
- Do not write more than the test requires — resist the urge to add logic for future cases.
- Run the test. Confirm it passes.
Verify: All tests pass. No new tests added yet.
Step 3: Refactor (Refactor)
- Now clean up the implementation — no new behavior, only improved structure.
- Run tests after every refactoring step — do not batch refactors.
- If tests break during refactor: revert immediately, refactor more carefully.
Verify: Tests still pass after refactor. Code is cleaner.
Step 4: Repeat for Each Behavior
- Repeat steps 1–3 for each distinct behavior of the feature.
- Test pyramid: many unit tests, fewer integration tests, minimal end-to-end tests.
Step 5: Coverage Sanity Check
- Run coverage report. Flag any critical paths with 0% coverage.
- Do NOT chase a coverage number — write tests for behaviors that matter.
Verify: All happy paths and key edge cases have tests. Coverage report reviewed.
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.
- 1mo ago First seen · 91 lines · 32 tokens per session scan A a441fe81bb3f
test-driven-development is a skill published in the GitHub repository DevelopersGlobal/ai-agent-skills (177 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 848 once invoked, about $0.0001 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-08-30.
Other skills, from other repositories
test-driven-development
Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug…
constraint-driven-development
A development method for writing a project's quality standards as a lasting, checkable contract. It can cover areas such as test coverage, security, performance, accessibility, and architecture.
test-driven-development
Instructions for test-driven development, or TDD: writing a failing test first, then the smallest code that makes it pass, followed by cleanup.
tdd
Test-driven development, from unit to end-to-end tests. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration or end-to-end tests (Playwright, Cypress). Don't use to backfill tests on existing code (/refactor) or diagnose an unknown bug (/debug).
test-driven-development
Drives development with tests via Red-Green-Refactor and the Prove-It pattern, with hard rules against weakening assertions or faking green suites. Use when implementing any logic, fixing any bug, or changing any behavior. Triggers on "add a feature", "fix this bug", "write tests", or any task where done must be…
spec-driven-development
Creates specs before coding, with hard rules against silently filled assumptions and untestable success criteria. Use when starting a new project, feature, or significant change and no specification exists yet. Triggers on "build me", "create a", "add a feature", or any requirement vague enough to need interpretation.