agentleFS
sacrtapsacrtap/Opc_Kit/create-prd/SKILL.md

create-prd

Skill4 starsChanged 6 months agoMITView on GitHub

Create, update, or validate Product Requirements Documents (PRDs). Triggers: PRD creation, writing requirements, product specs, feature documentation, updating existing PRDs, reviewing PRD completeness, requirements validation, 创建PRD, 产品需求文档. Features: 13-chapter template, bidirectional traceability (US↔FR), mermaid flowcharts with exception paths, strict validation, coaching/fast modes, auto language detection, progress tracking, cross-platform compatible.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use caveman, grill-me and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    caveman

    Ultra-compressed response style that reduces output token count while preserving technical accuracy, with intensity levels and auto-clarity safety rules

    Also in 3 projects that use this

  • AWSSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 3 projects that use this

  • VercelSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

44 rules. 0 are common, 16 are distinctive, and 28 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 28

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write the complete PRD to docs/spec/{filename}.md where {filename} is auto-generated from the user's request (see naming rules below).

    line 21
  2. Very specific:

    SINGLE-WRITE MANDATE: Write ALL content (Metadata + all 13 chapters + Review Record) in ONE operation.

    line 23
  3. Very specific:

    SKELETON-FIRST: Every mode writes a complete skeleton with ACTUAL content (IDs, flowcharts, tables, - [ ] criteria).

    line 25
  4. Very specific:

    Allowed before first write: Only cat existing PRD files (for update/validate modes that need a baseline).

    line 29
  5. Very specific:

    Always write the PRD file to docs/spec/ directory (relative to project root).

    line 34
  6. Very specific:

    Always lowercase, kebab-case, .md suffix

    line 60
  7. Distinctive:

    Keep it short: 3-6 words, under 60 characters

    line 61
  8. Distinctive:

    No dates in the filename (version is in the Metadata table)

    line 62
  9. Distinctive:

    No version numbers in the filename (version is in the Metadata table)

    line 63
  10. Very specific:

    Write to docs/spec/{filename}.md using cat > or Write tool

    line 64
  11. Distinctive:

    If you're not sure, pick the most descriptive name and go with it — it's easy for the user to rename later

    line 65
  12. Very specific:

    Write the complete PRD to docs/spec/{filename}.md.

    line 69
  13. Distinctive:

    <30s MAX: Write immediately. Do NOT analyze deeply.

    line 84
  14. Very specific:

    Ask ONE consolidated question (max 3 ?

    line 87
  15. Distinctive:

    Must include "coaching" or "guide" keyword

    line 88
  16. Distinctive:

    Must include version "v1.0.0"

    line 89
  17. Distinctive:

    Must include a pre-filled Metadata table (even with inferred values — show the user what you plan to use)

    line 90
  18. Distinctive:

    Must include the proposed filename

    line 91
  19. Very specific:

    Do NOT generate full PRD chapters (no ## 1.

    line 92
  20. Very specific:

    Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x you list in Chapter 6 Feature List MUST have a corresponding ### F-x.x section in Chapter 7 …

    line 97
  21. Distinctive:

    Conciseness: ALL 13 chapters (Ch1-Ch13) MUST be present and follow the standard template.

    line 103
  22. Very specific:

    If eval provides a file path, cat it to get baseline PRD before writing.

    line 106
  23. Very specific:

    Must include: ## Changelog table (| Date | Version | Author | Changes |), "Key Update Notes" section (2-3 sentences max), change impact …

    line 109
  24. Very specific:

    Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x in Chapter 6 (existing + new) MUST have a corresponding ### F-x.x in Chapter 7.

    line 111
  25. Distinctive:

    Baseline cleanup pass: Before writing, scan the baseline and carry fixes into the updated PRD: (a) fuzzy words (friendly / normally / …

    line 113
  26. Very specific:

    Conciseness: ALL 13 chapters (Ch1-Ch13) MUST be present.

    line 116
  27. Very specific:

    No post-write validation: Do NOT run validate-prd.js, do NOT re-read the file, do NOT run wc/grep on it.

    line 117
  28. Distinctive:

    <60s total: Read baseline, write report immediately.

    line 121
  29. Distinctive:

    Write "Resuming from Chapter 4" as opening line

    line 130
  30. Very specific:

    Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x in Ch6 must have a ### F-x.x in Ch7.

    line 132
  31. Very specific:

    Must include: flowchart with |Failure|+|Timeout|, Review Record

    line 134
  32. Very specific:

    SINGLE WRITE: ALL content in ONE Bash heredoc.

    line 138
  33. Very specific:

    Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x in Chapter 6 MUST have a corresponding ### F-x.x in Chapter 7.

    line 141
  34. Distinctive:

    If platform is mentioned, reflect it in: Problem Description (context), Target Users (device type), Feature List (platform column), Feature …

    line 192
  35. Very specific:

    Use flowchart TD (not graph TD)

    line 196
  36. Very specific:

    No ASCII double quotes " in mermaid — use single quotes '

    line 197
  37. Very specific:

    No circle nodes ((text)) — use (text) for API/service calls

    line 198
  38. Very specific:

    No HTML tags <br/> — split long text into separate nodes

    line 199
  39. Distinctive:

    Before saving final PRD:

    line 217
  40. Very specific:

    Write to docs/spec/{filename}.md: Use a single Bash heredoc or Write tool call.

    line 262
  41. Very specific:

    Single write: ALL content in ONE write operation.

    line 263
  42. Very specific:

    No verification: After writing, do NOT read back the file.

    line 264
  43. Very specific:

    No reference reading: Do NOT read references/* files.

    line 272
  44. Distinctive:

    Validate mode: If no PRD file found after 1 search attempt, immediately write a validation report with what you have.

    line 273

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create PRD

FIRST ACTION — Write the PRD file immediately

Write the complete PRD to docs/spec/{filename}.md where {filename} is auto-generated from the user's request (see naming rules below). Do NOT ask the user where to save or what to name it — pick the best name and write.

SINGLE-WRITE MANDATE: Write ALL content (Metadata + all 13 chapters + Review Record) in ONE operation. Use a single Bash heredoc or Write tool call. NEVER use sequential Edit calls or multiple cat >> appends.

SKELETON-FIRST: Every mode writes a complete skeleton with ACTUAL content (IDs, flowcharts, tables, - [ ] criteria). No ... placeholders. The output must pass all verification checks immediately.

Speed targets: Coaching <30s. Fast/Update/Batch/Recovery <120s. Validate <60s. Write and stop.

Allowed before first write: Only cat existing PRD files (for update/validate modes that need a baseline). No other bash, no reading references/* or trajectory/logs.

Output Path & File Naming

Default Output Path

Always write the PRD file to docs/spec/ directory (relative to project root). If the directory doesn't exist, create it.

Why: Standardized location makes PRDs discoverable by the whole team. Consistent path means tooling (linters, review bots, search) can find them without configuration.

File Naming Rules

Generate the filename automatically — do NOT ask the user for a filename unless they explicitly want to customize it.

Priority order for deriving the name:

  1. User-specified filename — if the user explicitly gives a filename or path, use it directly.
  2. Feature/product name — extract the core feature/product name from the user's request and convert to kebab-case.
  3. Keyword extraction — pull 2-4 key nouns from the request, join with hyphens.

Format: {kebab-name}-prd.md

Examples:

User inputGenerated filename
"Create PRD for floor plan favorites feature"floor-plan-favorites-prd.md
"为微信小程序户型图浏览功能写PRD"mini-program-floor-plan-browse-prd.md
"Update auth PRD, add SSO"auth-sso-prd.md (or use existing filename if provided)
"Validate docs/specs/payment.md"(read existing, no new file)

Rules:

  • Always lowercase, kebab-case, .md suffix
  • Keep it short: 3-6 words, under 60 characters
  • No dates in the filename (version is in the Metadata table)
  • No version numbers in the filename (version is in the Metadata table)
  • Write to docs/spec/{filename}.md using cat > or Write tool
  • If you're not sure, pick the most descriptive name and go with it — it's easy for the user to rename later

Write Target

  • Write the complete PRD to docs/spec/{filename}.md.
  • In Coaching mode: write the coaching message, and include the proposed filename in the coaching response.

Mode Dispatch

TriggerModeFirst Write Content
(default, no keywords)Coaching## Coaching Session: {topic}\n\nv1.0.0\n\n{1-sentence scope guess}\n\n**One question:** ... Max 3 ? marks. ONE question. No PRD chapters. <30s.
"fast"/"skip"/"just generate"/"don't ask"FastONE Write: Metadata + ALL 13 chapters with ACTUAL content (F-x.x, mermaid, tables). Max 2 Edits after. <120s total.
"update"/"modify"/"add feature"UpdateONE Write: Metadata (v1.1.0) + Changelog + Key Update Notes + full 13-chapter skeleton with content. Max 2 Edits after. <120s total.
"validate"/"check"/"review"Validate# PRD Validation Report\n\n**Score: X/10**\n\n## Critical\n\n\n## Warning\n\n## Info\n\n## Traceability\n <60s.
"resume"/"recover"/"continue"RecoveryONE Write: ## Resuming from Chapter 4 + Ch 4-13 with ACTUAL content (F-x.x, mermaid). Max 1 Edit after. <120s total.
"batch"/"incremental"/"progress"BatchONE Write: ALL ✅ Batch 1/5–✅ Batch 5/5 markers + Metadata + ALL 13 chapters with content. Max 2 Edits after. <120s total.

Coaching Mode Details

  • <30s MAX. Write immediately. Do NOT analyze deeply. Do NOT read references.
  • Detect language (Chinese/English), infer context from user message
  • Must explicitly state intent: e.g. "Looks like you want to create a new PRD — I'll guide you through it" (include "create"/"update"/"validate" keyword explicitly)
  • Ask ONE consolidated question (max 3 ? marks total), with 2-3 recommended options + brief rationale for each
  • Must include "coaching" or "guide" keyword
  • Must include version "v1.0.0"
  • Must include a pre-filled Metadata table (even with inferred values — show the user what you plan to use)
  • Must include the proposed filename
  • Do NOT generate full PRD chapters (no ## 1. Problem Description + ## 2. Goal Definition together)
  • Target output: 800-1200 chars. Write and stop.

Fast Mode Details

  • SINGLE WRITE: ONE Bash heredoc with Metadata + ALL 13 chapters with ACTUAL content. NO sequential Edits. NO post-write edits.
  • Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x you list in Chapter 6 Feature List MUST have a corresponding ### F-x.x section in Chapter 7 Feature Details. If you can't expand all, LIST FEWER in Ch6 — keep 1:1, no gaps. Prefer 5-8 core features (P0+P1) fully expanded over 15+ features half-done.
  • Acceptance criteria MUST use - [ ] checkbox format.
  • Include: ## Review Record with ### First Principles Validation
  • [ASSUMPTION] tags on guesses
  • Score at end: Score: XX/100
  • Total time: <120s.
  • Conciseness: ALL 13 chapters (Ch1-Ch13) MUST be present and follow the standard template. Each feature detail (Ch7) max 5 lines. Each user story (Ch4) max 2 lines. Keep flowcharts 8-12 nodes. Target: 200-350 lines. NEVER exceed 400 lines.

Update Mode Details

  • If eval provides a file path, cat it to get baseline PRD before writing. ONLY cat the baseline, do NOT read references/*.
  • SINGLE WRITE: ONE Bash heredoc with Metadata (v1.1.0) + Changelog + Key Update Notes + full 13 chapters with content. NO sequential Edits. NO post-write edits.
  • Version bump rules: feature addition → v1.1.0, major changes → v2.0.0
  • Must include: ## Changelog table (| Date | Version | Author | Changes |), "Key Update Notes" section (2-3 sentences max), change impact analysis (brief)
  • Continue F-x.x numbering from baseline's max
  • Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x in Chapter 6 (existing + new) MUST have a corresponding ### F-x.x in Chapter 7. New features get full expansions. If you add too many to fit, add fewer — keep 1:1.
  • Acceptance criteria MUST use - [ ] checkbox format.
  • Baseline cleanup pass: Before writing, scan the baseline and carry fixes into the updated PRD: (a) fuzzy words (friendly / normally / correctly / 正常 / 适当 etc.) — replace with specific, measurable language; (b) User Stories missing the "so that" benefit clause — add one.
  • Include ## Review Record: First Principles Validation (1 line per item) + **Score**: XX/100. No per-chapter traceability audit — compute the score from the content you just wrote.
  • Mermaid flowcharts must have |Failure| and |Timeout| branches
  • Conciseness: ALL 13 chapters (Ch1-Ch13) MUST be present. Each feature detail (Ch7) max 5 lines. Keep flowcharts 8-12 nodes. Tag every assumption with [ASSUMPTION]. Keep total <450 lines.
  • No post-write validation: Do NOT run validate-prd.js, do NOT re-read the file, do NOT run wc/grep on it. ONE write, then stop.
  • Target: 250-450 lines. Total <120s.

Validate Mode Details

  • <60s total. Read baseline, write report immediately. ONE write, then stop.
  • Include Critical, Warning, Info severity levels
  • Check only structure (fast scan, no deep analysis): US↔F-x.x traceability, acceptance criteria format (- [ ]), flowchart syntax
  • Output Overall Score (e.g., "Score: 7.5/10")
  • Speed rules: Skip semantic checks (US benefit clause, fuzzy words, keyword correlation). Skip flowchart state alignment. Skip retry/degradation checks. Max 3 items per severity level. Keep report ≤50 lines.
  • ONE write. No re-read. No validation script runs. Write and stop.

Recovery Mode Details

  • SINGLE WRITE: ONE Bash heredoc with ALL chapters 4-13 headings + ACTUAL content (F-x.x, mermaid, tables). NO sequential Edits. NO ... placeholders.
  • Write "Resuming from Chapter 4" as opening line
  • Include checkpoint reference, batch progress markers (✅ Batch N/5)
  • Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x in Ch6 must have a ### F-x.x in Ch7. List fewer features rather than leave gaps.
  • Acceptance criteria MUST use - [ ] checkbox format.
  • Must include: flowchart with |Failure|+|Timeout|, Review Record
  • Target: 150-250 lines total. NEVER exceed 300 lines

Batch Mode Details

  • SINGLE WRITE: ALL content in ONE Bash heredoc. Include actual content (F-x.x IDs, mermaid flowcharts, tables), NOT ... placeholders. NO sequential Edits. NO multiple appends.
  • Progress format: ✅ Batch 1/5 … ✅ Batch 5/5 — include ALL markers in the single write
  • Includes: Metadata, all 13 chapter headings with content, flowchart with |Failure|+|Timeout|, Review Record, Score
  • Ch6↔Ch7 1:1 MATCH (NON-NEGOTIABLE): Every F-x.x in Chapter 6 MUST have a corresponding ### F-x.x in Chapter 7. Keep Ch6 to 5-8 core features (P0+P1) — put P2 items in Future Plans instead. Better 6 fully expanded than 20 half-written.
  • Acceptance criteria MUST use - [ ] checkbox format.
  • Target: 250-400 lines total. NEVER exceed 400 lines
  • End with: Score: XX/100 or Quality: XX/100

PRD Template (13 Chapters)

Metadata (always include)

FieldValue
Author{inferred}
StatusDraft
Created{today}
Last Updated{today}
Versionv1.0.0
Project{from user}
Related DocsNone
PrototypeNone

Chapter Structure

#ChapterContent
1Problem DescriptionCore problem + specific problems table + impact scope
2Goal DefinitionCore goals + success metrics table (baseline/target)
3Target UsersUser type table with use cases, P0/P1/P2 priority
4User StoriesUS-x.x IDs, MUST follow "As a {user}, I want {action} so that {benefit}" three-part format — every story needs the "so that" benefit clause
5Feature FlowchartsMermaid flowchart TD — MUST have `FailureandTimeout` branches
6Detailed Feature ListF-x.x IDs, module, name, Target Platform column, priority. Keep to 5-8 core features (P0+P1).
7Feature Details### F-x.x for each: description, trigger, interaction, MUST use - [ ] checkbox format for acceptance criteria
8Tracking DesignBT-x.x events table + Success Metric Calculation Methods table
9Future Improvement PlansF-x.x numbering continues from Ch7 max
10Risks & DependenciesTechnical risks + external dependencies with schedule status
11Decision LogKey decisions with rationale
12Glossary + Assumption IndexDomain terms + all [ASSUMPTION] tags
13Review RecordFirst Principles Validation + Logical Completeness + Boundary Risk

Platform Inference (IMPORTANT)

Auto-detect platform from user input. Include platform-specific features:

User mentionsPlatform inferenceFeatures to add
"Mini Program" / "WeChat" / "scan QR code"WeChat Mini ProgramQR code scanning, subscription messages, WeChat login, sharing via WeChat
"iOS" / "iPhone" / "iPad"iOS Mobile AppPush notifications, native gestures, App Store deployment
"Android"Android Mobile AppGoogle Play, push notifications, back button handling
"Mobile" / "phone"Mobile App (cross-platform)Touch interactions, responsive design, offline support
"Web" / "Dashboard" / "browser"Web ApplicationResponsive design, cross-browser compatibility
"Backend" / "API" / "service"Backend ServiceREST/GraphQL API, rate limiting, auth

If platform is mentioned, reflect it in: Problem Description (context), Target Users (device type), Feature List (platform column), Feature Details (platform-specific behavior).

Mermaid Flowchart Rules (CRITICAL)

  1. Use flowchart TD (not graph TD)
  2. No ASCII double quotes " in mermaid — use single quotes '
  3. No circle nodes ((text)) — use (text) for API/service calls
  4. No HTML tags <br/> — split long text into separate nodes
  5. Every API call / external dependency node MUST have |Failure| and |Timeout| branches
  6. 8-20 nodes per chart

Example:

flowchart TD
    A[User request] --> B(External API)
    B --> C{Response}
    C -->|Success| D[Process data]
    C -->|Failure| E{Retry < 3?}
    E -->|Yes| B
    E -->|No| F[Show error message]
    C -->|Timeout| G[Show timeout prompt]

Strict Validation Checklist

Before saving final PRD:

  • Metadata table complete (8 fields, Version v1.0.0)
  • US↔F-x.x bidirectional traceability
  • Chapter 6 F-x.x == Chapter 7 ### F-x.x (1:1 match)
  • Acceptance criteria in - [ ] format, no fuzzy words
  • Fuzzy word avoidance: check for "friendly", "properly", "正常", "normally", "correctly", "smooth", "appropriate", "user-friendly", "easy to use", "good", "bad", "fast", "slow" — replace with specific, measurable, testable criteria (e.g., "friendly" → "shows exact text: '...'", "normally" → "displays with title X and buttons Y/Z")
  • US stories use As a...I want...so that (三要素) — every US MUST have a "so that" benefit clause. Run a quick scan: if any US lacks the benefit clause, flag it as a Warning.
  • US↔FR keyword correlation — features describe what user stories demand
  • At least 1 mermaid flowchart TD
  • Every API/dependency node has |Failure| and |Timeout|
  • BT-x.x events map to success metrics
  • Success metrics have calculation methods with BT-x.x references
  • External dependencies have schedule status
  • [ASSUMPTION] tags summarized in Assumption Index
  • Quality Score present in Review Record (Score: XX/100)
  • Priorities: P0/P1/P2 only
  • No YAML front matter (---) in final — ## Metadata replaces it
  • No generate_progress fields remaining

Review Record Template (append at end of PRD)

## Review Record

### First Principles Validation
- Who is the user: ✅/❓
- What do they want: ✅/❓
- Why now: ✅/❓
- Why your solution: ✅/❓
- How do you know you got it right: ✅/❓

### Logical Completeness
- US→FR traceability pass rate: X/Y

### Boundary & Risk
- Exception flows: (list)
- Boundary conditions: (list)

**Score**: XX/100

Why: Quality Score is a crucial signal for the team. Every mode (Fast, Update, Batch, Recovery) must output a score at the end of the Review Record. It's the single-number summary of PRD quality.

Rules

  1. Write to docs/spec/{filename}.md. Use a single Bash heredoc or Write tool call. Generate filename automatically from user request (kebab-case, see naming section). Do NOT ask the user for a filename — pick the best name and write.
  2. Single write. ALL content in ONE write operation. NEVER use sequential Edit calls. NEVER use multiple cat >> appends. NEVER do post-write verification reads or edits.
  3. No verification. After writing, do NOT read back the file. Do NOT run wc/grep/head/tail on it. Do NOT check file size. Just stop.
  4. Tag every guess with [ASSUMPTION].
  5. Mermaid: flowchart TD, single-quotes, |Failure|+|Timeout| on API nodes.
  6. IDs: F-x.x / US-x.x / BT-x.x. Priority: P0/P1/P2.
  7. Language: match user language for headings/body. Technical IDs stay English.
  8. Final: strip YAML front matter, keep ## Metadata, purge generate_progress.
  9. Time budgets: Coaching <30s. Fast/Batch/Recovery <120s. Update <120s. Validate <60s.
  10. Output limits: Coaching 800-1200 chars. Fast 200-350 lines. Update 250-450 lines. Batch 250-400 lines. Recovery 150-250 lines. NEVER exceed 400 lines.
  11. No reference reading. Do NOT read references/* files. Do NOT read trajectory/logs. The SKILL.md has everything you need.
  12. Validate mode: If no PRD file found after 1 search attempt, immediately write a validation report with what you have. Do NOT keep searching.

References (for documentation only — DO NOT READ before writing)

references/intent-create.md references/intent-update.md references/intent-validate.md references/prd-guide.md references/section-rules.md references/mermaid-rules.md references/review-rules.md references/scoring-rules.md references/tracking-rules.md references/glossary-and-assumptions.md Validate: node scripts/validate-prd.js <file>.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.