apd-tdd

apd-tdd is a skill for Claude Code, Codex from zstevovich/claude-apd. It costs 144 tokens per session (1,141 once invoked), scanned A, original, MIT.

A test-driven development guide for the APD builder phase. Test-driven development means writing a test that fails first, then writing code to make it pass and cleaning up the result.

In plain words
What is it for?
Use it when implementing features, fixing bugs, or writing new code during the APD builder phase.
Why use it?
It prevents production code from being written without a test that describes the required behavior.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions subagents; mentions Codex.

Part of the claude-apd plugin — 11 skills, 5 agents, 8 hooks, 1 MCP server shipped together

Good fit Use it when implementing features, fixing bugs, or writing new code during the APD builder phase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zstevovich/claude-apd/apd-tdd
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 zstevovich/claude-apd --skill apd-tdd
Clone the repo
git clone --depth 1 https://github.com/zstevovich/claude-apd

Made for: Claude Code, Codex.

Or install claude-apd, the plugin that ships this one along with the rest of its 11 skills, 5 agents, 8 hooks, 1 MCP server.

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 apd-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/zstevovich/claude-apd/apd-tdd/github.svg)](https://agentmods.dev/skills/zstevovich/claude-apd/apd-tdd)
Your own site
<a href="https://agentmods.dev/skills/zstevovich/claude-apd/apd-tdd"><img src="https://agentmods.dev/badge/skills/zstevovich/claude-apd/apd-tdd/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 apd-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/zstevovich/claude-apd/apd-tdd"><img src="https://agentmods.dev/badge/skills/zstevovich/claude-apd/apd-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,141 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.00144 $0.01141
Opus 5 $0.00072 $0.00571
Sonnet 5 $0.00029 $0.00228
Haiku 4.5 $0.00014 $0.00114

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

Security

Grade A, and why

apd-tdd 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 10d 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.

plugins/apd/skills/apd-tdd/SKILL.md · 105 lines

How it starts

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

APD Test-Driven Development (Codex)

On Codex this skill applies to the native builder subagent dispatched between apd:apd_advance_pipeline('spec', ...) and apd:apd_advance_pipeline('builder'). The orchestrator coordinates the phase and must not implement source changes itself.

When to use / When to skip

Use when:

  • You are inside the APD builder phase
  • You are about to write or modify production code (any non-test source file)
  • You are fixing a bug that has reached Phase 4 of apd-debug

Skip when:

  • You are reading code without modifying it
  • You are running an existing test suite (use shell directly)
  • You are editing documentation, configuration, or scaffolding files

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? Delete it. Start over. No exceptions.

Red → Green → Refactor

1. RED — failing test first

Write ONE minimal test that describes the behavior you want. Run it. Watch it fail. If it passes on the first run, you are testing existing behavior — fix the test to actually describe the new requirement.

Before each test-file write, call apd:apd_guard_write(apd_role="<role>", file_path="<path>"). The server reads scope from .apd/agents/<role>.md on every call — you only pass the role name and target path. Use apd:apd_list_agents() to discover which roles are defined. (Argument is apd_role, not role, to avoid Codex's multi_agent role-mismatch approval prompt.)

2. GREEN — minimal code to pass

Write the SIMPLEST code that makes the test pass. Nothing more.

  • No extra features
  • No "while I'm here" improvements
  • No over-engineering

3. REFACTOR — clean up (tests stay green)

Only once green: remove duplication, improve names, extract helpers. If a test goes red during refactoring, revert immediately.

4. Next behavior

Pick the next behavior. Write the next failing test. Repeat.

Scope enforcement on every write

Builder scope is declared in the agent frontmatter (.apd/agents/<role>.md, scope: list). Call apd:apd_guard_write(apd_role="<role>", file_path="<path>") before every Write/Edit — the server reads scope from the agent file itself, so the role name is the only handle you need (and can't widen).

Read the full file on GitHub · 105 lines

Files

What ships with it

4 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. 10d ago First seen · 105 lines · 144 tokens per session scan A d1c3640f3d42

Subscribe to this mod's changes

apd-tdd is a skill published in the GitHub repository zstevovich/claude-apd (5 stars, last pushed 1mo ago), licensed MIT. It adds 144 tokens to every session and 1,141 once invoked, about $0.0007 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.