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/codelably/harmony-claude-codeWrote 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/codelably/harmony-claude-code/tdd)<a href="https://agentmods.dev/commands/codelably/harmony-claude-code/tdd"><img src="https://agentmods.dev/badge/commands/codelably/harmony-claude-code/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/commands/codelably/harmony-claude-code/tdd"><img src="https://agentmods.dev/badge/commands/codelably/harmony-claude-code/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.00028 | $0.02563 |
| Opus 5.5 | $0.00011 | $0.01025 |
| Sonnet 5.5 | $0.00006 | $0.00513 |
| Haiku 4.5 | $0.00003 | $0.00256 |
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 3mo 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.
This is a copy
81% identical to tdd — 162 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD 命令
此命令调用 tdd-guide 智能体(Agent)来强制执行测试驱动开发(TDD)方法论。
此命令的作用
- 搭建接口(Scaffold Interfaces) - 首先定义类型/接口
- 先生成测试 - 编写失败的测试(红/RED)
- 编写最小化实现代码 - 只编写刚好能通过测试的代码(绿/GREEN)
- 重构(Refactor) - 在保持测试通过的前提下优化代码(重构/REFACTOR)
- 验证覆盖率 - 确保测试覆盖率达到 80% 以上
适用场景
在以下情况下使用 /tdd:
- 实现新功能
- 添加新的函数/组件
- 修复 Bug(先编写重现该 Bug 的测试)
- 重构现有代码
- 构建核心业务逻辑
工作原理
tdd-guide 智能体将:
- 为输入/输出定义接口
- 编写会失败(FAIL)的测试(因为代码尚未存在)
- 运行测试并验证它们因预期的原因而失败
- 编写最小化实现以使测试通过
- 运行测试并验证它们通过
- 在保持测试通过的前提下重构代码
- 检查覆盖率,如果低于 80% 则添加更多测试
TDD 循环
红 (RED) → 绿 (GREEN) → 重构 (REFACTOR) → 重复 (REPEAT)
红 (RED): 编写一个失败的测试
绿 (GREEN): 编写最小化代码以通过测试
重构 (REFACTOR): 改进代码,保持测试通过
重复 (REPEAT): 下一个功能/场景
使用示例
User: /tdd 我需要一个计算市场流动性评分(market liquidity score)的函数
Agent (tdd-guide):
# TDD 会话:市场流动性评分计算器
## 步骤 1:定义接口 (SCAFFOLD)
```typescript
// lib/liquidity.ts
export interface MarketData {
totalVolume: number
bidAskSpread: number
activeTraders: number
lastTradeTime: Date
}
export function calculateLiquidityScore(market: MarketData): number {
// TODO: 待实现
throw new Error('Not implemented')
}
步骤 2:编写失败的测试 (RED)
// lib/liquidity.test.ts
import { calculateLiquidityScore } from './liquidity'
describe('calculateLiquidityScore', () => {
it('should return high score for liquid market', () => {
const market = {
totalVolume: 100000,
bidAskSpread: 0.01,
activeTraders: 500,
lastTradeTime: new Date()
}
const score = calculateLiquidityScore(market)
expect(score).toBeGreaterThan(80)
expect(score).toBeLessThanOrEqual(100)
})
it('should return low score for illiquid market', () => {
const market = {
totalVolume: 100,
bidAskSpread: 0.5,
activeTraders: 2,
lastTradeTime: new Date(Date.now() - 86400000) // 1 天前
}
const score = calculateLiquidityScore(market)
expect(score).toBeLessThan(30)
expect(score).toBeGreaterThanOrEqual(0)
})
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.
- 3mo ago First seen · 327 lines · 28 tokens per session scan A bdd3ab3e444b
tdd is a command published in the GitHub repository codelably/harmony-claude-code (44 stars, last pushed 9mo ago), licensed MIT. It adds 28 tokens to every session and 2,563 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 81% identical to tdd, differing in 162 lines, and is treated as a copy.
tdd compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tddcodelably/harmony-claude-code | Command | 44 | 9mo ago | MIT | A | 28 | Claude Code |
| bugfixnWave-ai/nWave | Command | 636 | 11d ago | MIT | A | 18 | Claude Code |
| hub-tddKastalien-Research/thoughtbox | Command | 66 | 19d ago | MIT | A | 27 | Claude Code |
| speckit.tdd.planarrrrny/zuraffa | Command | 5 | today | MIT | A | 37 | Claude Code |
| task-verifythixpin/pitway | Command | 20 | 1mo ago | MIT | A | 0 | Claude Code |
| usage-addthixpin/pitway | Command | 20 | 1mo ago | MIT | A | 0 | Claude Code |
| milestone-listthixpin/pitway | Command | 20 | 1mo ago | MIT | A | 0 | Claude Code |