How to Use the /write-prd Command to Create a Comprehensive Product Requirements Document
The /write-prd command automates PRD creation through a four-stage interactive workflow that transforms raw ideas into structured eight-section markdown documents.
The /write-prd command is a core utility in the phuryn/pm-skills repository that eliminates manual template formatting by guiding you through a structured conversation to generate complete product requirements. As part of the pm-execution suite, this command is declared in the Claude plugin system (.claude-plugin/marketplace.json) and requires zero configuration to begin using immediately.
What is the /write-prd Command?
The /write-prd command is a lightweight, pure-markdown utility designed to standardize product documentation across teams. Unlike static templates, it functions as an interactive conversation engine that gathers context incrementally and outputs a professional PRD directly to your workspace.
According to the source code in pm-execution/commands/write-prd.md, the command is self-contained and can be invoked from any Claude-compatible interface using simple slash syntax. It orchestrates multiple underlying components—including the create-prd skill and file I/O handlers—to produce consistent documentation without leaving your chat interface.
The Four-Stage PRD Workflow
When you type /write-prd followed by your input, the command initiates a logical progression through four distinct phases:
1. Feature Understanding
The command accepts any initial input—whether a short feature name, a problem statement, or an uploaded brief—and normalizes it into a clear feature description. This stage handles raw text like "SSO support for enterprise customers" or contextual problem statements such as "Users are dropping off during onboarding."
2. Context Gathering
The conversation engine interactively asks the most critical questions required for a complete PRD. It systematically collects:
- The core user problem being solved
- Target user definitions
- Success metrics and measurable outcomes
- Technical or business constraints
- Prior art and competitive analysis
- Scope preferences (MVP vs. full release)
If you upload supporting documents (PDF, DOCX, or research decks), the command extracts additional context automatically during this phase.
3. PRD Generation
Once sufficient context is collected, the command invokes the create-prd skill to generate an eight-section markdown document. As defined in the workflow file, the resulting PRD includes:
- Executive summary
- Background and context
- Objectives and success criteria
- Target users and personas
- User stories and acceptance criteria
- Solution overview and technical approach
- Open questions and risks
- Timeline and milestones
The template structure is embedded directly in the command definition at pm-execution/commands/write-prd.md, ensuring consistency across all generated documents.
4. Review & Iterate
After generation, the command offers follow-up actions to refine the document. You can trigger scope tightening, request a pre-mortem analysis, break down user stories into tickets, or generate stakeholder updates. The final markdown file is then saved to your workspace with a standardized filename.
How to Invoke the Command
The /write-prd command requires no additional setup. Simply type the slash command followed by your initial input using any of these patterns:
# Simple feature name
/write-prd SSO support for enterprise customers
# Problem statement format
/write-prd Users are dropping off during onboarding — we need to fix step 3
# With uploaded documentation
/write-prd [drag-and-drop a brief, research doc, or strategy deck]
After invocation, the assistant will present numbered questions from the context gathering stage. You may answer these in any order; the command tracks missing fields and only proceeds to PRD generation once all critical data is collected.
Key Components and Architecture
The /write-prd implementation relies on four core components defined in the phuryn/pm-skills codebase:
| Component | Source Location | Role |
|---|---|---|
| Command metadata | pm-execution/commands/write-prd.md |
Declares description, argument hints, and the full four-stage workflow |
| PRD generation skill | create-prd skill (invoked by command) |
Generates the eight-section markdown template based on gathered context |
| Conversation engine | Integrated in command logic | Handles the interactive Q&A loop and state management for missing details |
| File I/O handler | Workspace integration | Writes the final PRD as a markdown file to the user's workspace |
The command is designed to chain with other pm-execution utilities. For example, you might run /discover for research before /write-prd, then follow with /ship-check for pre-launch validation.
Summary
- Zero configuration required: The
/write-prdcommand works immediately after installation in any Claude-compatible interface. - Flexible input handling: Accepts text fragments, problem statements, or uploaded documents as starting points.
- Structured eight-section output: Generates consistent PRDs containing executive summaries, user stories, technical approaches, and timelines.
- Interactive refinement: Guides you through critical questions about users, metrics, and constraints before generation.
- Extensible architecture: Pure-markdown implementation at
pm-execution/commands/write-prd.mdallows easy customization or workflow chaining.
Frequently Asked Questions
What file formats can I upload with /write-prd?
The command accepts PDF, DOCX, and markdown files when you drag and drop them into the chat interface after invoking /write-prd. The system extracts text content from these documents during the Context Gathering stage to pre-populate fields like background research or technical constraints.
Where does the final PRD get saved?
The completed Product Requirements Document is saved as a markdown file directly in your workspace root directory. The filename typically derives from your feature description, and the file follows the eight-section template defined in the create-prd skill implementation.
Can I use /write-prd without uploading any documents?
Yes. While uploading briefs or research documents enhances the Context Gathering stage, the command functions perfectly with simple text input. You can type /write-prd followed by a brief description, and the interactive Q&A will collect all necessary details through conversation.
How does /write-prd integrate with other commands in the repository?
The command is designed to work sequentially within the pm-execution module. As documented in pm-execution/README.md, you can chain /write-prd after /discover (market research) and before /ship-check (launch validation). The markdown output format ensures compatibility with subsequent commands that parse PRD content for story breakdowns or stakeholder updates.
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 →