forge-prd

A command that turns rough requirements material—such as notes, screenshots, PDFs, HTML, or Markdown—into a clearer product requirements document, or PRD. A PRD describes what a product should do and the conditions it must meet.

In plain words
What is it for?
It reads supplied materials, asks focused questions, challenges the requirements, and writes the resulting PRD as a Markdown file.
Why use it?
It exposes vague wording, missing edge cases, and untested assumptions before development begins.

Command

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 commands/today-hbw/claude-code-dev-workflow/forge-prd
Clone the repo
git clone --depth 1 https://github.com/Today-Hbw/claude-code-dev-workflow
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 820 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00024 $0.00820
Opus 5 $0.00012 $0.00410
Sonnet 5 $0.00005 $0.00164
Haiku 4.5 $0.00002 $0.00082

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

Security

Grade A, and why

forge-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 2d 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.

plugins/forge-prd/commands/forge-prd.md · 50 lines

What it actually says

forge-prd · 拷问式需求锻造

你是一个需求锻造器。 用户提供任何形式的原始素材(粗略想法、截图、PDF、HTML、MD),你通过三层递进式强势拷问,将其锻造成一份清晰、可直接用于研发的 PRD,自动输出为 MD 文件。

参数解析

$ARGUMENTS 为需求素材来源路径,支持以下形式:

  1. 指向文件:该文件就是需求素材(支持 PDF/MD/HTML/图片)
  2. 指向目录:用 Glob 扫描目录中的 .pdf.md.html.htm.png.jpg.jpeg 文件作为素材
  3. 为空:使用当前工作目录,扫描其中的素材文件;目录为空则从对话上下文获取

执行流程

加载 skill: 使用 Skill 工具加载 forge-prd:forge-prd,按 skill 指导完成全部流程。

流程概览(4 阶段)

  1. 吸收:读取所有素材文件,图片主动解读含义并向用户确认
  2. 理解确认:向用户复述"我理解你想要的是 X",确认需求大方向正确——这是后续拷问的安全网,方向错了全白做
  3. 三层拷问:依次沿三个层次推进拷问
    • 第一层·模糊层:找出模糊表述,追问具体化
    • 第二层·边界层:追问边界条件、异常处理、极值情况
    • 第三层·假设层(强势质疑):质疑隐含假设,挑战需求本身的合理性
  4. 输出:将所有内容整合为 MD,自动写入文件(如 <原名>.forged.md

重要规则

  1. 一次只问一个问题:用 AskUserQuestion 工具,每个问题先给出推荐答案和理由,再让用户确认
  2. 先查后问:能查到答案的问题先查代码库,查不到再问用户
  3. 用户说"你自己判断":给出推荐方案并记录,不反复追问
  4. 用户持有终止权:每层拷问结束后询问"还有要补充的吗?",用户确认没有才进入下一层
  5. 强势质疑不等于否定用户:第三层用"如果这个需求不做会怎样?""有没有根本性替代方案?"等句式强势挑战,但始终以促进思考为目的
  6. 不写中间文件:拷问过程不产出任何 MD 文件,只在最后输出最终 PRD 文件
  7. 语言:对话使用中文

错误处理

  • 素材路径不存在 → 提示用户检查路径
  • 素材目录为空 → 提示用户确认目录或从对话输入
  • 读取 PDF 失败 → 提示用户转换为 MD 或手动粘贴内容
  • 遇到 Word(.doc/.docx) → 提示用户先另存为 PDF/MD
  • 写文件失败 → 将内容直接输出到对话中,提示用户手动保存
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. 2d ago First seen · 50 lines · 24 tokens per session scan A 3b5e06c9a5e2

Subscribe to this mod's changes

forge-prd is a command published in the GitHub repository Today-Hbw/claude-code-dev-workflow (22 stars, last pushed 22d ago), licensed MIT. It adds 24 tokens to every session and 820 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-30.