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 skills/yulin-bi/codeauto/tddnpx skills add Yulin-Bi/CodeAuto --skill tddgit clone --depth 1 https://github.com/Yulin-Bi/CodeAutoWhat 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 | $0.00053 | $0.01190 |
| Opus 5 | $0.00026 | $0.00595 |
| Sonnet 5 | $0.00011 | $0.00238 |
| Haiku 4.5 | $0.00005 | $0.00119 |
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 yesterday.
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
测试驱动开发
核心理念
核心原则:测试应通过公共接口验证行为,而非验证实现细节。代码可以彻底重构,但测试不应随之变动。
好测试是集成风格的:它们通过公共 API 执行真实的代码路径。测试描述的是系统做什么,而不是怎么做。好测试读起来就像一份规范——"用户可以用有效的购物车完成结账"——清楚说明了系统具备什么能力。这类测试能够经受住重构,因为它们不关心内部结构。
坏测试与实现紧密耦合。它们模拟(mock)内部协作者、测试私有方法,或者通过外部手段间接验证(例如不通过接口而是直接查询数据库)。警告信号:当你重构时测试挂了,但行为没有变化。如果你重命名了一个内部函数而导致测试失败,那些测试测试的是实现,而非行为。
详见 tests.md 中的示例和 mocking.md 中的模拟指南。
反模式:水平切分
不要先写完所有测试,再写所有实现。这就是"水平切分"——把 RED 阶段理解为"写所有测试",GREEN 阶段理解为"写所有代码"。
这会产生糟糕的测试:
- 批量编写的测试测试的是想象中的行为,而非实际的行为
- 你最终测试的是事物的形状(数据结构、函数签名),而非面向用户的行为
- 测试对真实变更变得不敏感——行为被破坏时测试通过,行为正常时测试反而失败
- 你超出了自己的视野范围,在还没理解实现之前就锁定了测试结构
正确做法:通过"示踪子弹"(tracer bullet)垂直切分。一个测试 → 一个实现 → 重复。每个测试都基于前一个周期学到的经验。因为你刚刚写了代码,你完全知道什么行为是重要的以及如何验证它。
错误(水平切分):
RED: test1, test2, test3, test4, test5
GREEN: impl1, impl2, impl3, impl4, impl5
正确(垂直切分):
RED→GREEN: test1→impl1
RED→GREEN: test2→impl2
RED→GREEN: test3→impl3
...
工作流程
1. 规划
在探索代码库时,使用项目的领域术语,使测试名称和接口词汇与项目语言保持一致,并遵守相关区域的 ADR。
在编写任何代码之前:
提问:"公共接口应该是什么样子?哪些行为最重要需要测试?"
你不可能测试所有东西。 与用户确认究竟哪些行为最重要。将测试精力集中在关键路径和复杂逻辑上,而非每个可能的边缘情况。
2. 示踪子弹
编写一个测试,验证系统的一件事情:
RED: 编写第一个行为的测试 → 测试失败
GREEN: 编写最简代码使其通过 → 测试通过
这是你的示踪子弹——证明端到端的路径是通的。
3. 增量循环
对剩余每个行为:
RED: 编写下一个测试 → 失败
GREEN: 编写最简代码使其通过 → 通过
规则:
- 一次只写一个测试
- 只写刚好能让当前测试通过的代码
- 不要预测未来的测试
- 保持测试关注可观察的行为
4. 重构
所有测试通过后,寻找重构机会:
- 提取重复代码
- 深化模块(把复杂逻辑隐藏在简单接口后面)
- 在自然的地方应用 SOLID 原则
- 思考新代码揭示了现有代码的什么问题
- 每次重构后运行测试
永远不要在 RED 状态下重构。 先回到 GREEN。
每个周期的检查清单
[ ] 测试描述的是行为,而非实现
[ ] 测试只使用公共接口
[ ] 测试能够经受住内部重构
[ ] 代码量刚好满足当前测试
[ ] 没有添加推测性的功能
What ships with it
5 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.
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.
- yesterday First seen · 110 lines · 53 tokens per session scan A 64a3b7105bc4
tdd is a skill published in the GitHub repository Yulin-Bi/CodeAuto (43 stars, last pushed 6d ago), licensed MIT. It adds 53 tokens to every session and 1,190 once invoked, about $0.0003 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 skills, from other repositories
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
interview
Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.
writing
将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.
union-type-wrappers
Add typed getters and setters over BinaryData properties that represent TypeSpec union types in generated Java models. Use when generated classes expose BinaryData for union-typed fields and you need ergonomic, type-safe accessors instead.
tika-eval-compare
Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".
run-tests
Run project tests using Maven (mvn). Use when the user asks to run tests.