prd-writing

prd-writing is a skill for Claude Code, Codex from Leo-maomao/pm-copilot. It costs 16 tokens per session (2,146 once invoked), scanned A, original, MIT.

A guide for writing structured product requirements documents, or PRDs. A PRD explains what a product should do and why, without being an implementation plan.

In plain words
What is it for?
Use it to create new PRDs or carefully revise existing ones while preserving their required structure, terminology, numbering, and confirmed content.
Why use it?
It keeps requirements tied to user problems and makes each proposed behavior clear and reviewable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create new PRDs or carefully revise existing ones while preserving their required structure, terminology, numbering, and confirmed content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leo-maomao/pm-copilot/prd-writing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Leo-maomao/pm-copilot --skill prd-writing
Clone the repo
git clone --depth 1 https://github.com/Leo-maomao/pm-copilot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prd-writing

README.md
[![agentmods](https://agentmods.dev/badge/skills/leo-maomao/pm-copilot/prd-writing/github.svg)](https://agentmods.dev/skills/leo-maomao/pm-copilot/prd-writing)
Your own site
<a href="https://agentmods.dev/skills/leo-maomao/pm-copilot/prd-writing"><img src="https://agentmods.dev/badge/skills/leo-maomao/pm-copilot/prd-writing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prd-writing

Your own site · 80×15
<a href="https://agentmods.dev/skills/leo-maomao/pm-copilot/prd-writing"><img src="https://agentmods.dev/badge/skills/leo-maomao/pm-copilot/prd-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.02146
Opus 5 $0.00008 $0.01073
Sonnet 5 $0.00003 $0.00429
Haiku 4.5 $0.00002 $0.00215

Measured yesterday against content hash dec2400620e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

prd-writing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prd-writing/SKILL.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PRD Writing

Goal

Create outputs/<run-id>/prd.md as a product document that starts from users and their problems, then makes every proposed behavior reviewable through a requirement list and matching requirement details.

Workflow

  1. Load artifacts/prd-contract.md. Use its canonical ordered structure only for a new PRD. When a new PRD migrates or references another PRD, the source supplies only confirmed requirement content, terminology, assets, and explicitly requested migration boundaries; it never supplies the new document's chapters, field labels, numbering, or canonical structure unless the user explicitly says so. Do not record an assumption that the new PRD follows the source PRD's structure. For an in-place revision, the identified PRD is the sole structural source of truth: preserve its existing chapter order, headings, fields, numbering, and unaffected content. Do not use another or older PRD, or the canonical new-document structure, to normalize its overall structure unless the user explicitly requests a structural rewrite. Apply only the user-requested patch; when that patch concerns screenshots, it is limited to the matching 需求详情 cell. Remove deleted requirements and renumber the remaining detail IDs consecutively only when the user requested a requirement deletion.
  2. Identify target users, their scenario, problem, desired outcome, and the source or confirmation status before drafting requirements.
  3. For a new PRD, apply the evidence boundary and requirement-granularity rules in artifacts/prd-contract.md before creating 需求清单. Create 需求清单 before 需求详情; use the matching detail number, such as 5.1, as the sole identifier for every coherent user need, and do not use a visual state or coverage decision as a requirement boundary. For an in-place revision, preserve existing requirement boundaries and identifiers unless the user explicitly changes them.
  4. Expand each requirement only in its matching 需求详情 subsection. Do not create requirements that cannot be traced back to a user problem or scenario.
  5. For a new standard PRD, structure each requirement detail with the four required rows: 用户与场景, 需求入口, 需求详情, and 设计与交互. For a layout-only revision, do not add, delete, rename, or reorder rows. Keep every screenshot and its matching state logic inside the existing single 需求详情 cell as repeated prd-detail-media blocks: fixed-width image column on the left and that state's functional logic on the right. The right column is not a filename, caption, or generic annotation such as “对应成功状态”; it must state the user-visible rule, boundary, or feedback shown by the adjacent image. Do not add a separate 图示 row or visible image-name caption. For an implemented-feature PRD, create a coverage item for every independently reviewable production user-facing state retained in the PRD: real_figure, required_placeholder, or not_required, with rationale. A named production user-facing page, panel, dialog, node, toolbar, media state, or flow requires visual evidence; do not mark it not_required. Coverage items are visual evidence, not requirement items. Do not combine several states into one coverage item or placeholder name. Add each required figure or placeholder inline with its matching requirement. Before required_placeholder, execute and record the capability chain: discover existing previews, reuse or activate the project runtime using its actual project configuration, recover the target test state, then attempt Playwright, Chrome DevTools, and Computer Use. Do not assume or require a fixed port, and do not use skipped as a capture result. Every attempted capability and capture records actionevidence and a non-empty local result_ref under tool-results/. When capture recovery fails, continue with required_placeholder, set the PRD status to 可评审(图示待人工补全), and record the named manual replacement instruction in run-log.yaml; do not label the PRD as degraded or block its review. A placeholder cell contains only controlled 占位图:功能-状态.png values, separated by <br> when several states need placeholders. User-provided videos are not screenshots: preserve the original local video as an inline player with browser controls; never replace a supplied video with a still frame unless the user explicitly asks for a frame image. Put normal and exception states, permissions, empty/loading/error feedback, recovery, and boundaries in 需求详情; when it has two or more rules, split independently presented concerns into content groups. Restart every group's heading at 一、; restart that group's rules at 1.2.3.. Never continue a previous group's 二、/三、 numbering just because the groups share one 需求详情 cell. Write each heading and numbered rule on its own <br> line, and separate adjacent groups with one <br>. A media block or content group is not a new 5.x requirement. Do not add risk, pending-confirmation, acceptance-result, technical-test, or standalone exception fields.
  6. Use 用户流程图 for a user's cross-surface or cross-state interaction path and 操作流程图 for operation rules, conditions, permissions, state transitions, or exceptions. Neither is mandatory: add either or both Mermaid diagrams immediately above the matching detail table only when they improve reviewability; when both are present, list the user flow first.
  7. Treat a screenshot as evidence, not decoration. Follow the canonical visual-evidence, crop, placeholder, and fixed-column media-block rules in artifacts/prd-contract.md; this workflow must not restate or override them. Record the required visual-capture review only in internal evidence. If a figure does not improve reviewability, omit the media block.
  8. Add 需求调研, 多语言需求, and 埋点需求 only when they have real, decision-relevant content. Before omitting 多语言需求 or 埋点需求, complete the per-requirement coverage review in run-log.yaml: not_needed requires evidence that the requirement has no changed visible copy or no decision-relevant measurable action/outcome. Record measurable actions and outcomes as real YAML lists, never comments. The absence of existing event code or event definitions is not evidence for omission. For every research row, state the source fact and the PRD decision it changes. In a Chinese PRD, the multilingual pure-text block and 文案 column contain the localized Chinese copy only, not an English source string. A multilingual section contains only new or changed user-visible copy in one copyable pure-text block, followed by 文案使用位置参数 rows; apply the PRD contract's smallest-localizable-copy-unit rule so every independently usable string has its own pure-text line and matching 文案 row. List placeholders such as {reason} in 参数 and use / when none exist. A tracking table uses only 事件事件名称上报时机附加参数备注: use unique lowercase semantic feature_action identifiers such as login_click, never PRD-location or generic IDs such as prd_5_1_view or journey_view. Select access events, meaningful clicks/operations, important outcomes, and value signals such as duration, depth, exposure, completion, or retention when the user journey needs them. Keep 上报时机 to one observable sentence, put only event-external properties in 附加参数, and use / when either 附加参数 or 备注 has no content. Omit empty optional sections and explanatory labels.
  9. Clean user input before writing: retain user-confirmed facts, source-backed observations, and explicit product decisions; remove template guidance, process narration, technical evidence, duplicated explanation, and vague filler. If an unresolved product rule materially affects the requirement, ask for a decision before generation; do not put it in the PRD. Never invent behavior from model intuition.
  10. Add a version record only for the initial document or a material change to a user need, product behavior, scope, rule, or user-visible copy. Do not record rendering, formatting, validation, synchronization, or other document operations.
  11. For implemented-feature reconstruction, use technical evidence only to infer and verify user-visible behavior. Record technical evidence in run-log.yaml, never in the PRD.
  12. Do not include technical implementation or solution content in a PRD, including code paths, routes, components, services, APIs, schemas, infrastructure, commands, technical architecture, CSS variables or selectors, color tokens, gradients, stacking levels, exact dimensions, or source field names. Translate implementation evidence into user-visible behavior. Create or link a separate engineering handoff only when the user explicitly requests one.
  13. Remove empty tables, artificial 不涉及 text, instructional prose, duplicated restatement, and detached implementation or testing plans. Before delivery, check that background explains a causal user problem, every list row names an independently reviewable user outcome, every detail row makes a distinct product decision, and every tracking event can answer a product or business question.

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed dec2400620e9
  2. 5d ago Changed 64c432b744eb
  3. 6d ago Changed 62eef114b007
  4. 10d ago First seen · 46 lines · 16 tokens per session scan A 1b05cbe37f81

Subscribe to this mod's changes

prd-writing is a skill published in the GitHub repository Leo-maomao/pm-copilot (4 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 2,146 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.