# How to Use the /write-prd Command to Create a Comprehensive Product Requirements Document

> Learn to use the /write-prd command to automate comprehensive product requirements document creation. Transform ideas into structured markdown with this four-stage workflow.

- Repository: [Pawel Huryn/pm-skills](https://github.com/phuryn/pm-skills)
- Tags: how-to-guide
- Published: 2026-06-16

---

**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`](https://github.com/phuryn/pm-skills/blob/main/.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`](https://github.com/phuryn/pm-skills/blob/main/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:

1. Executive summary
2. Background and context
3. Objectives and success criteria
4. Target users and personas
5. User stories and acceptance criteria
6. Solution overview and technical approach
7. Open questions and risks
8. Timeline and milestones

The template structure is embedded directly in the command definition at [`pm-execution/commands/write-prd.md`](https://github.com/phuryn/pm-skills/blob/main/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:

```markdown

# Simple feature name

/write-prd SSO support for enterprise customers

```

```markdown

# Problem statement format

/write-prd Users are dropping off during onboarding — we need to fix step 3

```

```markdown

# 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`](https://github.com/phuryn/pm-skills/blob/main/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-prd` command 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.md`](https://github.com/phuryn/pm-skills/blob/main/pm-execution/commands/write-prd.md) allows 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`](https://github.com/phuryn/pm-skills/blob/main/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.