test-driven-development-codex

test-driven-development-codex is a skill for Claude Code, Codex from mzored/superpowers-cc-to-codex. It costs 35 tokens per session (1,102 once invoked), scanned A, original, MIT.

A workflow for test-driven development (TDD), where tests are written and shown failing before production code is added.

In plain words
What is it for?
Use it for features, bug fixes, and refactoring when behavior must be verified with tests, especially when the user explicitly requests TDD.
Why use it?
It helps prevent code from being written before its expected behavior is checked. It also catches weak tests that pass without actually verifying the right behavior.

Skill for Claude CodeCodex

Part of the superpowers-cc-to-codex plugin — 15 skills, 2 commands shipped together

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/mzored/superpowers-cc-to-codex/test-driven-development-codex
Any agent
npx skills add mzored/superpowers-cc-to-codex --skill test-driven-development-codex
Clone the repo
git clone --depth 1 https://github.com/mzored/superpowers-cc-to-codex

Made for: Claude Code, Codex.

Or install superpowers-cc-to-codex, the plugin that ships this one along with the rest of its 15 skills, 2 commands.

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-codex

README.md
[![agentmods](https://agentmods.dev/badge/skills/mzored/superpowers-cc-to-codex/test-driven-development-codex.svg)](https://agentmods.dev/skills/mzored/superpowers-cc-to-codex/test-driven-development-codex)
Your own site
<a href="https://agentmods.dev/skills/mzored/superpowers-cc-to-codex/test-driven-development-codex"><img src="https://agentmods.dev/badge/skills/mzored/superpowers-cc-to-codex/test-driven-development-codex.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,102 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.00035 $0.01102
Opus 5 $0.00017 $0.00551
Sonnet 5 $0.00007 $0.00220
Haiku 4.5 $0.00003 $0.00110

Measured 4d ago against content hash fbaa4cb56d48, 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-codex 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 4d 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-codex/SKILL.md · 130 lines

How it starts

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

Test-Driven Development

Keep Claude in the main thread for user interaction and task acceptance. Call the codex_implement MCP tool with promptTemplate: "tdd" for TDD-disciplined implementation. Use codex_resume for fix loops if TDD discipline is violated. Reference testing-anti-patterns.md when reviewing Codex output for testing quality.

Overview

Tests written after code prove nothing — passing tests don't confirm they test the right thing.

Core principle: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.

Announce at start: "I'm using the test-driven-development skill to implement this with strict red-green-refactor discipline."

The Iron Law

If you didn't watch the test fail, you don't know if it tests the right thing.

If Codex returns implementation without red-green evidence, reject it and resume with TDD enforcement.

When to Use

  • Any implementation task where test coverage is critical
  • New features, bug fixes, refactors where behavior must be verified
  • When the user explicitly requests TDD methodology

Workflow

Step 1: Verify Task Readiness

  • Task has clear acceptance criteria
  • Test framework is identified (check existing test files)
  • Codex CLI is available

If acceptance criteria are unclear, ask the user before dispatching.

Step 2: Call codex_implement with TDD Prompt Template

Call the codex_implement MCP tool with promptTemplate: "tdd":

{
  "tool": "codex_implement",
  "arguments": {
    "taskId": "task-17",
    "promptTemplate": "tdd",
    "prompt": "Implement the requested behavior with strict red-green-refactor discipline. Write the failing test first, then the minimal production change, then refactor only if the tests still pass.",
    "workspaceRoot": "/absolute/path/to/your/repo"
  }
}

Read the full file on GitHub · 130 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. 4d ago First seen · 130 lines · 35 tokens per session scan A fbaa4cb56d48

Subscribe to this mod's changes

test-driven-development-codex is a skill published in the GitHub repository mzored/superpowers-cc-to-codex (7 stars, last pushed 4mo ago), licensed MIT. It adds 35 tokens to every session and 1,102 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.