Borrowing it
Nothing to install: this file belongs to cacr92/WeReply. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cacr92/WeReply/main/.claude/skills/tdd-workflow/SKILL.mdgit clone --depth 1 https://github.com/cacr92/WeReplyWrote 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/cacr92/wereply/tdd-workflow)<a href="https://agentmods.dev/skills/cacr92/wereply/tdd-workflow"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/tdd-workflow/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/cacr92/wereply/tdd-workflow"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/tdd-workflow.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.00000 | $0.02544 |
| Opus 5 | $0.00000 | $0.01272 |
| Sonnet 5 | $0.00000 | $0.00509 |
| Haiku 4.5 | $0.00000 | $0.00254 |
Grade A, and why
tdd-workflow 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 462 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD 工作流 Skill
核心原则
强制要求:所有新功能、Bug 修复、重构必须达到 80% 以上测试覆盖率。
RED-GREEN-REFACTOR 循环
1. RED(写测试,测试失败)
先写测试,验证测试会失败(因为功能尚未实现)。
2. GREEN(实现代码,测试通过)
编写最小代码使测试通过。
3. REFACTOR(重构代码,保持测试通过)
优化代码,保持所有测试通过。
工作流程
步骤 1:编写用户故事
描述期望的行为:
作为用户,我希望能够创建新的饲料配方,
以便我可以保存和管理不同的配方方案。
验收标准:
- 配方名称必填,长度 2-50 个字符
- 品种代码必填,必须是有效的品种
- 创建成功后返回配方 ID
- 创建失败时显示错误消息
步骤 2:生成测试用例
覆盖正常路径和边界情况:
Rust 测试用例:
#[cfg(test)]
mod tests {
use super::*;
#[tokio::test]
async fn test_create_formula_success() {
// 正常创建配方
}
#[tokio::test]
async fn test_create_formula_empty_name() {
// 配方名称为空
}
#[tokio::test]
async fn test_create_formula_name_too_long() {
// 配方名称过长
}
#[tokio::test]
async fn test_create_formula_invalid_species() {
// 品种代码无效
}
#[tokio::test]
async fn test_create_formula_database_error() {
// 数据库连接失败
}
}
TypeScript 测试用例:
describe('FormulaForm', () => {
it('should create formula successfully', async () => {
// 正常创建
});
it('should show error when name is empty', async () => {
// 名称为空
});
it('should show error when name is too long', async () => {
// 名称过长
});
it('should show error when species is invalid', async () => {
// 品种无效
});
});
步骤 3:运行测试(RED)
# Rust
cargo test
# TypeScript
npm test
预期结果:测试失败(因为功能尚未实现)。
步骤 4:实现代码(GREEN)
编写最小代码使测试通过:
Rust 实现:
pub async fn create_formula(
&self,
dto: CreateFormulaDto,
) -> Result<i64> {
// 验证输入
if dto.name.is_empty() {
return Err(anyhow!("配方名称不能为空"));
}
if dto.name.len() > 50 {
return Err(anyhow!("配方名称过长"));
}
// 验证品种代码
self.validate_species_code(&dto.species_code).await?;
// 插入数据库
let formula_id = sqlx::query!(
"INSERT INTO formulas (name, species_code) VALUES (?, ?)",
dto.name, dto.species_code
)
.execute(&self.pool)
.await?
.last_insert_rowid();
Ok(formula_id)
}
What ships with it
1 file 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.
- 8d ago First seen · 462 lines · 0 tokens per session scan A da8bfaae84df
tdd-workflow is a skill published in the GitHub repository cacr92/WeReply (6 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,544 tokens. 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.