/agent-skills:planning-and-task-breakdownfrom agent-skills
将工作拆解为有序、可验证的小任务,并为每个任务写明验收标准。适用于已有 spec 或清晰需求、任务过大难以下手、需要估算范围或存在并行工作机会时。
Ships in agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
把工作拆解成小而可验证的任务,并为每个任务写明验收标准。好的任务拆解,是可靠完成工作的 agent 和产出纠缠混乱结果的 agent 之间的区别。每个任务都应该足够小,能在一次专注会话中实现、测试和验证。
何时不要使用: 范围显而易见的单文件变更,或 spec 已经包含定义良好的任务。
写任何代码之前,以只读模式运行:
规划期间不要写代码。 输出是一份保存到 tasks/plan.md 的计划文档,以及记录在 task list target 中的任务列表(见「输出文件」一节;默认 tasks/todo.md),而不是实现。
映射什么依赖什么:
Database schema
│
├── API models/types
│ │
│ ├── API endpoints
│ │ │
│ │ └── Frontend API client
│ │ │
│ │ └── UI components
│ │
│ └── Validation logic
│
└── Seed data / migrations
实现顺序沿依赖图自底向上:先构建基础。
不要先构建全部数据库、再构建全部 API、再构建全部 UI。一次构建一条完整功能路径:
坏例(水平切片):
Task 1: Build entire database schema
Task 2: Build all API endpoints
Task 3: Build all UI components
Task 4: Connect everything
好例(垂直切片):
Task 1: User can create an account (schema + API + UI for registration)
Task 2: User can log in (auth schema + API + UI for login)
Task 3: User can create a task (task schema + API + UI for creation)
Task 4: User can view task list (query + API + UI for list view)
每个垂直切片都交付可工作的、可测试的功能。
每个任务都遵循这个结构,无论它落在 markdown 任务列表里,还是作为外部 tracker 中的一个条目(见 Output Files):
## Task [N]: [Short descriptive title]
**Description:** One paragraph explaining what this task accomplishes.
**Acceptance criteria:**
- [ ] [Specific, testable condition]
- [ ] [Specific, testable condition]
**Verification:**
- [ ] Tests pass: [the repository's focused-test command]
- [ ] Build succeeds: [the repository's build command]
- [ ] Manual check: [description of what to verify]
**Dependencies:** [Task numbers this depends on, or "None"]
**Files likely touched:**
- `src/path/to/file.ts`
- `tests/path/to/test.ts`
**Estimated scope:** [Small: 1-2 files | Medium: 3-5 files | Large: 5+ files]
安排任务时确保:
在 task list target 中添加明确检查点:
## Checkpoint: After Tasks 1-3
- [ ] All tests pass
- [ ] Application builds without errors
- [ ] Core user flow works end-to-end
- [ ] Review with human before proceeding
| 大小 | 文件数 | 范围 | 示例 |
|---|---|---|---|
| XS | 1 | 单个函数或配置变更 | 添加一条验证规则 |
| S | 1-2 | 一个组件或 endpoint | 添加一个新 API endpoint |
| M | 3-5 | 一个功能切片 | 用户注册流程 |
| L | 5-8 | 多组件功能 | 带过滤和分页的搜索 |
| XL | 8+ | 太大,需要进一步拆解 | — |
如果任务是 L 或更大,就应该拆成更小任务。agent 在 S 和 M 任务上表现最好。
何时进一步拆分任务:
tasks/plan.md。这始终是一个 markdown 文件——设计决策、风险和未决问题无法干净地映射到单个 tracker issue 上。如果 tasks/ 目录不存在则创建。
绝不覆盖未完成的计划。 在写 tasks/plan.md 或 tasks/todo.md 之前,检查它们是否已经存在且仍包含未勾选的任务:
同样的规则适用于外部 task list target:绝不为了给新任务腾位置,而批量关闭或删除其他计划的未关闭 tracker items。
Task list target 是记录任务和检查点的位置。它的定义只出现一次,就在这里;这个 skill 中的其他所有引用都以此为准。
tasks/todo.md 的 checklist 风格 markdown 文件。 这是 /build 命令和其他下游工具期望的约定。除非项目另有说明,否则使用它。CLAUDE.md、AGENTS.md 等)或用户指定了 issue tracker(例如 GitHub Issues、Jira、Linear、bd/beads),就为每个任务创建一个 tracker item,而不是写 tasks/todo.md。把步骤 4 的结构映射到 tracker 的字段:验收标准和验证步骤放进 item 正文,依赖通过 tracker 的链接机制(bd dep add、“blocked by” 等)。步骤 5 的检查点也记录为 tracker items;如果 tracker 没有自然的对应物,就记录为计划文档中的 checklist。使用外部 tracker 时,在 tasks/plan.md 中注明(例如 “Tasks tracked in Linear project FOO”),让下游步骤和未来的会话知道去哪里查找;并把计划文档的 Task List 章节保留为 tracker item ID 或链接的有序索引,而不是重复的 checklist。
# Implementation Plan: [Feature/Project Name]
## Overview
[One paragraph summary of what we're building]
## Architecture Decisions
- [Key decision 1 and rationale]
- [Key decision 2 and rationale]
## Task List
### Phase 1: Foundation
- [ ] Task 1: ...
- [ ] Task 2: ...
### Checkpoint: Foundation
- [ ] Tests pass, builds clean
### Phase 2: Core Features
- [ ] Task 3: ...
- [ ] Task 4: ...
### Checkpoint: Core Features
- [ ] End-to-end flow works
### Phase 3: Polish
- [ ] Task 5: ...
- [ ] Task 6: ...
### Checkpoint: Complete
- [ ] All acceptance criteria met
- [ ] Ready for review
## Risks and Mitigations
| Risk | Impact | Mitigation |
|------|--------|------------|
| [Risk] | [High/Med/Low] | [Strategy] |
## Open Questions
- [Question needing human input]
当任务存放在外部 tracker 中时,把上面的 Task List 章节保留为 tracker item ID 或链接的有序索引,而不是重复的 checklist。
当多个 agents 或会话可用时:
| 合理化借口 | 现实 |
|---|---|
| “我边做边想” | 这会让你得到纠缠混乱和返工。10 分钟规划能节省数小时。 |
| “任务很明显” | 无论如何都写下来。显式任务会暴露隐藏依赖和被遗忘的边界情况。 |
| “规划是额外开销” | 规划就是任务。没有计划的实现只是打字。 |
| “我可以全都记在脑子里” | 上下文窗口是有限的。书面计划能跨会话边界和压缩继续存在。 |
“旧的 tasks/plan.md 过时了,我直接替换掉” | 未勾选的任务可能正在另一个会话中构建。覆盖它们会摧毁只存在于那里的状态。停下来询问。 |
tasks/plan.md 或 tasks/todo.mdtasks/todo.md(或把任务散落在两处)开始实现前,确认:
tasks/todo.md)验收标准是每个任务一份,回答的是“我们构建的东西对吗?”。它们叠加在项目级 Definition of Done(完成定义)之上——那是每个任务在算作完成之前都要跨过的常设标准。参见 ../../references/definition-of-done.md。
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vinvcn/addyosmani-agent-skills-zh --plugin agent-skills25 skills in this plugin
/api-and-interface-design指导稳定的 API 和接口设计。设计 API、模块边界或任何公共接口时使用。创建 REST 或 GraphQL endpoint、定义模块之间的类型契约,或建立前后端边界时使用。/browser-testing-with-devtools在真实浏览器中测试。构建或调试任何在浏览器中运行的内容时使用。当你需要通过 Chrome DevTools MCP 检查 DOM、捕获 console 错误、分析网络请求、分析性能,或用真实运行时数据验证视觉输出时使用。需要已配置 chrome-devtools MCP server。/ci-cd-and-automation自动化 CI/CD pipeline 设置。用于设置或修改构建和部署 pipeline 时;用于需要自动化质量门禁、在 CI 中配置 test runners,或建立部署策略时。/code-review-and-quality执行多维度代码审查。用于合并任何变更之前;用于审查自己、其他 agent 或人类编写的代码;用于在代码进入主分支前从多个维度评估代码质量。用于被要求 review 一个 diff 或 pull request 时,即使 diff 被内联粘贴。/code-simplification为清晰度简化代码。用于在不改变行为的前提下重构代码以提升清晰度;用于代码能运行但比应有状态更难阅读、维护或扩展时;用于审查已累积不必要复杂度的代码时。/constraint-driven-development把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。Other plugins' skills for the same job