How to Use the /write-prd Command to Create a Comprehensive PRD
The /write-prd command transforms a simple feature idea or problem statement into an 8-section Product Requirements Document by guiding you through a four-step conversational workflow that captures context and generates structured markdown.
The /write-prd command in the phuryn/pm-skills repository automates the creation of Product Requirements Documents (PRDs) through a structured workflow defined in pm-execution/commands/write-prd.md. It accepts inputs ranging from brief text descriptions to uploaded research documents, orchestrating the create-prd skill to produce publication-ready markdown files. This workflow ensures critical product context is captured through targeted questions while eliminating manual template formatting.
Command Architecture and Source Files
The /write-prd command implementation spans two primary locations in the repository. The command definition resides in pm-execution/commands/write-prd.md, which orchestrates the workflow logic. The actual PRD generation relies on the create-prd skill located at pm-execution/skills/create-prd/SKILL.md, which contains the 8-section template structure and rendering instructions.
Key implementation details include:
- Input parsing logic (lines 20-27): Handles plain text, feature names, problem statements, or uploaded files
- Context gathering prompts (lines 31-39): Structured questioning for problem definition, user personas, and constraints
- Review workflow (lines 101-108): Post-generation options for refinement and export
The Four-Step Workflow
The command executes a linear workflow that transforms raw input into a stakeholder-ready document.
Step 1: Understand the Feature
The command parses your initial input according to the logic defined in lines 20-27 of pm-execution/commands/write-prd.md. It accepts multiple input formats:
- Simple feature names ("SSO support")
- Problem-oriented statements ("Users dropping off during onboarding")
- Uploaded documents (PDF briefs, research decks, or strategy documents)
Step 2: Gather Context
Once the command identifies the core idea, it issues conversational prompts to fill knowledge gaps. As defined in lines 31-39, the system captures:
- User problem: The specific pain point or opportunity
- Target users: Primary and secondary personas
- Success metrics: Quantifiable outcomes and KPIs
- Constraints: Technical limitations, timeline, or resource boundaries
- Prior art: Existing solutions or competitive references
- Scope preference: MVP vs. full feature delineation
Step 3: Generate the PRD
The command invokes the create-prd skill, which renders an 8-section markdown document based on the template in pm-execution/skills/create-prd/SKILL.md. The generated structure includes:
- Executive Summary: High-level feature overview and value proposition
- Background: Context and prior research
- Objectives: Measurable goals and success criteria
- Target Users: Detailed personas and user segments
- User Stories: Scenario-based requirements
- Solution Overview: Technical approach and implementation details
- Open Questions: Assumptions requiring validation
- Timeline: Milestones and delivery estimates
Step 4: Review and Iterate
After generating the draft, the command presents options defined in lines 101-108 of the workflow file. You can:
- Refine scope boundaries
- Run a pre-mortem analysis
- Split the PRD into individual user stories
- Generate stakeholder update documents
- Save the final document as
PRD-<feature>.mdin your workspace
How to Invoke the Command
Use the following syntax patterns in your PM-Skills interface:
/write-prd SSO support for enterprise customers
/write-prd Users are dropping off during onboarding — we need to fix step 3
For complex features requiring background research:
/write-prd [attach PDF brief, research doc, or strategy deck]
After invocation, respond to the automated prompts to provide missing context. The system will generate the markdown document and display it for review before saving.
PRD Output Structure
The generated document follows a strict template ensuring consistent product documentation. A typical output begins with:
## Product Requirements Document: SSO Support for Enterprise Customers
**Author**: …
**Date**: …
**Status**: Draft
### 1. Executive Summary
Implement single‑sign‑on (SSO) to enable enterprise customers to authenticate via their existing identity provider, reducing login friction and improving security compliance.
### 2. Background & Context
Enterprise clients have repeatedly requested a centralized authentication mechanism. Current siloed login flows increase support tickets and hinder adoption of premium features.
The document continues through all eight sections, concluding with the Timeline section that breaks delivery into discrete milestones.
Summary
- The
/write-prdcommand is defined inpm-execution/commands/write-prd.mdand uses thecreate-prdskill atpm-execution/skills/create-prd/SKILL.md - It accepts text input or uploaded documents, then guides you through targeted questions to capture product context
- The workflow generates an 8-section markdown PRD covering Executive Summary through Timeline
- Post-generation options include scope refinement, pre-mortems, and automatic saving as
PRD-<feature>.md
Frequently Asked Questions
What input formats does /write-prd support?
The command accepts plain text descriptions, problem statements, feature names, or uploaded files including PDFs, Word documents, and research decks. According to the implementation in pm-execution/commands/write-prd.md (lines 20-27), the parser automatically detects the input type and extracts the core feature concept regardless of format.
How long does the PRD generation process take?
The command generates the initial document immediately after you complete the context-gathering questions. The conversational phase typically takes 2-5 minutes depending on the complexity of your responses, while the markdown generation is instantaneous. The system then allows iterative refinement before finalizing the PRD-<feature>.md file.
Can I customize the 8-section template used by /write-prd?
The template is defined in pm-execution/skills/create-prd/SKILL.md and is standardized across all PRD generations to ensure consistency. While you cannot modify the template structure during command execution, you can request modifications to the generated content during the Review & Iterate phase (lines 101-108), or manually edit the saved markdown file after export.
What is the difference between /write-prd and the create-prd skill?
The /write-prd command is the high-level workflow interface that handles user interaction, context gathering, and file management. The create-prd skill is the underlying template engine that renders the 8-section markdown document. The command calls the skill during Step 3 of the workflow, passing the gathered context to populate the template fields.
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 →