write-prd

write-prd is a skill for Claude Code, Codex from tam159/next-role. It costs 84 tokens per session (2,295 once invoked), scanned A, original, MIT.

A product requirements document (PRD) for the feature built in the current coding session, saved as a Markdown file in docs/prd/. It records the feature's purpose and important decisions for future developers or AI agents.

In plain words
What is it for?
Use it after building a feature when you need a concise, durable specification. It helps future readers understand what was built and why.
Why use it?
It preserves the reasons and decisions that may be hard to recover from code changes alone. It also keeps the repository's linked documentation structure up to date.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tam159/next-role/write-prd
Any agent
npx skills add tam159/next-role --skill write-prd
Clone the repo
git clone --depth 1 https://github.com/tam159/next-role

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 write-prd

README.md
[![agentmods](https://agentmods.dev/badge/skills/tam159/next-role/write-prd.svg)](https://agentmods.dev/skills/tam159/next-role/write-prd)
Your own site
<a href="https://agentmods.dev/skills/tam159/next-role/write-prd"><img src="https://agentmods.dev/badge/skills/tam159/next-role/write-prd.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,295 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00084 $0.02295
Opus 5 $0.00042 $0.01148
Sonnet 5 $0.00017 $0.00459
Haiku 4.5 $0.00008 $0.00230

Measured 4d ago against content hash 2a3716ad30d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write-prd scanned grade A with 1 finding 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 4d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Verification steps you ran (curl, browser checks, tests) — these become *How to verify end-to-end*.
.agents/skills/write-prd/SKILL.md · 115 lines

How it starts

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

Write a PRD that captures the feature implemented in the current session, in the house style of docs/prd/. That folder is an OKF (Open Knowledge Format) knowledge bundle — see docs/prd/README.md — so every PRD is a markdown concept document with YAML frontmatter, and the relative links between PRDs draw the edges of the bundle's knowledge graph.

The audience is a future developer or AI agent reading the file cold — months later, after the code has drifted. The point is not to restate what the diff shows; it is to capture the why and the non-obvious decisions that the code alone can't explain. The frontmatter description doubles as the PRD's one line in docs/prd/index.md — it is what an AI agent reads to decide whether to open the file at all, so make it carry the feature's essence.

Workflow

  1. Anchor on the existing style. Read at least one existing PRD in docs/prd/ (e.g. 10_print_file_as_pdf.md or 03_jd_url_extraction.md) before writing. Match its tone, density, and section order. Do not invent new sections.

  2. Mine the session for content. The conversation history is your source material — pull from:

    • The user's original requirement (becomes the Why).
    • Approach choices made during planning, especially ones where you considered alternatives and picked one. These are the Decisions worth remembering.
    • The actual files touched (use git diff / git status if needed to be precise) — these populate Files of interest.
    • User corrections and "no, do it this way" moments — these are usually the most valuable decisions to record.
    • Verification steps you ran (curl, browser checks, tests) — these become How to verify end-to-end.
  3. Propose a filename and version, then confirm. Filename is NN_snake_case.mdNN is the zero-padded next number in sequence (ls docs/prd/ for the current highest; e.g. 28_feature_name.md). Version is v1 for a new feature, v2 etc. if extending one — check whether a related PRD already exists. Briefly tell the user the proposed path and version in one line, then write it. Don't block on a long confirmation cycle; the user can rename if needed.

  4. Write the PRD using the template below. Save to docs/prd/NN_<name>.md.

  5. Update the bundle indexes. Add the PRD's line to docs/prd/index.md under # PRD — title-alphabetical order, format * [Title](NN_name.md) - <description from frontmatter> — then regenerate docs/prd/viz.html (commands live in docs/prd/README.md → "Adding or updating a PRD"; expect the reported concept count to go up by one).

  6. Show the user the path and a one-line summary of what was written. Don't dump the PRD back into chat — they can open the file.

Read the full file on GitHub · 115 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. 4d ago First seen · 115 lines · 84 tokens per session scan A 2a3716ad30d9

Subscribe to this mod's changes

write-prd is a skill published in the GitHub repository tam159/next-role (49 stars, last pushed 5d ago), licensed MIT. It adds 84 tokens to every session and 2,295 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ai-dev-jobs-mcp-v2

AI Dev Jobs MCP workflow skill. Use this skill when the user needs Search 8,400+ AI and ML jobs across 489 companies, inspect listings and employers, match roles, and view salary and market stats via AI Dev Jobs MCP and the operator should preserve the upstream workflow, copied support files, and provenance before…

diegosouzapw/awesome-omni-skills · 78 tokens

ai-dev-jobs-mcp

AI Dev Jobs MCP workflow skill. Use this skill when the user needs Search 8,400+ AI and ML jobs across 489 companies, inspect listings and employers, match roles, and view salary and market stats via AI Dev Jobs MCP and the operator should preserve the upstream workflow, copied support files, and provenance before…

diegosouzapw/awesome-omni-skills · 76 tokens

cuml-machine-learning

Use for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality reduction, or model training on datasets.

langchain-ai/deepagents · 43 tokens

openspec-verify-change

Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.

Fission-AI/OpenSpec · 32 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

omni-mcp

Connect to the OmniRoute MCP server (110 tools, 3 transports: SSE/stdio/HTTP). Covers routing, cache, compression, memory, skills, providers, and audit tools across 33 permission scopes.

diegosouzapw/OmniRoute · 48 tokens