重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/connorads/dotfiles --skill prd创建适合由首席工程师、设计师和产品负责人进行 RFC 评审的产品需求文档。
PRD 描述的是要构建什么以及为什么,而不是如何构建或按什么顺序构建。
prd-<功能名称>.md 文件围绕以下领域提出问题。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
问题要简洁。最多 5-7 个。
保存到 prd-<功能名称>.md(项目根目录):
# PRD: <功能名称>
**日期:** <YYYY-MM-DD>
---
## 问题陈述
### 我们要解决什么问题?
对问题的清晰描述。包括用户影响和业务影响。
### 为什么是现在?
是什么触发了这项工作?不作为的代价?
### 谁受到影响?
- **主要用户:** 描述
- **次要用户:** 描述
---
## 提议的解决方案
### 概述
一段话描述该功能完成后做什么。
### 用户体验(如适用)
<!-- 面向用户的功能请包含此项 -->
用户将如何与此功能交互?包括主要场景的用户流程。
#### 用户流程: <场景名称>
1. 用户执行 X
2. 系统响应 Y
3. 用户看到 Z
### 设计考虑(如适用)
<!-- 具有 UI/UX 组件的功能请包含此项 -->
- 视觉/交互要求
- 无障碍访问要求(WCAG 等级)
- 平台特定考虑
---
## 最终状态
当此 PRD 完成时,以下情况将为真:
- [ ] 能力 1 存在并正常工作
- [ ] 能力 2 存在并正常工作
- [ ] 所有验收标准通过
- [ ] 测试覆盖新功能
- [ ] 文档已更新
- [ ] 可观测性/监控已就位
---
## 成功指标
### 定量指标
| 指标 | 当前值 | 目标值 | 测量方法 |
|--------|---------|--------|-------------------|
| 指标 1 | X | Y | 如何测量 |
| 指标 2 | X | Y | 如何测量 |
### 定性指标
- 用户反馈标准
- 预期的团队/流程改进
---
## 验收标准
### 功能: <名称>
- [ ] 标准 1
- [ ] 标准 2
- [ ] 标准 3
### 功能: <名称>
- [ ] 标准 1
- [ ] 标准 2
---
## 技术背景
### 现有模式
- 模式 1: `src/path/to/example.ts` - 相关原因
- 模式 2: `src/path/to/example.ts` - 相关原因
### 关键文件
- `src/relevant/file.ts` - 相关性描述
- `src/another/file.ts` - 相关性描述
### 系统依赖
- 外部服务/API
- 包要求
- 基础设施要求
### 数据模型变更
<!-- 如适用 -->
- 新实体/表
- 所需的模式迁移
- 数据回填考虑
---
## 风险与缓解措施
| 风险 | 可能性 | 影响 | 缓解措施 |
|------|------------|--------|------------|
| 风险 1 | 高/中/低 | 高/中/低 | 如何缓解 |
| 风险 2 | 高/中/低 | 高/中/低 | 如何缓解 |
---
## 考虑的替代方案
### 替代方案 1: <名称>
- **描述:** 简要描述
- **优点:** 它的好处
- **缺点:** 我们未选择它的原因
- **决定:** 被拒绝的原因
### 替代方案 2: <名称>
- **描述:** 简要描述
- **优点:** 它的好处
- **缺点:** 我们未选择它的原因
- **决定:** 被拒绝的原因
---
## 非目标(v1)
明确不在此 PRD 范围内:
- 我们不构建的东西 - 推迟的原因
- 未来的增强功能 - 推迟的原因
- 相关的独立功能 - 独立的原因
---
## 接口规范
### CLI(如适用)
command-name [args] [options]
选项: --flag 描述
### API(如适用)
POST /api/endpoint 请求: { field: type } 响应: { field: type } 错误: 4xx/5xx 场景
### UI(如适用)
组件行为、状态和错误处理。
---
## 文档要求
- [ ] 面向用户的文档更新
- [ ] API 文档更新
- [ ] 内部操作手册/运行手册更新
- [ ] 架构决策记录(ADR)
---
## 待解决问题
| 问题 | 负责人 | 截止日期 | 状态 |
|----------|-------|----------|--------|
| 问题 1 | 姓名 | 日期 | 待解决/已解决 |
| 问题 2 | 姓名 | 日期 | 待解决/已解决 |
---
## 附录
### 术语表
- **术语:** 定义
### 参考资料
- 相关 PRD、ADR、设计的链接
- 外部文档/规范
## 实施阶段
### 阶段 1: 数据库
1. 创建用户表
2. 添加索引
### 阶段 2: API
1. 构建注册端点
2. 构建登录端点
### 阶段 3: 测试
1. 编写单元测试
2. 编写集成测试
## 概述
我们需要用户身份验证。
## 验收标准
- [ ] 用户可以注册
- [ ] 用户可以登录
缺少:为什么?什么问题?成功指标?风险?替代方案?
## 问题陈述
### 我们要解决什么问题?
用户目前无法跨会话持久化数据。47% 的用户在被要求重新输入信息时流失。
这导致每月约 5 万美元的转化损失。
### 为什么是现在?
第四季度留存计划。竞争对手 X 上个月推出了身份验证功能。
### 谁受到影响?
- **主要用户:** 希望保持会话持久性的最终用户
- **次要用户:** 处理"数据丢失"工单的支持团队(约每周 200 个)
---
## 最终状态
完成后:
- [ ] 用户可以使用邮箱/密码注册
- [ ] 用户可以登录并收到 JWT
- [ ] 身份验证端点测试覆盖率 >80%
- [ ] 监控仪表板跟踪身份验证成功/失败率
---
## 验收标准
### 注册
- [ ] POST /api/auth/register 创建用户
- [ ] 密码被哈希处理(bcrypt,成本因子 12)
- [ ] 重复邮箱返回 409
- [ ] 无效输入返回 400 并附详情
### 登录
- [ ] POST /api/auth/login 返回 JWT
- [ ] 无效凭证返回 401(不暴露用户枚举)
- [ ] 令牌 24 小时后过期,刷新令牌 7 天后过期
---
## 风险与缓解措施
| 风险 | 可能性 | 影响 | 缓解措施 |
|------|------------|--------|------------|
| 凭证填充 | 高 | 高 | 3 次失败后速率限制 + CAPTCHA |
| 令牌盗窃 | 中 | 高 | 短有效期 + 安全 Cookie 标志 |
---
## 考虑的替代方案
### 替代方案 1: 仅 OAuth(Google/GitHub)
- **优点:** 无密码存储责任
- **缺点:** 部分用户没有/不想要社交账户
- **决定:** 拒绝。在 v2 中添加 OAuth,但需要邮箱/密码作为基础。
---
## PRD 创建后
### RFC 评审清单
在将 PRD 标记为准备评审并分享给用户之前,请验证:
- [ ] 技术风险已识别并缓解
- [ ] 用户流程已记录(如适用)
- [ ] 边缘情况和错误状态已覆盖(如适用)
- [ ] 无障碍访问要求已明确(如适用)
- [ ] 设计考虑已捕获(如适用)
- [ ] 问题陈述清晰且有说服力
- [ ] 范围边界明确
告知用户:
PRD 已保存至 prd-<名称>.md
每周安装次数
49
代码仓库
GitHub 星标数
7
首次出现
2026 年 1 月 24 日
安全审计
安装于
gemini-cli47
opencode47
claude-code46
codex46
cursor46
antigravity45
Create Product Requirements Documents suitable for RFC review by Principal Engineers, Designers, and Product Owners.
The PRD describes WHAT to build and WHY, not HOW or in WHAT ORDER.
prd-<feature-name>.md in project rootAsk questions across these domains.
Keep questions concise. 5-7 at most.
Save to prd-<feature-name>.md (project root):
# PRD: <Feature Name>
**Date:** <YYYY-MM-DD>
---
## Problem Statement
### What problem are we solving?
Clear description of the problem. Include user impact and business impact.
### Why now?
What triggered this work? Cost of inaction?
### Who is affected?
- **Primary users:** Description
- **Secondary users:** Description
---
## Proposed Solution
### Overview
One paragraph describing what this feature does when complete.
### User Experience (if applicable)
<!-- Include for user-facing features -->
How will users interact with this feature? Include user flows for primary scenarios.
#### User Flow: <Scenario Name>
1. User does X
2. System responds with Y
3. User sees Z
### Design Considerations (if applicable)
<!-- Include for features with UI/UX components -->
- Visual/interaction requirements
- Accessibility requirements (WCAG level)
- Platform-specific considerations
---
## End State
When this PRD is complete, the following will be true:
- [ ] Capability 1 exists and works
- [ ] Capability 2 exists and works
- [ ] All acceptance criteria pass
- [ ] Tests cover the new functionality
- [ ] Documentation is updated
- [ ] Observability/monitoring is in place
---
## Success Metrics
### Quantitative
| Metric | Current | Target | Measurement Method |
|--------|---------|--------|-------------------|
| Metric 1 | X | Y | How measured |
| Metric 2 | X | Y | How measured |
### Qualitative
- User feedback criteria
- Team/process improvements expected
---
## Acceptance Criteria
### Feature: <Name>
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
### Feature: <Name>
- [ ] Criterion 1
- [ ] Criterion 2
---
## Technical Context
### Existing Patterns
- Pattern 1: `src/path/to/example.ts` - Why relevant
- Pattern 2: `src/path/to/example.ts` - Why relevant
### Key Files
- `src/relevant/file.ts` - Description of relevance
- `src/another/file.ts` - Description of relevance
### System Dependencies
- External services/APIs
- Package requirements
- Infrastructure requirements
### Data Model Changes
<!-- If applicable -->
- New entities/tables
- Schema migrations required
- Data backfill considerations
---
## Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| Risk 1 | High/Med/Low | High/Med/Low | How to mitigate |
| Risk 2 | High/Med/Low | High/Med/Low | How to mitigate |
---
## Alternatives Considered
### Alternative 1: <Name>
- **Description:** Brief description
- **Pros:** What's good about it
- **Cons:** Why we didn't choose it
- **Decision:** Why rejected
### Alternative 2: <Name>
- **Description:** Brief description
- **Pros:** What's good about it
- **Cons:** Why we didn't choose it
- **Decision:** Why rejected
---
## Non-Goals (v1)
Explicitly out of scope for this PRD:
- Thing we're not building - why deferred
- Future enhancement - why deferred
- Related feature that's separate - why separate
---
## Interface Specifications
### CLI (if applicable)
command-name [args] [options]
Options: --flag Description
### API (if applicable)
POST /api/endpoint Request: { field: type } Response: { field: type } Errors: 4xx/5xx scenarios
### UI (if applicable)
Component behavior, states, and error handling.
---
## Documentation Requirements
- [ ] User-facing documentation updates
- [ ] API documentation updates
- [ ] Internal runbook/playbook updates
- [ ] Architecture decision records (ADRs)
---
## Open Questions
| Question | Owner | Due Date | Status |
|----------|-------|----------|--------|
| Question 1 | Name | Date | Open/Resolved |
| Question 2 | Name | Date | Open/Resolved |
---
## Appendix
### Glossary
- **Term:** Definition
### References
- Link to related PRDs, ADRs, designs
- External documentation/specs
## Implementation Phases
### Phase 1: Database
1. Create users table
2. Add indexes
### Phase 2: API
1. Build registration endpoint
2. Build login endpoint
### Phase 3: Tests
1. Write unit tests
2. Write integration tests
## Overview
We need user authentication.
## Acceptance Criteria
- [ ] Users can register
- [ ] Users can log in
Missing: Why? What problem? Success metrics? Risks? Alternatives?
## Problem Statement
### What problem are we solving?
Users currently can't persist data across sessions. 47% of users drop off
when asked to re-enter information. This costs ~$50k/month in lost conversions.
### Why now?
Q4 retention initiative. Competitor X launched auth last month.
### Who is affected?
- **Primary users:** End users who want persistent sessions
- **Secondary users:** Support team handling "lost data" tickets (~200/week)
---
## End State
When complete:
- [ ] Users can register with email/password
- [ ] Users can log in and receive JWT
- [ ] Auth endpoints have >80% test coverage
- [ ] Monitoring dashboards track auth success/failure rates
---
## Acceptance Criteria
### Registration
- [ ] POST /api/auth/register creates user
- [ ] Password is hashed (bcrypt, cost factor 12)
- [ ] Duplicate email returns 409
- [ ] Invalid input returns 400 with details
### Login
- [ ] POST /api/auth/login returns JWT
- [ ] Invalid credentials return 401 (no user enumeration)
- [ ] Token expires in 24h, refresh token in 7d
---
## Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| Credential stuffing | High | High | Rate limiting + CAPTCHA after 3 failures |
| Token theft | Med | High | Short expiry + secure cookie flags |
---
## Alternatives Considered
### Alternative 1: OAuth-only (Google/GitHub)
- **Pros:** No password storage liability
- **Cons:** Some users don't have/want social accounts
- **Decision:** Rejected. Add OAuth in v2, but need email/password baseline.
---
## After PRD Creation
### RFC Review Checklist
Before marking PRD ready for review and sharing with the user, verify:
- [ ] Technical risks identified and mitigated
- [ ] User flows documented (if applicable)
- [ ] Edge cases and error states covered (if applicable)
- [ ] Accessibility requirements specified (if applicable)
- [ ] Design considerations captured (if applicable)
- [ ] Problem statement is clear and compelling
- [ ] Scope boundaries explicit
Tell the user:
PRD saved to prd-<name>.md
Weekly Installs
49
Repository
GitHub Stars
7
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli47
opencode47
claude-code46
codex46
cursor46
antigravity45
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
48,700 周安装