关于 prd
这项技能根据功能描述生成面向实现的结构化 PRD,适用于产品团队及开发人员。它先提出带选项的关键澄清问题,再整理需求,并将文档保存到指定路径;不负责实现功能。
主要功能
- 01提出带字母选项的澄清问题
- 02生成包含用户故事和验收标准的 PRD
- 03列出功能需求、非目标与成功指标
- 04将 Markdown 文档保存至 tasks/
适用场景
- 01将模糊的功能构想整理为 PRD
- 02为开发任务编写可验证的验收标准
- 03明确功能范围与非目标
- 04为实现工作准备结构化需求文档
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ jellydn/ my-ai-tools --skill prd安装后在 Claude Code 中输入/prd确认已加载。
详细介绍
PRD 生成器
创建详细的产品需求文档,确保内容清晰、可执行且适合实施。
工作内容
- 接收用户提供的功能描述
- 提出 3-5 个必要的澄清问题(提供字母选项)
- 根据回答生成结构化的 PRD
- 保存到
tasks/prd-[feature-name].md
**重要:**不要开始实施,只创建 PRD。
第 1 步:澄清问题
只针对初始提示中含糊不清的部分提出关键问题。重点关注:
- **问题/目标:**这要解决什么问题?
- **核心功能:**关键操作有哪些?
- **范围/边界:**哪些内容不应该包含?
- **成功标准:**如何判断任务已完成?
问题格式如下:
1. What is the primary goal of this feature?
A. Improve user onboarding experience
B. Increase user retention
C. Reduce support burden
D. Other: [please specify]
2. Who is the target user?
A. New users only
B. Existing users only
C. All users
D. Admin users only
3. What is the scope?
A. Minimal viable version
B. Full-featured implementation
C. Just the backend/API
D. Just the UI
用户可以用“1A、2C、3B”这样的格式回复,以便快速迭代。
第 2 步:PRD 结构
按照以下章节生成 PRD:
1. 简介/概述
简要描述该功能及其要解决的问题。
2. 目标
具体、可衡量的目标(项目符号列表)。
3. 用户故事
每个故事都需要包含:
- **标题:**简短且描述性明确的名称
- 描述:“作为一名[用户],我希望[功能],以便[收益]”
- **验收标准:**可验证的检查清单,用于定义何为“完成”
每个故事的规模都应适合在一次专注的开发会话中完成。
格式:
### US-001: [Title]
**Description:** As a [user], I want [feature] so that [benefit].
**Acceptance Criteria:**
- [ ] Specific verifiable criterion
- [ ] Another criterion
- [ ] Typecheck/lint passes
- [ ] **[UI stories only]** Verify in browser using dev-browser skill
重要:
- 验收标准必须可验证,不能含糊。“运行正常”是不好的标准。“删除前按钮会显示确认对话框”是好的标准。
- **对于任何涉及 UI 变更的故事:**验收标准中始终包含“使用 dev-browser skill 在浏览器中验证”。这可确保对前端工作进行视觉验证。
4. 功能需求
列出具体功能,并为其编号:
- “FR-1:系统必须允许用户……”
- “FR-2:用户点击 X 时,系统必须……”
要求明确且无歧义。
5. 非目标(不在范围内)
说明此功能不包含哪些内容。这对管理范围至关重要。
6. 设计注意事项(可选)
- UI/UX 要求
- 可用时提供模型图链接
- 可复用的相关现有组件
7. 技术注意事项(可选)
- 已知限制或依赖项
- 与现有系统的集成点
- 性能要求
8. 成功指标
如何衡量成功?
- “将完成 X 所需的时间缩短 50%”
- “将转化率提高 10%”
9. 待解决问题
尚未解决的问题或需要进一步澄清的方面。
面向初级开发者编写
PRD 的读者可能是初级开发者或 AI Agent。因此:
- 说明要明确、无歧义
- 优先使用通俗语言;解释领域术语
- 提供足够的细节,帮助理解目的和核心逻辑
- 为需求编号,方便引用
- 在有帮助时提供具体示例
输出
- **格式:**Markdown(
.md) - 位置:
tasks/ - 文件名:
prd-[feature-name].md(kebab-case)
PRD 示例
# PRD: Task Priority System
## Introduction
Add priority levels to tasks so users can focus on what matters most. Tasks can be marked as high, medium, or low priority, with visual indicators and filtering to help users manage their workload effectively.
## Goals
- Allow assigning priority (high/medium/low) to any task
- Provide clear visual differentiation between priority levels
- Enable filtering and sorting by priority
- Default new tasks to medium priority
## User Stories
### US-001: Add priority field to database
**Description:** As a developer, I need to store task priority so it persists across sessions.
**Acceptance Criteria:**
- [ ] Add priority column to tasks table: 'high' | 'medium' | 'low' (default 'medium')
- [ ] Generate and run migration successfully
- [ ] Typecheck passes
### US-002: Display priority indicator on task cards
**Description:** As a user, I want to see task priority at a glance so I know what needs attention first.
**Acceptance Criteria:**
- [ ] Each task card shows colored priority badge (red=high, yellow=medium, gray=low)
- [ ] Priority visible without hovering or clicking
- [ ] Typecheck passes
- [ ] Verify in browser using dev-browser skill
### US-003: Add priority selector to task edit
**Description:** As a user, I want to change a task's priority when editing it.
**Acceptance Criteria:**
- [ ] Priority dropdown in task edit modal
- [ ] Shows current priority as selected
- [ ] Saves immediately on selection change
- [ ] Typecheck passes
- [ ] Verify in browser using dev-browser skill
### US-004: Filter tasks by priority
**Description:** As a user, I want to filter the task list to see only high-priority items when I'm focused.
**Acceptance Criteria:**
- [ ] Filter dropdown with options: All | High | Medium | Low
- [ ] Filter persists in URL params
- [ ] Empty state message when no tasks match filter
- [ ] Typecheck passes
- [ ] Verify in browser using dev-browser skill
## Functional Requirements
- FR-1: Add `priority` field to tasks table ('high' | 'medium' | 'low', default 'medium')
- FR-2: Display colored priority badge on each task card
- FR-3: Include priority selector in task edit modal
- FR-4: Add priority filter dropdown to task list header
- FR-5: Sort by priority within each status column (high to medium to low)
## Non-Goals
- No priority-based notifications or reminders
- No automatic priority assignment based on due date
- No priority inheritance for subtasks
## Technical Considerations
- Reuse existing badge component with color variants
- Filter state managed via URL search params
- Priority stored in database, not computed
## Success Metrics
- Users can change priority in under 2 clicks
- High-priority tasks immediately visible at top of lists
- No regression in task list performance
## Open Questions
- Should priority affect task ordering within a column?
- Should we add keyboard shortcuts for priority changes?
检查清单
保存 PRD 前:
- 已提出带字母选项的澄清问题
- 已纳入用户的回答
- 用户故事规模合适且内容具体
- 功能需求已编号且无歧义
- 非目标章节明确界定了范围
- 已保存到
tasks/prd-[feature-name].md
评论
支持 Markdown