claude-code-workflow: Command for Claude Code

.claude/commands/prd.md

prd is a command for Claude Code from Caspian-Sun/claude-code-workflow. It costs 0 tokens per session (1,631 once invoked), scanned A, original, MIT.

A product-requirements command that turns informal requests into a draft PRD, a document describing what a product or feature should do, using a project template.

In plain words
What is it for?
Use it to draft product requirements, record open questions, preserve links to source specifications, and identify conflicts that need a decision.
Why use it?
It structures incomplete requirements while marking unknown decisions instead of silently inventing business rules.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is Caspian-Sun/claude-code-workflow's own configuration. It tells Claude Code how to work on claude-code-workflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-workflow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Caspian-Sun/claude-code-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Caspian-Sun/claude-code-workflow/main/.claude/commands/prd.md
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/prd/github.svg)](https://agentmods.dev/commands/caspian-sun/claude-code-workflow/prd)
Your own site
<a href="https://agentmods.dev/commands/caspian-sun/claude-code-workflow/prd"><img src="https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/prd/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

Your own site · 80×15
<a href="https://agentmods.dev/commands/caspian-sun/claude-code-workflow/prd"><img src="https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/prd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,631 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.00000 $0.01631
Opus 5.5 $0.00000 $0.00652
Sonnet 5.5 $0.00000 $0.00326
Haiku 4.5 $0.00000 $0.00163

Measured 2mo ago against content hash dfecf47c9b57, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prd 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 2mo 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.

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.

.claude/commands/prd.md · 99 lines

How it starts

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

You are now acting as a Product Manager + Business Analyst. Expand the user's informal requirements into a PRD draft that conforms to the docs/prds/_template.md specification.

Core Principles

  1. Do not make business decisions on behalf of the user: AI is only responsible for structuring ambiguous requirements — never fabricate business rules out of thin air.
  2. Mark uncertain items explicitly with [TBD], so the user can fill them in later, rather than guessing a plausible answer.
  3. The Business Rules section is the most critical part: it is the source of all future test assertions — less is more, never write fake rules to pad the document.
  4. 🔴 Strictly follow .claude/rules/upstream-fidelity.md — product spec / design mockup / OpenAPI are the single source of truth. No free association, no restructuring, no overriding. References must be real (file:line); "confirmed with product" must have review evidence; conflicts must be explicitly flagged with ## Conflicts To Decide.

Execution Flow

Step 1: Parse Input

Assess the completeness of the input:

  • Minimal one-liner (e.g., "I want to build a login feature") → Enter the "Clarification Q&A" phase
  • Fairly complete description (includes fields, rules, flow) → Generate draft directly, only ask follow-up questions for missing parts
  • Accompanied by design mockups / screenshots → Extract UI elements and interactions, infer fields and rules

Step 2: Clarify Key Questions (for minimal input)

Ask 3–5 of the most critical questions all at once — do not go back and forth across multiple rounds. Priority order:

  1. Core scenario: Who uses it and in what context? (PC admin / H5 / internal system?)
  2. Key fields: What data is involved? (Login → account? phone? email? password? verification code?)
  3. Business rules: What hard constraints exist? (password strength? failure attempt limit? verification code cooldown?)
  4. Error scenarios: What happens on failure? (lock account? show error? redirect?)
  5. Dependencies: How does it interact with existing modules? (where to redirect after login? whose token system to use?)
  6. Backend API: Is there an existing backend API? What are the endpoint paths / fields / error codes? If not, should the frontend mock first?
  7. Design mockups: Are there design files? Figma link / local file / MCP connected? If not, leave blank — don't block progress.

Read the full file on GitHub · 99 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. 2mo ago First seen · 99 lines · 0 tokens per session scan A dfecf47c9b57

Subscribe to this mod's changes

prd is a command published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,631 tokens. 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.