everything-claude-code-zh is a Chinese translation of a collection of configurations for Claude Code and other AI coding agents. It provides agents, skills, hooks, commands, rules, and MCP configurations intended to support development workflows such as memory persistence, security scanning, evaluation, and research-first work. The catalogue includes commands, skills, agents, instructions, and a plugin from this configuration set.
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 agentmods add commands/xu-xiang/everything-claude-code-zh/tddgit clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zhWrote 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/commands/xu-xiang/everything-claude-code-zh/tdd)<a href="https://agentmods.dev/commands/xu-xiang/everything-claude-code-zh/tdd"><img src="https://agentmods.dev/badge/commands/xu-xiang/everything-claude-code-zh/tdd.svg" alt="Measured on agentmods" 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.00022 | $0.00601 |
| Opus 5 | $0.00011 | $0.00300 |
| Sonnet 5 | $0.00004 | $0.00120 |
| Haiku 4.5 | $0.00002 | $0.00060 |
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 6d 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.
What it actually says
TDD 命令 (TDD Command)
使用严格的测试驱动开发(TDD)实现以下内容:$ARGUMENTS
TDD 循环(强制执行)
RED → GREEN → REFACTOR → REPEAT
- 红 (RED):首先编写一个失败的测试
- 绿 (GREEN):编写最小化的代码以通过测试
- 重构 (REFACTOR):在保持测试通过的同时改进代码
- 重复 (REPEAT):持续进行直到功能开发完成
你的任务
步骤 1:定义接口 (SCAFFOLD)
- 为输入/输出定义 TypeScript 接口(Interfaces)
- 使用
throw new Error('Not implemented')创建函数签名
步骤 2:编写失败的测试 (RED)
- 编写测试接口的代码
- 包含正常路径 (happy path)、边界情况 (edge cases) 和错误条件 (error conditions)
- 运行测试 —— 验证其结果为 失败 (FAIL)
3 步:实现最小化代码 (GREEN)
- 编写足以让测试通过的代码即可
- 不要进行过早优化
- 运行测试 —— 验证其结果为 通过 (PASS)
步骤 4:重构 (IMPROVE)
- 提取常量,改进命名
- 消除重复
- 运行测试 —— 验证其结果仍为 通过 (PASS)
步骤 5:检查覆盖率 (Coverage)
- 目标:最低 80%
- 关键业务逻辑:100%
- 如有需要,添加更多测试
覆盖率要求
| 代码类型 | 最低标准 |
|---|---|
| 标准代码 (Standard code) | 80% |
| 财务计算 (Financial calculations) | 100% |
| 身份验证逻辑 (Authentication logic) | 100% |
| 安全关键代码 (Security-critical code) | 100% |
应包含的测试类型
- 单元测试 (Unit Tests):单个函数
- 边界情况 (Edge Cases):空、null、最大值、边界
- 错误条件 (Error Conditions):无效输入、网络故障
- 集成测试 (Integration Tests):API 端点、数据库操作
强制执行:必须在实现之前编写测试。严禁跳过红 (RED) 阶段。
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.
- 6d ago First seen · 67 lines · 22 tokens per session scan A 4451cdebf449
tdd is a command published in the GitHub repository xu-xiang/everything-claude-code-zh (1,929 stars, last pushed 6mo ago), licensed MIT. It adds 22 tokens to every session and 601 once invoked, about $0.0001 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.
Other commands, from other repositories
cpp-test
Enforce TDD workflow for C++. Write GoogleTest tests first, then implement. Verify coverage with gcov/lcov.
go-test
Go TDD workflow with table-driven tests.
rust-test
Rust TDD workflow with unit and property tests.
tdd
Enforce TDD workflow with 80%+ coverage.
tdd
Enforce strict TDD workflow - write test first, see it fail, then implement.
tdd
Test-driven change — write the failing test first, then implement.