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.
npx skills add XRenSiu/claude-code-forge --skill test-driven-developmentgit clone --depth 1 https://github.com/XRenSiu/claude-code-forgeWrote 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.
[](https://agentmods.dev/skills/xrensiu/claude-code-forge/test-driven-development)<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/test-driven-development"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/test-driven-development/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.
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/test-driven-development"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02135 |
| Opus 5.5 | $0.00000 | $0.00854 |
| Sonnet 5.5 | $0.00000 | $0.00427 |
| Haiku 4.5 | $0.00000 | $0.00214 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Development
来源: PDForge 类型: 纪律强制型 Skill
Announce at start: "I'm using the test-driven-development skill to ensure code quality through test-first methodology."
Iron Law (铁律)
╔═══════════════════════════════════════════════════════════════════════════╗
║ ║
║ NO CODE WITHOUT A FAILING TEST FIRST ║
║ 先测试失败,后写代码。没有例外。 ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════╝
This is not a suggestion. This is not a guideline. This is a law.
RED-GREEN-REFACTOR Cycle
digraph tdd_cycle {
rankdir=LR;
node [shape=box, style=filled];
RED [label="🔴 RED\nWrite failing test", fillcolor="#ffcccc"];
FAIL [label="Watch it fail", fillcolor="#ffcccc"];
GREEN [label="🟢 GREEN\nWrite minimal code", fillcolor="#ccffcc"];
PASS [label="Watch it pass", fillcolor="#ccffcc"];
REFACTOR [label="♻️ REFACTOR\nImprove design", fillcolor="#cceeff"];
COMMIT [label="📝 COMMIT", fillcolor="#ffffcc"];
RED -> FAIL -> GREEN -> PASS -> REFACTOR -> COMMIT -> RED;
}
Phase Details
| Phase | 做什么 | 禁止什么 |
|---|---|---|
| 🔴 RED | 写一个会失败的测试 | 写任何实现代码 |
| 👀 WATCH FAIL | 运行测试,确认失败 | 跳过这步 |
| 🟢 GREEN | 写最小代码让测试通过 | 写"顺便"的代码 |
| 👀 WATCH PASS | 运行测试,确认通过 | 跳过这步 |
| ♻️ REFACTOR | 改进代码设计 | 改变行为、破坏测试 |
| 📝 COMMIT | 提交通过的代码 | 提交红灯代码 |
Red Flags List (反合理化清单)
这些是 AI 可能找的借口——全部无效:
| AI 可能的借口 | 为什么是借口 | 正确做法 |
|---|---|---|
| "这个改动很简单,不需要测试" | 简单的改动也会引入 bug | 写测试 |
| "我已经手动测试过了" | 手动测试不可重复 | 写自动化测试 |
| "测试后置也能达到同样目的" | 测试后置会遗漏边缘情况 | 先写测试 |
| "这只是配置/文档改动" | 配置错误也是 bug | 写配置测试 |
| "现有测试已经覆盖了" | 真的吗?证明它 | 运行测试确认 |
| "时间紧迫,先实现再补测试" | 补测试的债很少还 | 先写测试 |
| "这个情况不一样因为..." | 没有不一样的情况 | 先写测试 |
| "代码已经写好了,保留作参考" | 参考会变成最终代码 | 删除它 |
| "我只是先探索一下" | 探索不需要写实现代码 | 删除实现,保留测试 |
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.
- 1mo ago First seen · 277 lines · 0 tokens per session scan A 0a25987592da
test-driven-development is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,135 tokens. 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-09-05.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.
iterative-development
TDD iteration loops using Claude Code Stop hooks - runs tests after each response, feeds failures back automatically.
mobiai-mobile-tdd
You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.
tdd
This skill should be used when the user wants to implement features or fix bugs using test-driven development. Enforces the RED-GREEN-REFACTOR cycle with vertical slicing, context isolation between test writing and implementation, human checkpoints, and auto-test feedback loops. Uses multi-agent orchestration with the…