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 agentmods add skills/developersglobal/ai-agent-skills/test-driven-developmentnpx skills add DevelopersGlobal/ai-agent-skills --skill test-driven-developmentgit clone --depth 1 https://github.com/DevelopersGlobal/ai-agent-skillsWhat 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 | $0.00032 | $0.00848 |
| Opus 5 | $0.00016 | $0.00424 |
| Sonnet 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 3d 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.
- 3d 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 (65 stars, last pushed 4mo ago), licensed MIT. It adds 32 tokens to every session and 848 once invoked, about $0.0002 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.
Other skills, from other repositories
test-driven-development
Drives development with tests. 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.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
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…
test-driven-development
用测试驱动开发。用于实现任何逻辑、修复任何 bug,或改变任何行为。用于需要证明代码能工作、收到 bug 报告,或即将修改现有功能时。.
code-review-and-quality
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
constraint-driven-development
Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or…