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 asherzj/ashers-agent-skills --skill tddgit clone --depth 1 https://github.com/asherzj/ashers-agent-skillsWrote 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/asherzj/ashers-agent-skills/tdd)<a href="https://agentmods.dev/skills/asherzj/ashers-agent-skills/tdd"><img src="https://agentmods.dev/badge/skills/asherzj/ashers-agent-skills/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.
<a href="https://agentmods.dev/skills/asherzj/ashers-agent-skills/tdd"><img src="https://agentmods.dev/badge/skills/asherzj/ashers-agent-skills/tdd.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.00040 | $0.00904 |
| Opus 5 | $0.00020 | $0.00452 |
| Sonnet 5 | $0.00008 | $0.00181 |
| Haiku 4.5 | $0.00004 | $0.00090 |
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.
What it actually says
测试驱动开发
TDD 就是红 → 绿循环。本 skill 是让这个循环产出值得保留的测试的参考手册:什么是好测试、测试放在哪里、反模式,以及循环的规则。每一节都适用于每个循环:在循环之前和进行中查阅它们,而不是事后。
探索代码库时,先阅读 CONTEXT.md(如果存在),让测试名称和接口(interface)词汇与项目的领域语言保持一致,并遵守你所改动区域内的 ADR(架构决策记录)。
什么是好测试
测试通过公共接口验证行为,而不是实现细节。代码可以彻底重写;测试不应随之改变。好测试读起来像一份规格说明:"user can checkout with valid cart" 准确告诉你存在什么能力,而且它在重构后依然成立,因为它不关心内部结构。
示例见 tests.md,mock 指南见 mocking.md。
接缝(seam):测试放在哪里
接缝是你进行测试的公共边界:在不深入内部的情况下观察行为的接口。测试位于接缝处,绝不针对内部实现。
只在事先约定的接缝处测试。 在写任何测试之前,先写下被测接缝并与用户确认。任何测试都不写在未经确认的接缝上。你无法测试所有东西,所以事先约定接缝,才能让测试精力落在关键路径和复杂逻辑上,而不是每一个边缘情况。
问一句:"公共接口是什么?我们应该测试哪些接缝?"
当接口本身的形态尚存疑问时(模块有多深、接缝属于哪里、接口应该暴露什么),用 Skill 工具调用 "codebase-design" 获取相应词汇。它是模块(module)、接口(interface)、深度(depth)、接缝(seam)、适配器(adapter)、杠杆(leverage)、局部性(locality)这些术语的共享出处,是供查阅的参考,而不是要运行的会话。
反模式
- 实现耦合:mock 内部协作者、测试私有方法,或通过旁路渠道验证(查询数据库而不是使用接口)。识别信号:重构后行为没变,测试却挂了。
- 同义反复:断言用与代码相同的方式重新计算期望值(
expect(add(a, b)).toBe(a + b)、用同样方式手工推导出的快照、断言常量等于自身),因此它构造上必然通过,永远无法与代码不一致。期望值必须来自独立的真相来源:已知正确的字面值、算好的例子、spec(规格说明)。 - 水平切片:先写完所有测试,再写全部实现。批量测试验证的是想象出来的行为:你测试的是事物的形状而非面向用户的行为,测试对真实变化失去敏感,而且你在理解实现之前就敲定了测试结构。改用垂直切片(vertical slice):一个测试 → 一个实现 → 重复,每个测试都是一颗曳光弹(tracer bullet),回应上一个循环教给你的东西。
循环的规则
- 先红后绿。 先写失败的测试,再只写刚好让它通过的代码。不要预判未来的测试或添加投机性功能。
- 一次一个切片。 每个循环一个接缝、一个测试、一个最小实现。
- 重构不属于循环。 它属于评审阶段(见
code-reviewskill),不属于红 → 绿的实现循环。
What ships with it
3 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.
- 9d ago First seen · 39 lines · 40 tokens per session scan A 1d17b9495dd3
tdd is a skill published in the GitHub repository asherzj/ashers-agent-skills (2 stars, last pushed 12d ago), licensed MIT. It adds 40 tokens to every session and 904 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-31.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
iterative-development
TDD iteration loops using Claude Code Stop hooks - runs tests after each response, feeds failures back automatically.
python
Python development with ruff, mypy, pytest - TDD and type safety.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
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.