test-driven-development

test-driven-development is a skill for Claude Code, Codex from Threat-Vector-Security/guardian-agent. It costs 17 tokens per session (569 once invoked), scanned A, original, Apache-2.0.

A test-first coding workflow, commonly called TDD, where you write a failing test before the production code, then make it pass and refine the result.

In plain words
What is it for?
Use it when adding or changing behavior: write the test, confirm it fails correctly, implement the smallest fix, and run broader checks.
Why use it?
It turns the intended behavior into a check before implementation, helping reveal incorrect assumptions and regressions.

Skill for Claude CodeCodex

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

Good fit Use it when adding or changing behavior: write the test, confirm it fails correctly, implement the smallest fix, and run broader checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/threat-vector-security/guardian-agent/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 Threat-Vector-Security/guardian-agent --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/Threat-Vector-Security/guardian-agent

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/threat-vector-security/guardian-agent/test-driven-development/github.svg)](https://agentmods.dev/skills/threat-vector-security/guardian-agent/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/threat-vector-security/guardian-agent/test-driven-development"><img src="https://agentmods.dev/badge/skills/threat-vector-security/guardian-agent/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.

agentmods 80×15 button for test-driven-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/threat-vector-security/guardian-agent/test-driven-development"><img src="https://agentmods.dev/badge/skills/threat-vector-security/guardian-agent/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 569 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.00017 $0.00569
Opus 5.5 $0.00007 $0.00228
Sonnet 5.5 $0.00003 $0.00114
Haiku 4.5 $0.00002 $0.00057

Measured 1mo ago against content hash cd0e22373931, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

skills/test-driven-development/SKILL.md · 57 lines

How it starts

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

Test-Driven Development

Overview / When to Use

Write the failing test first. Watch it fail for the right reason. Then write the smallest production change that makes it pass.

Persona Injection: Adopt the perspective of a QA Specialist. Your primary goal is to prove the code works through verifiable tests, not just to write code. You treat tests as the actual proof of correctness. No production code is valid without a failing test first.

Process

  1. Red: write one small test for one behavior.
    • Name the behavior clearly.
    • Prefer real behavior over mock choreography.
  2. Verify red.
    • Run the narrowest test command.
    • Confirm it fails for the expected reason, not because of typos or broken setup.
    • If an existing integration, scenario, or regression harness already covers the behavior, prefer that over a brand-new narrow unit test.
  3. Green: write the smallest implementation that passes.
    • Do not add extra features or cleanup yet.
  4. Verify green.
    • Re-run the focused test.
    • Run any broader existing check needed to prove the real behavior, not just the easiest local assertion.
  5. Refactor while keeping tests green.

Common Rationalizations

Rationalization Reality
"I'll write the code first and the tests later." Post-hoc testing is often biased to pass the code written. Tests must define the requirement first.
"The existing test suite is too broad, I'll just write a small unit test to pass quickly." Do not invent a narrower test just to avoid the real proof surface.
"I know this works, I don't need a test for this bug fix." If it broke once, it needs a regression test to ensure it never breaks again.

Red Flags

Stop and restart if:

  • the test was written after the code
  • the first run passed immediately
  • you are testing mocks instead of behavior
  • you are bundling multiple behaviors into one test
  • you are narrowing the proof surface to avoid an existing failing harness

Read the full file on GitHub · 57 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 57 lines · 17 tokens per session scan A cd0e22373931

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository Threat-Vector-Security/guardian-agent (13 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 569 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.

Related

Other skills, from other repositories

server-side-calls

Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.

trpc/trpc · 61 tokens

typescript-test-writing

Use this skill when writing or modifying tests in the llxprt-code repository. Covers mandatory TDD, behavioral testing, bun:test conventions and file naming, mock hygiene (no mock theater), and what never to test. Distilled from dev-docs/RULES.md, which remains the source of truth.

vybestack/llxprt-code · 66 tokens

agent-builder

Load immediately after an Agent intent, before the first agentbuilder call. Governs how you create, configure, test, and publish n8n Agents yourself with the agentbuilder tools: targeting, prerequisites, initial build, config freshness, interactive setup, models, memory, tools, and reply style. Use directly for…

n8n-io/n8n · 88 tokens

implementing-fuzz-testing-in-cicd-with-aflplusplus

Integrate AFL++ coverage-guided fuzz testing into CI/CD pipelines to discover memory corruption, input handling, and logic vulnerabilities in C/C++ and compiled applications.

xalgorix/xalgorix · 46 tokens

maestro-work

The contract every playbook shares - the brief a writer receives, the rules it writes by, the handback it returns, and the store record the holder keeps. Reuse existing checks and add tests only for concrete uncovered behavior or risk.

ReinaMacCredy/maestro · 52 tokens

tdd-agent

Autonomous test-driven development agent that writes code to make tests pass.

SHAdd0WTAka/Zen-Ai-Pentest · 17 tokens