How Does the /write-prd Command Generate a Product Requirements Document in phuryn/pm-skills?
The /write-prd command orchestrates a three-step workflow that parses user input, gathers contextual requirements through targeted questions, and invokes the create-prd skill to output an eight-section markdown Product Requirements Document.
The /write-prd command in the phuryn/pm-skills repository transforms terse feature descriptions into comprehensive Product Requirements Documents (PRDs). This command-level workflow bridges the gap between initial product ideas and structured documentation by leveraging the create-prd skill to enforce consistent formatting and completeness.
Understanding the /write-prd Command Structure
The /write-prd command is implemented in pm-execution/commands/write-prd.md as a command-level workflow that accepts free-form input describing a feature, problem statement, or uploaded brief. According to the source code, the command parses inputs ranging from simple feature names like "SSO support for enterprise customers" to complex problem descriptions or uploaded documents.
The Three-Step Workflow to Generate a PRD
The command executes a structured three-step process defined in pm-execution/commands/write-prd.md to ensure comprehensive coverage before generating the document.
Step 1 – Understand the Feature
In lines 20-28 of pm-execution/commands/write-prd.md, the command accepts any descriptive form of input, including feature names, user requests, or uploaded files. If a document is uploaded, the system extracts available context automatically, allowing users to provide briefs, research docs, or strategy decks as starting points.
Step 2 – Gather Context
The command asks targeted clarifying questions to fill information gaps. As defined in lines 31-39 of pm-execution/commands/write-prd.md, these questions cover the problem statement, target users, success metrics, constraints, prior art, and scope boundaries. This interactive step ensures the final PRD contains all necessary business and technical context.
Step 3 – Generate the PRD
With collected answers, the command calls the create-prd skill to format the output. This final step, documented in lines 42-48 of pm-execution/commands/write-prd.md, delegates the document construction to the skill while preserving the conversational context gathered in previous steps.
How the create-prd Skill Structures the Document
The create-prd skill, defined in pm-execution/skills/create-prd/SKILL.md, implements an 8-section template that standardizes PRD generation across all invocations.
The Eight-Section Template
According to lines 26-70 of pm-execution/skills/create-prd/SKILL.md, the skill generates markdown documents containing:
- Summary – High-level overview of the initiative
- Contacts – Stakeholder and owner information
- Background – Context, prior art, and existing constraints
- Objective – Clear goals and measurable success metrics
- Market Segment(s) – Target audiences and user personas
- Value Proposition(s) – Benefits and competitive differentiation
- Solution – Technical and functional requirements
- Release – Timeline, rollout plan, and milestones
Reasoning Checklist and Output
The skill applies a step-by-step reasoning checklist (lines 18-25) covering problem definition, user identification, metrics, and constraints. It renders each section as markdown headings with placeholders filled from user answers, then saves the final document as PRD-<product-name>.md (lines 72-73).
Usage Examples and Invocation Patterns
Users can invoke the command in several ways to trigger the PRD generation workflow:
# Basic feature description
/write-prd SSO support for enterprise customers
# Problem-focused usage
/write-prd Users are dropping off during onboarding — we need to fix step 3
# Uploaded brief workflow
/write-prd [upload a brief, research doc, or strategy deck]
Each invocation triggers the three-step workflow, prompting for missing details and ultimately returning a structured markdown PRD.
Summary
- The
/write-prdcommand in phuryn/pm-skills parses free-form input and uploaded documents to initiate PRD generation. - A three-step workflow (Understand the Feature, Gather Context, Generate the PRD) ensures comprehensive information collection before document creation.
- The
create-prdskill implements an 8-section template (Summary, Contacts, Background, Objective, Market Segments, Value Propositions, Solution, Release) to standardize output. - Final documents are saved as
PRD-<product-name>.mdwith consistent markdown formatting ready for stakeholder review.
Frequently Asked Questions
What input formats does /write-prd accept?
The command accepts free-form text descriptions, feature names, problem statements, or uploaded documents including PDFs and Google Docs. According to pm-execution/commands/write-prd.md, the system extracts context automatically from uploaded files and handles any descriptive form from terse feature names to detailed problem statements.
How many sections does the generated PRD contain?
The create-prd skill generates exactly eight sections: Summary, Contacts, Background, Objective, Market Segment(s), Value Proposition(s), Solution, and Release. This template is defined in pm-execution/skills/create-prd/SKILL.md (lines 26-70) and enforces clear, accessible language throughout.
Can I customize the PRD template sections?
The current implementation uses a fixed eight-section template enforced by the create-prd skill. Users provide content through the interactive questioning process, but the structural sections remain consistent to ensure standardization across all generated documents in the repository.
Where is the final PRD saved?
The skill saves the completed document as PRD-<product-name>.md in the working directory, as specified in pm-execution/skills/create-prd/SKILL.md (lines 72-73). This naming convention ensures easy identification and downstream consumption by other tools or team members.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →