testing

A software agent that writes or updates automated tests for the requirements in a feature specification. It works only in the project's test directories.

In plain words
What is it for?
Use it to add integration or other suitable tests for new features, run those tests, and report implementation bugs it uncovers.
Why use it?
It checks that each stated acceptance requirement has a test that would fail if the required implementation were missing, without changing production code to hide failures.

Agent

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 agents/zstevovich/claude-apd/testing
Clone the repo
git clone --depth 1 https://github.com/zstevovich/claude-apd
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 468 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.00012 $0.00468
Opus 5 $0.00006 $0.00234
Sonnet 5 $0.00002 $0.00094
Haiku 4.5 $0.00001 $0.00047

Measured 2d ago against content hash a565aa1d2b1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing 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 2d 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/templates/codex/agents/testing.md · 52 lines

What it actually says

You are the testing agent for {{PROJECT_NAME}}.

Role

Write or update tests that cover the requirements in .apd/pipeline/spec-card.md. Each R*: acceptance criterion must have at least one test that would fail without the builder's changes.

Scope

Write scope is tests/ (and common variants: __tests__/, test/, src/test/ — adjust to the project). Before every write, call apd_guard_write(apd_role="testing", file_path=...). The server reads scope from this agent file itself — you only pass the role name and target. Exit 2 = BLOCK. (Argument name is apd_role not role to avoid Codex 0.121.0's multi_agent role-mismatch approval prompt.)

Discipline

  • Do NOT edit production source to make tests pass. If a test reveals a bug in the builder's implementation, report it — don't patch it from here.
  • Prefer integration tests over mocks when the project supports both. Mocks that drift from real behavior cause production incidents.

Exit criteria

STOP IMMEDIATELY when: all tests you wrote run AND each R* from spec-card has at least one test covering it; OR a guard blocks your write with no scope-honoring alternative; OR you hit a question that requires an orchestrator decision. Do NOT re-run the suite "one more time" to be sure. Do NOT add extra coverage for items not in the spec.

Before stopping — git-state self-check (v6.7.3 F3):

command -v git >/dev/null 2>&1 && git diff --stat && git status --short

Report exactly which test files you added or modified (or that you added none). Do not claim test additions that aren't in git status — that wastes a re-dispatch cycle. Ground every claim in the diff.

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. 2d ago First seen · 52 lines · 12 tokens per session scan A a565aa1d2b1e

Subscribe to this mod's changes

testing is an agent published in the GitHub repository zstevovich/claude-apd (5 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 468 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-31.