tdd

tdd is a skill for Codex from tsai09495/matt-pocock-engineering. It costs 38 tokens per session (591 once invoked), scanned A, original, MIT.

A test-first development workflow, often called TDD, where you write a behavior test, see it fail, then implement the smallest change that makes it pass.

In plain words
What is it for?
Use it when building or changing behavior one vertical slice at a time, especially for red-green-refactor or other test-first work.
Why use it?
It catches misunderstandings early and keeps tests focused on what users or other code can observe. It also avoids tests that only check private implementation details.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when building or changing behavior one vertical slice at a time, especially for red-green-refactor or other test-first work.

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

Made for: 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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/tsai09495/matt-pocock-engineering/tdd.svg)](https://agentmods.dev/skills/tsai09495/matt-pocock-engineering/tdd)
Your own site
<a href="https://agentmods.dev/skills/tsai09495/matt-pocock-engineering/tdd"><img src="https://agentmods.dev/badge/skills/tsai09495/matt-pocock-engineering/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 591 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.00038 $0.00591
Opus 5 $0.00019 $0.00296
Sonnet 5 $0.00008 $0.00118
Haiku 4.5 $0.00004 $0.00059

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

Security

Grade A, and why

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 8d 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/matt-engineering/skills/tdd/SKILL.md · 59 lines

How it starts

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

Test-Driven Development

TDD is a hard RED → GREEN feedback loop that produces tests worth keeping. Read quality-baseline.md, tests.md, and mocking.md.

Use the project's domain glossary and relevant ADRs so test names and behavior match established language. Use codebase-design as the single source for module depth, interface, and seam vocabulary.

Choose the behavior and seam

Select one observable behavior and the highest practical public seam that exercises it. Tests should use the same interface as real callers, not private methods or implementation-only side channels.

  • Reuse an obvious established seam without repeated confirmation.
  • Explain and confirm a new, ambiguous, or expensive seam before adding it.
  • If no correct seam can exercise the behavior, report the architecture limitation rather than adding a misleading shallow test.

One vertical cycle

RED

  1. Write one focused behavior test.
  2. Derive expected values from the requirement, a worked example, protocol/specification, trusted fixture, or independent calculation.
  3. Run the focused test.
  4. Confirm it fails for the expected missing or broken behavior—not a syntax, fixture, or environment mistake.

GREEN

  1. Make the smallest production change that satisfies the test.
  2. Run the focused test and confirm it passes.
  3. Run nearby affected tests or checks to catch collateral breakage.

Only then choose the next behavior and repeat.

GREEN micro-refactor

While tests remain GREEN, make small local improvements needed for immediate readability or duplication. Rerun affected tests after each material step. Do not fold a systematic redesign, broad cleanup, or speculative abstraction into the loop; surface it during code-review or as a separate architecture task.

Anti-patterns

  • Horizontal slicing: writing all tests and then all implementation.
  • Implementation coupling: mocking internal collaborators, testing private methods, or asserting call choreography instead of behavior.
  • Tautology: deriving the expected value with the same algorithm or source as the implementation.
  • False RED: a test fails because setup is broken rather than because the behavior is missing.
  • Speculation: adding hooks or generalized interfaces for imagined future tests.
  • Over-mocking: mock only true system boundaries such as external services, time, randomness, or expensive infrastructure when a real adapter is impractical.

Read the full file on GitHub · 59 lines

Files

What ships with it

3 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. 8d ago First seen · 59 lines · 38 tokens per session scan A 005163799bb9

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository tsai09495/matt-pocock-engineering (2 stars, last pushed 14d ago), licensed MIT. It adds 38 tokens to every session and 591 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-31.

Related

Other skills, from other repositories

nl-to-constraints

Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints. Use when converting informal requirements into structured, testable specifications with explicit constraints. Outputs in multiple formats including BDD-style Given-When-Then, JSON…

ArabelaTso/Skills-4-SE · 64 tokens

lsp-refactoring

Intelligent code refactoring using IDE-level tools (rename, find-references, go-to-definition), AST-aware pattern matching, and TDD verification. Use for safe, large-scale refactoring with precision.

ArabelaTso/Skills-4-SE · 46 tokens

execute

Dispatch and execute implementation plans with TDD and checkpoints. Use when plan is ready. Parallel by default for independent tasks.

datit309/supergraph · 26 tokens

tdd

Strict test-driven development for behavior changes. Requires verified RED before production code, minimal GREEN, and refactor only after passing tests.

datit309/supergraph · 29 tokens

tdd-workflow

Test-Driven Development workflow for implementing features with tests first; enforces the two-commit audit trail (failing-test commit, then green commit) and shows-your-work verification for agent-driven work.

mnzralee/claude-multi-agent-architecture · 45 tokens

tests-purge-unneeded

Delete tests that don't catch real bugs — the inverse of TDD. Use when reviewing legacy test suites, slow CI investigations, refactor-driven test sweeps, or evaluating whether a test the type system already covers should stay. Thesis — a test exists only if removing it would let a real bug reach production.

OutlineDriven/odin-codex-plugin · 68 tokens