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/zhukunpenglinyutong/ai-maxWrote 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/zhukunpenglinyutong/ai-max/tdd)<a href="https://agentmods.dev/commands/zhukunpenglinyutong/ai-max/tdd"><img src="https://agentmods.dev/badge/commands/zhukunpenglinyutong/ai-max/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/zhukunpenglinyutong/ai-max/tdd"><img src="https://agentmods.dev/badge/commands/zhukunpenglinyutong/ai-max/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.00037 | $0.02451 |
| Opus 5 | $0.00018 | $0.01226 |
| Sonnet 5 | $0.00007 | $0.00490 |
| Haiku 4.5 | $0.00004 | $0.00245 |
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 12d 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
88% identical to tdd — 154 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 代理来强制执行测试驱动开发方法论。
此命令的功能
- 搭建接口 - 首先定义类型/接口
- 先生成测试 - 编写失败的测试(红色阶段)
- 实现最小代码 - 只编写足够通过测试的代码(绿色阶段)
- 重构 - 在保持测试通过的同时改进代码(重构阶段)
- 验证覆盖率 - 确保 80% 以上的测试覆盖率
何时使用
在以下情况使用 /aimax:tdd:
- 实现新功能
- 添加新函数/组件
- 修复 bug(首先编写重现 bug 的测试)
- 重构现有代码
- 构建关键业务逻辑
工作原理
tdd-guide 代理将:
- 定义接口,用于输入/输出
- 编写将会失败的测试(因为代码还不存在)
- 运行测试,验证它们因正确的原因而失败
- 编写最小实现使测试通过
- 运行测试,验证它们通过
- 重构代码,同时保持测试通过
- 检查覆盖率,如果低于 80% 则添加更多测试
TDD 循环
红色 → 绿色 → 重构 → 重复
红色: 编写一个失败的测试
绿色: 编写最小代码使其通过
重构: 改进代码,保持测试通过
重复: 下一个功能/场景
使用示例
用户:/aimax:tdd 我需要一个计算市场流动性评分的函数
代理(tdd-guide):
# TDD 会话:市场流动性评分计算器
## 步骤 1:定义接口(搭建)
```typescript
// lib/liquidity.ts
export interface MarketData {
totalVolume: number
bidAskSpread: number
activeTraders: number
lastTradeTime: Date
}
export function calculateLiquidityScore(market: MarketData): number {
// TODO: Implementation
throw new Error('Not implemented')
}
步骤 2:编写失败的测试(红色)
// 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 day ago
}
const score = calculateLiquidityScore(market)
expect(score).toBeLessThan(30)
expect(score).toBeGreaterThanOrEqual(0)
})
it('should handle edge case: zero volume', () => {
const market = {
totalVolume: 0,
bidAskSpread: 0,
activeTraders: 0,
lastTradeTime: new Date()
}
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.
- 12d ago First seen · 327 lines · 37 tokens per session scan A 0eb3891bd1a7
tdd is a command published in the GitHub repository zhukunpenglinyutong/ai-max (335 stars, last pushed 7mo ago), licensed MIT. It adds 37 tokens to every session and 2,451 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to tdd, differing in 154 lines, and is treated as a copy.
Other commands, from other repositories
bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.
usage-add
PitWay: Accumulate measured planning or qa token usage onto a milestone.
dashboard
Generar dashboard HTML local con métricas de eficiencia del proyecto SDD.
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.