test-driven-development

test-driven-development is a skill for Claude Code, Codex from mikeyobrien/ralph-orchestrator. It costs 41 tokens per session (1,078 once invoked), scanned A, original, MIT.

A test-first development workflow that starts by writing a failing test, then adds code to pass it and improves the result. It accepts a specification file, a task file, or a plain description.

In plain words
What is it for?
Use it to create tests from acceptance criteria or tasks, run the red-green-refactor cycle, and get guidance for property-based tests, which check many generated inputs.
Why use it?
It helps catch misunderstandings early by turning requirements into tests before implementation. It also keeps development aligned with existing patterns in the codebase.

Skill for Claude CodeCodex

About the project

Ralph Orchestrator is a framework that repeatedly runs AI-agent tasks until they finish or reach an iteration limit. Developers use it to coordinate autonomous coding work through command-line, web-dashboard, and MCP-server interfaces, with state managed per workspace. The catalogue entries provide agent skills, agents, instructions, and plugins for operating Ralph.

mikeyobrien/ralph-orchestrator · 3,122 stars · on GitHub

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/mikeyobrien/ralph-orchestrator/test-driven-development
Any agent
npx skills add mikeyobrien/ralph-orchestrator --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator

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/mikeyobrien/ralph-orchestrator/test-driven-development.svg)](https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/test-driven-development"><img src="https://agentmods.dev/badge/skills/mikeyobrien/ralph-orchestrator/test-driven-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,078 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.00041 $0.01078
Opus 5 $0.00020 $0.00539
Sonnet 5 $0.00008 $0.00216
Haiku 4.5 $0.00004 $0.00108

Measured 5d ago against content hash 8c41256017cb, 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 5d 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.

.claude/skills/test-driven-development/SKILL.md · 137 lines

How it starts

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

Test-Driven Development

Overview

One skill for all TDD workflows. Enforces test-first development using existing repository patterns. Three input modes handle different entry points — specs, task files, or ad-hoc descriptions — but the core cycle is always RED → GREEN → REFACTOR.

Input Modes

Detect the input type and follow the corresponding mode:

Mode A: From Spec (.spec.md)

Use when the input references a .spec.md file with Given/When/Then acceptance criteria.

  1. Locate and parse the spec file — extract all Given/When/Then triples
  2. Generate one test stub per criterion with todo!() bodies:
    /// Spec: <spec-file> — Criterion #<N>
    /// Given <given text>
    /// When <when text>
    /// Then <then text>
    #[test]
    fn <spec_name>_criterion_<N>_<slug>() {
        todo!("Implement: <then text>");
    }
    
  3. Verify stubs compile but fail: cargo test --no-run -p <crate>
  4. Proceed to the TDD Cycle to make stubs pass

Programmatic support: ralph_core::preflight::{extract_acceptance_criteria, extract_criteria_from_file, extract_all_criteria} can parse criteria from spec files.

Mode B: From Task (.code-task.md)

Use when the input references a .code-task.md file or a specific implementation task.

  1. Read the task and identify acceptance criteria or requirements
  2. Discover patterns (see Pattern Discovery)
  3. Design test scenarios covering normal operation, edge cases, and error conditions
  4. Write failing tests for all requirements before any implementation
  5. Proceed to the TDD Cycle

Mode C: From Description

Use for ad-hoc tasks without a spec or task file.

  1. Clarify requirements from the description
  2. Discover patterns (see Pattern Discovery)
  3. Write failing tests targeting the described behavior
  4. Proceed to the TDD Cycle

Pattern Discovery

Before writing tests, discover existing conventions:

Read the full file on GitHub · 137 lines

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. 5d ago First seen · 137 lines · 41 tokens per session scan A 8c41256017cb

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository mikeyobrien/ralph-orchestrator (3,122 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 1,078 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-30.