tdd

tdd is a skill for Claude Code, Codex from BlueprintOS/analysis-to-delivery. It costs 49 tokens per session (654 once invoked), scanned A, original, MIT.

A test-driven development workflow, where a test is written and shown to fail before the smallest implementation is added, then the code is improved. TDD is a way to use tests to guide software changes.

In plain words
What is it for?
Building or changing software one small behavior at a time. It covers writing a failing test, implementing the minimum fix, confirming the test passes, and rerunning tests after refactoring.
Why use it?
It confirms that a test actually checks the intended behavior and helps catch regressions during later cleanup. The required red, green, and refactor stages make the order explicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building or changing software one small behavior at a time. It covers writing a failing test, implementing the minimum fix, confirming the test passes, and rerunning tests after refactoring.

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

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 tdd

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/blueprintos/analysis-to-delivery/tdd"><img src="https://agentmods.dev/badge/skills/blueprintos/analysis-to-delivery/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 654 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.00049 $0.00654
Opus 5 $0.00024 $0.00327
Sonnet 5 $0.00010 $0.00131
Haiku 4.5 $0.00005 $0.00065

Measured 9d ago against content hash 9ef5b1e73524, 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 9d 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/orchestration/development/tdd/SKILL.md · 70 lines

What it actually says

TDD(桥接到 superpowers)

Contract

  • Inputs: executable task from writing plan, test target, acceptance criteria
  • Outputs: RED test, GREEN implementation, refactor notes
  • Gates: RED observed before implementation; GREEN observed after implementation
  • Required disciplines: stage-gate
  • Next: /executing-plans

本仓库不维护此 skill 的内容。完整纪律请读: <SUPERPOWERS_SKILL_ROOT>/tdd/SKILL.md

何时调

  • writing-plans 之后
  • 每个子任务开始时(红绿循环)

衔接点

  • 产出:RED 测试 + GREEN 实现 + REFACTOR
  • 下一步:/executing-plans(commit + 下一任务)
  • 门控:disciplines/stage-gate 第 3 层(RED 必须确认失败才能写实现)

降级方案(superpowers 未装时)

如果 <SUPERPOWERS_SKILL_ROOT>/tdd/ 不存在,严格按以下 4 步红绿循环:

1. RED — 写失败测试

  • src/test/ 写测试,只测一个最小行为
  • 跑测试 → 必须确认失败(看到红色 / FAILURE,不是 BUILD SUCCESS)
  • ❌ 跳过 RED = 你不知道测试到底在测什么

2. 最小实现

  • 最少量代码让测试通过(可以丑 / 可以硬编码)
  • 不优化、不重构、不扩展

3. GREEN — 跑通

  • 再跑测试 → 必须确认通过(看到 BUILD SUCCESS / PASSED)
  • ❌ 测试莫名通过 = 测试没断言你想要的东西

4. REFACTOR — 重构

  • 改进实现 / 抽取方法 / 命名优化
  • 每次重构后必须重跑测试确认仍 GREEN
  • 改完再跑 = 唯一能防止重构破坏功能的方法

最小纪律摘要

  • RED 必须亲眼看到失败:写测试 → 跑 → 看 stack trace → 才写实现
  • GREEN 后才能 REFACTOR:实现未通过前重构 = 在错的地基上盖楼
  • 测试一次只测一个行为:堆叠断言 = 失败时不知道哪个挂了
  • 不 mock 你要测的东西:只 mock 边界 IO

安装提示

npx skills@latest add obra/superpowers-tdd
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. 9d ago First seen · 70 lines · 49 tokens per session scan A 9ef5b1e73524

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository BlueprintOS/analysis-to-delivery (26 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 654 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.

Related

Other skills, from other repositories