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

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.

agentmods
npx agentmods add skills/threat-vector-security/guardian-agent/test-driven-development
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00017 $0.00569
Opus 5 $0.00009 $0.00284
Sonnet 5 $0.00003 $0.00114
Haiku 4.5 $0.00002 $0.00057

Measured 3d ago against content hash cd0e22373931, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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. 3d 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 (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 569 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

sparc-methodology

SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration.

shyftlabs/continuum · 29 tokens

agenticx-query-data-source

Use when the user asks about verifiable quantitative facts (stock prices, financial indicators, macro data, company registry, academic metrics, legal statutes) that must come from a live data source rather than training memory.

DemonDamon/AgenticX · 49 tokens

agenticx-workflow-designer

Guide for designing and running AgenticX workflows including sequential pipelines, parallel execution, graph-based orchestration, conditional routing, and trigger services. Use when the user wants to create workflows, orchestrate multiple agents, design agent pipelines, or set up complex multi-step processes.

DemonDamon/AgenticX · 62 tokens

agenticx-agent-builder

Guide for creating persistent Near desktop digital avatars (数字分身) via natural-language interview and the createavatar tool. Use when the user wants to create an avatar, digital twin, specialist agent persona, or add someone to the avatar sidebar.

DemonDamon/AgenticX · 54 tokens

agenticx-skill-manager

Guide for managing AgenticX skills including listing, searching, installing, uninstalling, publishing, and running a skill registry server. Use when the user wants to manage skills, find available skills, publish custom skills, set up a skill registry, or understand the skill ecosystem.

DemonDamon/AgenticX · 62 tokens

agenticx-tool-creator

Guide for creating custom tools in AgenticX including function decorator tools, MCP tool integration, tool registries, and remote tool access. Use when the user wants to create tools for agents, integrate external APIs as tools, build MCP servers, or extend agent capabilities with custom functions.

DemonDamon/AgenticX · 63 tokens