Systematic task implementation using TDD, phase checkpoints, and structured commits. Ensures quality through red-green-refactor cycles, 80% coverage gates, and verification protocols before proceeding.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install workflow-patterns或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install workflow-patterns⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/workflow-patterns/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: workflow-patterns model: standard version: 2.0.0 description: > Systematic task implementation using TDD, phase checkpoints, and structured commits. Ensures quality through red-green-refactor cycles, 80% coverage gates, and verification protocols before proceeding. tags: [tdd, workflow, quality, testing, git, checkpoints, implementation] ---
Implement tasks systematically using TDD (Test-Driven Development) with phase checkpoints and verification protocols. Ensures quality at every step.
npx clawhub@latest install workflow-patterns
Provides a structured approach to implementing tasks:
Use for:
Skip for:
Keywords: TDD, implementation, testing, coverage, checkpoints, verification, red-green-refactor
11 steps for each task:
Read the plan and identify the next pending [ ] task. Select tasks in order within the current phase. Do not skip ahead.
Update the plan to mark the task as [~]:
- [~] **Task 2.1**: Implement user validation
Write tests that define expected behavior before implementation:
def test_validate_email_valid():
user = User(email="[email protected]")
assert user.validate_email() is True
def test_validate_email_invalid():
user = User(email="invalid")
assert user.validate_email() is False
Write the minimum code to make tests pass:
With green tests, improve the code:
Check test coverage meets the 80% target:
pytest --cov=module --cov-report=term-missing
If coverage is below 80%:
If implementation deviated from plan or added dependencies:
Create focused commit:
git commit -m "feat(user): implement email validation
- Add validate_email method to User class
- Handle empty and malformed emails
- Add comprehensive test coverage
Task: 2.1"
Mark task complete with commit SHA:
- [x] **Task 2.1**: Implement user validation `abc1234`
git commit -m "docs: update plan - task 2.1 complete"
Continue to next task until phase is complete.
When all tasks in a phase are complete:
git diff --name-only <last-checkpoint-sha>..HEAD
For each modified file:
pytest -v --tb=short
All tests must pass.
## Phase 1 Verification
- [ ] User can register with valid email
- [ ] Invalid email shows appropriate error
- [ ] Database stores user correctly
Present checklist:
Phase 1 complete. Please verify:
1. [x] Test suite passes (automated)
2. [x] Coverage meets target (automated)
3. [ ] Manual verification items (requires human)
Respond with 'approved' to continue.
Do NOT proceed without explicit approval.
git commit -m "checkpoint: phase 1 complete
Verified:
- All tests passing
- Coverage: 87%
- Manual verification approved"
Update plan checkpoints table:
## Checkpoints
| Phase | SHA | Date | Status |
|---------|---------|------------|----------|
| Phase 1 | def5678 | 2025-01-15 | verified |
| Phase 2 | | | pending |
Before marking any task complete:
| Gate | Requirement | |------|-------------| | Tests | All existing tests pass, new tests pass | | Coverage | New code has 80%+ coverage | | Linting | No linter errors | | Types | Type checker passes (if applicable) | | Security | No secrets in code, input validation present |
<type>(<scope>): <subject>
<body>
Task: <task-id>
Types:
feat — New featurefix — Bug fixrefactor — Code change without feature/fixtest — Adding testsdocs — Documentationchore — MaintenanceDiscovered requirement not in spec:
Feature deemed unnecessary:
[-] (skipped) with reasonDifferent approach than planned:
- [x] **Task 2.1**: Implement validation `abc1234`
- DEVIATION: Used library instead of custom code
- Reason: Better edge case handling
- Impact: Added email-validator to dependencies
[!] with blocker description| Symbol | Meaning | |--------|---------| | [ ] | Pending | | [~] | In progress | | [x] | Complete | | [-] | Skipped | | [!] | Blocked |
...
安装 Workflow Patterns 后,可以对 AI 说这些话来触发它
Help me get started with Workflow Patterns
Explains what Workflow Patterns does, walks through the setup, and runs a quick demo based on your current project
Use Workflow Patterns to systematic task implementation using TDD, phase checkpoints, and st...
Invokes Workflow Patterns with the right parameters and returns the result directly in the conversation
What can I do with Workflow Patterns in my product manager workflow?
Lists the top use cases for Workflow Patterns, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/workflow-patterns/ 目录(个人级,所有项目可用),或 .claude/skills/workflow-patterns/(项目级)。重启 AI 客户端后,用 /workflow-patterns 主动调用,或让 AI 根据上下文自动发现并使用。
Workflow Patterns 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Workflow Patterns 可免费安装使用。请查阅仓库了解许可证信息。
Systematic task implementation using TDD, phase checkpoints, and structured commits. Ensures quality through red-green-refactor cycles, 80% coverage gates, and verification protocols before proceeding.
Workflow Patterns 属于「Product Manager」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my product manager tasks using Workflow Patterns
Identifies repetitive steps in your workflow and sets up Workflow Patterns to handle them automatically