AgentSkillsCN

prd-generator

按照标准结构,生成全面的产品需求文档(PRD)。当用户要求撰写PRD、创建产品需求文档,或起草产品规格时使用此功能。

SKILL.md
--- frontmatter
name: prd-generator
description: Generate comprehensive Product Requirements Documents (PRD) following standard structure. Use when user asks to write PRD, create product requirements document, or draft product specifications.

PRD Generator

This Skill helps you create professional Product Requirements Documents (PRD) that follow industry best practices and standard structure.

Quick Start

To create a PRD, simply ask:

code
Help me write a PRD for [feature/product]

The skill will guide you through gathering requirements and generate a complete PRD document.

Instructions

Step 1: Gather Basic Information

Before generating the PRD, collect these essential details:

  1. Product/Feature Name: What are you building?
  2. Target Users: Who will use this?
  3. Problem Statement: What problem does this solve?
  4. Business Goals: What are the measurable objectives?
  5. Timeline: When does this need to launch?

Step 2: Understand the Context

Ask clarifying questions to understand:

  • Is this a new feature or existing product modification?
  • What are the current pain points?
  • Are there technical constraints or dependencies?
  • Who are the stakeholders (dev, design, QA, marketing)?
  • What's the competitive landscape?

Step 3: Choose the Right Template

Use basic-prd.md when:

  • Starting a new product
  • Creating major feature modules
  • Need complete documentation
  • Comprehensive requirements needed

Use feature-prd.md when:

  • Developing a single feature
  • Optimizing existing features
  • Quick iteration needed
  • Simplified documentation preferred

Step 4: Generate PRD Structure

Create a PRD with these core sections:

1. 文档信息 (Document Information)

  • Version number
  • Author
  • Last updated date
  • Status (Draft, Review, Approved)
  • 所属产品 (Product Name)

2. 需求背景 (Requirements Background)

  • 需求背景 (Background Summary)
  • 核心价值表格 (Core Value Table):
    • Must include a 2-column table with the following rows:
      • 服务用户 (Target Users)
      • 回答问题 (Key Questions)
      • 解决痛点 (Pain Points)
      • 预期收益 (Expected Benefits)
  • 业务目标 (Business Objectives)
  • 关注核心指标 (Key Metrics)

3. 用户 (Users)

  • 目标用户 (Target Users)
  • 用户故事 (User Stories)
  • 用户流程 (User Flows)

4. 预期增量 (Expected Increment)

  • 业务增量 (Business Increment)
  • 用户价值 (User Value)
  • 技术增量 (Technical Increment)

5. 功能需求 (Functional Requirements)

  • Must follow this format for each feature:

    【Px】Feature Name

    Feature Description: Brief overview of what this feature does.
    • Detailed Requirements
    • Data Requirements
    • Interaction Requirements
  • 核心功能 (P0 - Must have)
  • 重要功能 (P1 - Should have)
  • 增强功能 (P2 - Nice to have)

6. 数据需求 (Data Requirements)

  • 关键指标 (Key Metrics)
  • 事件追踪 (Event Tracking)
  • 数据看板 (Data Dashboard)

7. 交互需求 (Interaction Requirements)

  • 设计规范 (Design Specifications)
  • 页面设计 (Page Design)
  • 交互设计 (Interaction Design)
  • 响应式设计 (Responsive Design)

8. 非功能性需求 (Non-Functional Requirements)

  • 性能要求 (Performance)
  • 安全要求 (Security)
  • 可访问性 (Accessibility)
  • 兼容性 (Compatibility)

9. 技术规格 (Technical Specifications)

  • 系统架构 (System Architecture)
  • API要求 (API Requirements)
  • 数据库设计 (Database Design)
  • 第三方集成 (Third-party Integration)

10. 测试要求 (Testing Requirements)

  • 功能测试 (Functional Testing)
  • 性能测试 (Performance Testing)
  • 兼容性测试 (Compatibility Testing)
  • 安全测试 (Security Testing)
  • 验收标准 (Acceptance Criteria)

11. 发布计划 (Release Plan)

  • 发布策略 (Release Strategy)
  • 上线检查清单 (Launch Checklist)
  • 风险管理 (Risk Management)

12. 后续规划 (Future Planning)

  • 功能迭代 (Feature Iteration)
  • 优化方向 (Optimization Direction)

Step 5: Write the PRD

When writing the PRD document:

  1. Use clear, concise language - Avoid jargon
  2. Be specific - Use numbers and concrete examples
  3. Include visuals - Describe diagrams, flowcharts, wireframes
  4. Prioritize features - Mark as P0 (must-have), P1 (should-have), P2 (nice-to-have)
  5. Define acceptance criteria - Clear pass/fail conditions
  6. Consider edge cases - What happens when things go wrong?

Step 6: Review and Refine

After generating the PRD:

  1. Check completeness - All sections filled?
  2. Verify clarity - Would a developer understand this?
  3. Validate feasibility - Is this technically achievable?
  4. Confirm alignment - Does this match business goals?
  5. Get feedback - Share with stakeholders for review

Templates

basic-prd.md - Complete PRD Template

适用场景 (Use Cases):

  • 新产品立项 (New product launch)
  • 重大功能模块 (Major feature modules)
  • 需要完整文档的项目 (Projects needing complete documentation)

包含章节 (Sections):

  • 需求背景 (Requirements Background)
  • 用户 (Users)
  • 预期增量 (Expected Increment)
  • 功能需求 (Functional Requirements)
  • 数据需求 (Data Requirements)
  • 交互需求 (Interaction Requirements)
  • 非功能性需求 (Non-Functional Requirements)
  • 技术规格 (Technical Specifications)
  • 测试要求 (Testing Requirements)
  • 发布计划 (Release Plan)
  • 后续规划 (Future Planning)

feature-prd.md - Feature PRD Template

适用场景 (Use Cases):

  • 单个功能开发 (Single feature development)
  • 功能优化 (Feature optimization)
  • 快速迭代 (Quick iteration)

包含章节 (Sections):

  • 需求背景 (Requirements Background)
  • 用户 (Users)
  • 预期增量 (Expected Increment)
  • 功能概述 (Feature Overview)
  • 数据需求 (Data Requirements)
  • 交互需求 (Interaction Requirements)
  • 功能详细设计 (Detailed Feature Design)
  • 非功能性需求 (Non-Functional Requirements)
  • 测试要点 (Testing Points)
  • 上线计划 (Launch Plan)
  • 风险评估 (Risk Assessment)
  • 后续优化 (Future Optimization)

Best Practices

DO(应该做的):

✅ 从用户需求出发,而不是功能列表 ✅ 使用具体的数字和指标 ✅ 包含边界情况和异常处理 ✅ 定义清晰的验收标准 ✅ 对功能进行优先级排序(P0/P1/P2) ✅ 考虑技术可行性 ✅ 包含数据分析需求 ✅ 从一开始就考虑可访问性

DON'T(不应该做的):

❌ 写模糊的需求("改善用户体验") ❌ 忽略技术约束 ❌ 跳过边界情况 ❌ 忘记数据分析 ❌ MVP过度设计 ❌ 忽略性能影响 ❌ 跳过利益相关者评审

Common PRD Patterns

New Feature PRD

Focus on:

  • User value proposition
  • Integration with existing features
  • Migration strategy
  • Rollback plan

Product Improvement PRD

Focus on:

  • Current pain points
  • Performance improvements
  • User feedback analysis
  • A/B testing plan

MVP PRD

Focus on:

  • Core value proposition
  • Minimum viable features
  • Quick wins
  • Future roadmap

Examples

See examples/user-authentication-prd.md for a complete PRD example demonstrating:

  • User authentication system
  • Complete documentation structure
  • API design examples
  • Database schema
  • Testing requirements

Requirements

No external dependencies required. This skill uses standard markdown formatting.

Tips for Better PRDs

  1. Collaborate early - Involve dev and design teams from the start
  2. Iterate frequently - PRDs are living documents
  3. Use visuals - Flowcharts, wireframes, and diagrams clarify complex flows
  4. Be realistic - Don't promise what can't be delivered
  5. Think about data - What metrics will you need?
  6. Plan for failure - What happens when things break?
  7. Consider scale - Will this work with 10x users?
  8. Document assumptions - What are you taking for granted?

When to Use This Skill

Use this skill when:

  • User asks to "write a PRD"
  • User mentions "产品需求文档"
  • User needs to "specify features"
  • User wants to "document product specs"
  • User asks for "functional requirements"
  • User needs "acceptance criteria"
  • User mentions "产品规格"

Output Format

When generating a PRD:

  1. Create a new markdown file in the prd/ directory
  2. Use the appropriate template (basic-prd or feature-prd)
  3. Fill in all sections with specific, actionable details
  4. Include version control information
  5. Save with descriptive filename (e.g., user-authentication-prd-v1.0.md)

The resulting PRD will be comprehensive, clear, and ready for stakeholder review.