Test-Driven Development with RED-GREEN-REFACTOR cycle and commit strategy per Path
Scanned 9/5/2026
Install to Claude Code
npx -y skills add WenJunDuan/Rlues --skill tdd --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Tdd?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/wenjunduan-tdd-d549cdc9)More formats (shields.io, HTML) on the badges page.
---
name: tdd
description: "Test-Driven Development with RED-GREEN-REFACTOR cycle and commit strategy per Path"
---
# TDD (RED-GREEN-REFACTOR)
## 工具
| 工具 | 类型 | 用法 | 调用方式 |
|:---|:---|:---|:---|
| SP tdd | Superpowers | TDD 方法论 | 读取 ~/.codex/superpowers/skills/tdd/SKILL.md |
| SP subagent-driven-dev | Superpowers | 子任务并行 | 读取 ~/.codex/superpowers/skills/subagent-driven-dev/SKILL.md |
| sou | MCP | 搜索现有测试风格 | `sou.search("相关测试")` |
## 铁律
代码在测试之前编写 → 删除代码,重写。无例外。
## 循环
```
RED: 写测试 → 运行 → 必须失败
GREEN: 写最小代码 → 运行 → 必须通过
REFACTOR: 优化代码 → 运行 → 测试仍通过
```
## 执行方式
```
1. 从 todo.md 取 TDD 任务
2. sou.search("相关测试") → 了解项目测试风格
3. → SP tdd: 执行 RED-GREEN-REFACTOR
降级: SP 未安装 → 直接执行上述循环
4. 复杂任务 → SP subagent-driven-dev
降级: SP 未安装 → 顺序执行
5. 更新 doing.md → done.md
```
## 提交策略 (手动 Conventional Commits)
| Path | 提交时机 | 格式 |
|:---|:---|:---|
| A | 改完直接 commit | `fix: 描述` |
| B | 每个 TASK 完成后 | `feat: implement TASK-N` |
| C | 每个 GREEN 后 | `feat(module): TASK-N green` |
Codex 无 commit-commands plugin,手动写 Conventional Commits。
## 强制级别
| Path | TDD | 覆盖率 |
|:---|:---|:---|
| A | 跳过 | — |
| B | 推荐 (--no-tdd 跳) | 60% |
| C | 强制 | 80% |
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.
SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.
Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation
Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring AI-generated Python code (deslopification), (6) Designing API patterns, or (7) Optimizing backend performance.
PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.