Token导航 LogoToken导航

Agent Skill · 研究检索

tdd-workflow(TDD 工作流程)

tdd-workflow 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

tdd-workflow 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 60,207。

总安装 372周安装 16GitHub Stars 127下载 131核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tdd-workflow(TDD 工作流程)
来源仓库:https://github.com/anton-abyzov/specweave
仓库路径:skills/tdd-workflow
安装命令:
npx skills add https://github.com/anton-abyzov/specweave --skill tdd-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/anton-abyzov/specweave --skill tdd-workflow

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

tdd-workflow 是一种轻量级的发现技能,它: ✅ 从用户消息中检测 TDD 意图 ✅ 询问用户对 TDD 执行级别的偏好 ✅ 路由到适当的工具(引导命令与专家代理) ✅ 教授 TDD 原则和最佳实践 ✅ 与 SpecWeave 增量工作流程集成 不能替代: TDD-编排器 代理(深厚的专业知识) /sw:tdd-* 命令(工作流程执行) 相反,它是帮助用户选择适合其上下文的 TDD 工具的切入点。

关键词:TDD、测试驱动开发、红绿重构、测试优先、Kent Beck、TDD 周期、基于属性的测试、突变测试、重构、测试规则 每周安装量 16 存储库 安东阿比佐夫 GitHub 之星 127 第一次看到 2026 年 1 月 22 日 安全审计 Gen Agent Trust Hub 通行证

来源仓库内路径:skills/tdd-workflow

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/anton-abyzov/specweave --skill tdd-workflow;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tdd-workflow 怎么安装?

在终端执行 npx skills add https://github.com/anton-abyzov/specweave --skill tdd-workflow。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tdd-workflow 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tdd-workflow 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

tdd-workflow 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

tdd-workflow 用的人多吗?

公开数据是累计安装 372 次,近一周安装 16 次,下载 131 次,GitHub 127 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tdd-workflow 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
tdd-workflow

TDD 工作流程 · 本页

372127操作浏览器MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

TDD Workflow - Discovery & Coordination Skill

Purpose

This skill acts as a discovery hub for Test-Driven Development (TDD) in SpecWeave. It:

  • ✅ Detects when users want to implement features with TDD
  • ✅ Asks user preference for TDD workflow enforcement
  • ✅ Routes to appropriate TDD tools (commands vs agent)
  • ✅ Provides TDD education and best practices

NOT a full TDD implementation - delegates to:

  • tdd-orchestrator agent (deep TDD expertise)
  • /sw:tdd:cycle command (enforced red-green-refactor)
  • Individual phase commands (/sw:tdd:red, /sw:tdd:green, /sw:tdd:refactor)

When to Activate

Automatic activation when user mentions:

  • "implement with TDD"
  • "use test-driven development"
  • "red-green-refactor"
  • "write tests first"
  • "test-first approach"
  • "Kent Beck style"
  • "TDD discipline"

Example triggers:

User: "Implement authentication with TDD"
User: "Use test-driven development for this feature"
User: "Let's do red-green-refactor for the payment module"

Workflow

Step 1: Detect TDD Intent

When activated, confirm user's TDD intent:

"I detected you want to use Test-Driven Development (TDD).

TDD follows the red-green-refactor cycle:
🔴 RED: Write a failing test first
🟢 GREEN: Write minimal code to make it pass
🔵 REFACTOR: Improve code while keeping tests green

Would you like to:"

Step 2: Offer TDD Options

Use AskUserQuestion tool to present choices:

Question: "How would you like to implement TDD for this feature?"
Options:
  1. "Guided TDD Workflow (/sw:tdd:cycle)"
     Description: "Full red-green-refactor cycle with gates between phases.
                   Can't proceed to GREEN without RED test. Most rigorous."

  2. "Expert TDD Agent (tdd-orchestrator)"
     Description: "Deep TDD expertise with flexible workflow.
                   Best for complex scenarios, property-based testing, legacy code."

  3. "Manual TDD (I'll guide myself)"
     Description: "I'll implement TDD discipline myself.
                   You provide TDD advice when needed."

Step 3: Route Based on Choice

Option 1: Guided TDD Workflow

Invoke: /sw:tdd:cycle

This command orchestrates:
1. /sw:tdd:red    - Write failing test (blocks until red)
2. /sw:tdd:green  - Implement minimal code (blocks until green)
3. /sw:tdd:refactor - Refactor safely (tests must stay green)

Benefits:
- Enforces discipline (gates prevent skipping phases)
- Perfect for beginners or teams learning TDD
- Integrates with SpecWeave increment workflow

Option 2: Expert TDD Agent

Invoke: tdd-orchestrator agent (via Task tool)

This agent provides:
- Multi-agent TDD workflow coordination
- Property-based testing (QuickCheck, Hypothesis)
- Mutation testing for test quality
- Legacy code refactoring with safety nets
- BDD/ATDD integration
- AI-assisted test generation

Benefits:
- Flexible workflow (not rigid gates)
- Advanced techniques (property-based, mutation)
- Best for experienced TDD practitioners
- Handles complex scenarios

Option 3: Manual TDD

Provide TDD best practices:

"I'll implement your feature while following TDD principles.
I'll ensure:
- Tests written before implementation
- Minimal code to pass tests
- Refactoring with test coverage
- Clear red→green→refactor progression

I'll notify you at each phase transition."

TDD Best Practices (Reference)

Red Phase 🔴

  • Write the simplest test that fails
  • Test should compile but fail on assertion
  • Focus on WHAT, not HOW
  • One test at a time

Green Phase 🟢

  • Write minimal code to pass the test
  • Embrace "fake it till you make it"
  • Hardcoded values acceptable initially
  • Get to green FAST

Refactor Phase 🔵

  • Improve code structure
  • Extract methods, remove duplication
  • Tests must stay green
  • Commit after each refactor

TDD Anti-Patterns to Avoid

  • ❌ Writing implementation before test
  • ❌ Writing multiple tests before implementation
  • ❌ Over-engineering in GREEN phase
  • ❌ Refactoring without tests passing
  • ❌ Skipping refactor phase

Integration with SpecWeave

In Increment Workflow:

/sw:inc "Authentication feature" → spec.md created
↓
User: "Implement with TDD"
↓
tdd-workflow skill activates → offers options
↓
User chooses: Guided TDD Workflow
↓
/sw:tdd:cycle invoked
  ↓
  Phase 1: RED   - tests.md updated with failing tests
  Phase 2: GREEN - tasks.md implementation
  Phase 3: REFACTOR - code improvements
↓
Increment tasks completed with TDD discipline

With spec-driven-debugging:

Bug found → spec-driven-debugging activates
↓
Fix proposal includes: "Add regression test first (TDD RED phase)"
↓
tdd-workflow can coordinate test-first bug fixes

Commands Reference

Full Cycle

  • /sw:tdd:cycle - Complete red-green-refactor orchestration

Individual Phases

  • /sw:tdd:red - RED phase only (write failing test)
  • /sw:tdd:green - GREEN phase only (make test pass)
  • /sw:tdd:refactor - REFACTOR phase only (improve code)

When to Use Each

Use /sw:tdd:cycle when:

  • ✅ Starting new feature from scratch
  • ✅ Learning TDD or teaching team
  • ✅ Want enforced discipline (gates)
  • ✅ Working in increment-based workflow

Use individual commands when:

  • ✅ Already in middle of TDD cycle
  • ✅ Need to repeat a phase (e.g., multiple refactors)
  • ✅ Want finer control over cycle
  • ✅ Integrating with other workflows

Use tdd-orchestrator agent when:

  • ✅ Complex scenarios (property-based testing)
  • ✅ Legacy code refactoring
  • ✅ Multi-agent coordination needed
  • ✅ Advanced TDD techniques required

Example Interactions

Example 1: Beginner TDD User

User: "I want to implement user registration with TDD"

tdd-workflow:

Great! TDD (Test-Driven Development) follows red-green-refactor:
🔴 RED: Write failing test
🟢 GREEN: Make it pass
🔵 REFACTOR: Improve code

[Presents AskUserQuestion with 3 options]

User selects: "Guided TDD Workflow"

tdd-workflow:

Perfect! I'm invoking /sw:tdd:cycle to orchestrate your TDD workflow.

🔴 Starting RED phase...
Write a failing test for user registration. Let me create the test skeleton:

[Creates test file with failing test]

✅ Test written and failing. Run: npm test
❌ Expected failure confirmed.

Ready to proceed to GREEN phase? (type 'yes' or run /sw:tdd:green)

Example 2: Experienced TDD User

User: "Refactor auth module with TDD safety nets"

tdd-workflow:

I see you want to refactor with TDD discipline.

[Presents AskUserQuestion]

User selects: "Expert TDD Agent"

tdd-workflow:

Invoking tdd-orchestrator agent for advanced refactoring support...

[tdd-orchestrator agent takes over with:]
- Characterization tests for legacy code
- Golden master testing
- Seam identification
- Incremental refactoring with safety nets

Example 3: Mid-Cycle TDD

User: "I'm in GREEN phase, tests passing, ready to refactor"

tdd-workflow:

Great! Tests are passing. Time for REFACTOR phase.

You can:
1. Run /sw:tdd:refactor (guided refactoring)
2. Refactor manually (I'll verify tests stay green)

Which would you prefer?

User: "I'll refactor manually"

tdd-workflow:

Perfect! I'll monitor your refactoring:

✅ Tests passing before refactor
[User refactors code]
✅ Tests still passing after refactor
✅ TDD cycle maintained

Ready for next feature? Run /sw:tdd:cycle or continue manually.

Configuration

Optional: Customize TDD preferences in .specweave/config.yaml:

tdd:
  default_workflow: "cycle"  # Options: "cycle", "agent", "manual"
  auto_activate: true         # Auto-offer TDD on new features
  gates_enabled: true         # Enforce phase gates in cycle mode
  mutation_testing: false     # Enable mutation testing (requires setup)

Success Criteria

This skill succeeds when:

  • ✅ Users are offered TDD workflow when appropriate
  • ✅ TDD choice is explicit (not assumed)
  • ✅ Clear routing to appropriate tool (command vs agent)
  • ✅ TDD education embedded in workflow
  • ✅ Flexible enough for beginners and experts
  • ✅ Integrates seamlessly with SpecWeave increments

Related Skills & Agents

Skills:

  • spec-driven-debugging - Bug fixes can use TDD approach
  • increment-planner - Increments can specify TDD as methodology
  • e2e-playwright - E2E tests can follow TDD for acceptance tests

Agents:

  • tdd-orchestrator - Deep TDD expertise (invoked by this skill)
  • qa-lead - Test strategy overlaps with TDD principles

Commands:

  • /sw:tdd:cycle - Full red-green-refactor orchestration
  • /sw:tdd:red, /sw:tdd:green, /sw:tdd:refactor - Individual phases

Summary

tdd-workflow is a lightweight discovery skill that:

  1. ✅ Detects TDD intent from user messages
  2. ✅ Asks user preference for TDD enforcement level
  3. ✅ Routes to appropriate tool (guided commands vs expert agent)
  4. ✅ Educates on TDD principles and best practices
  5. ✅ Integrates with SpecWeave increment workflow

Not a replacement for:

  • tdd-orchestrator agent (deep expertise)
  • /sw:tdd-* commands (workflow enforcement)

Instead, it's the entry point that helps users choose the right TDD tool for their context.


Keywords: TDD, test-driven development, red-green-refactor, test-first, Kent Beck, TDD cycle, property-based testing, mutation testing, refactoring, test discipline

平台分布

Claude Code

28.52%
按下载量换算37

Antigravity

24.43%
按下载量换算32

Cursor

19.83%
按下载量换算26

Gemini CLI

14.49%
按下载量换算19

OpenCode

7.8%
按下载量换算10

Codex

3.62%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills