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.
git clone --depth 1 https://github.com/an8079/take-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/commands/an8079/take-skills/tdd)<a href="https://agentmods.dev/commands/an8079/take-skills/tdd"><img src="https://agentmods.dev/badge/commands/an8079/take-skills/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.00021 | $0.00626 |
| Opus 5 | $0.00010 | $0.00313 |
| Sonnet 5 | $0.00004 | $0.00125 |
| Haiku 4.5 | $0.00002 | $0.00063 |
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 工作流
进入测试驱动开发模式。
使用方式
/tdd
TDD 流程
RED → GREEN → IMPROVE
↓ ↓ ↓
写测试 实现最小 重构优化
代码 代码让 改善设计
测试通过
三个步骤
1. RED - 编写失败的测试
describe('UserService', () => {
it('should create user with valid data', async () => {
const userData = { email: '[email protected]', password: 'pass123' };
const result = await userService.createUser(userData);
expect(result).toHaveProperty('id');
expect(result.email).toBe('[email protected]');
});
});
运行测试,确保失败:
npm test
2. GREEN - 实现最小代码
编写最少的代码让测试通过:
class UserService {
async createUser(userData: UserData): Promise<User> {
return {
id: '1',
email: userData.email,
createdAt: new Date(),
};
}
}
运行测试,确保通过:
npm test
3. IMPROVE - 重构优化
在保持测试通过的前提下改善代码:
class UserService {
constructor(private userRepository: UserRepository) {}
async createUser(userData: UserData): Promise<User> {
this.validateEmail(userData.email);
const user = await this.userRepository.create(userData);
return user;
}
private validateEmail(email: string): void {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
throw new Error('Invalid email');
}
}
}
运行测试,确保仍然通过:
npm test
TDD 优点
| 优点 | 说明 |
|---|---|
| 清晰的设计需求 | 测试就是需求文档 |
| 降低 bug 风险 | 测试驱动确保代码正确 |
| 更容易重构 | 有测试保护,重构更安全 |
| 更好的代码结构 | 为了可测试性,代码更模块化 |
覆盖率目标
| 类型 | 目标覆盖率 |
|---|---|
| 语句覆盖 | 85% |
| 分支覆盖 | 80% |
| 函数覆盖 | 90% |
提示: TDD 不是教条,而是工具。在合适的时候使用,能显著提高代码质量。
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 · 116 lines · 21 tokens per session scan A 99e6482b2eb8
tdd is a command published in the GitHub repository an8079/take-skills (4 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 626 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-31.
Other commands, from other repositories
bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.
dashboard
Generar dashboard HTML local con métricas de eficiencia del proyecto SDD.
usage-add
PitWay: Accumulate measured planning or qa token usage onto a milestone.
hub-tdd
TDD workflow for MCP Hub implementation. Types → Tests (red) → Implementation (green) with git gates.
eval
Evaluate and improve one healthcare agent's system prompt. Run up to 5 iterations of: prepare fixed questions -> answer -> judge -> improve -> re-score -> commit if better.
tdd
A command that follows test-driven development (TDD), a method where you write tests before the code they check. It moves through writing a failing test, adding the smallest implementation, and then improving the code.