安装方式
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add luongnv89/skills --skill prd-generator Generate Product Requirements Documents from `idea.md` and `validate.md` files. Use when asked to create or update a PRD. Don't use for TAD, sprint tasks, or raw idea validation.
4
下载量
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add luongnv89/skills --skill prd-generator name: prd-generator
description: Generate Product Requirements Documents from `idea.md` and `validate.md` files. Use when asked to create or update a PRD. Don't use for TAD, sprint tasks, or raw idea validation.
license: MIT
effort: max
metadata:
version: 1.4.0
author: "Luong NGUYEN <luongnv89@gmail.com>"Generate comprehensive Product Requirements Documents from validated idea files.
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If the working tree is not clean, stash first, sync, then restore:
git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash pop
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
Preferred: project folder path in $ARGUMENTS containing:
idea.md - Product concept and technical context (required)validate.md - Evaluation and recommendations (required)If path is not provided (auto-pick mode):
IDEAS_ROOT when present.~/.config/ideas-root.txt.~/.openclaw/ideas-root.txt.IDEAS_ROOT.Mode selection (decide before Phase 1): If PROJECT_DIR/prd.md already exists and the user wants changes to it, this is a modify run — do Phase 1's steps 1-4 (including the mandatory backup), then skip to ## Modification Mode below instead of Phases 2-5, rejoining the workflow at Phase 6. Otherwise this is a create run — proceed through Phases 1-7 in order. Both modes share Phase 1's backup step; see ## Modification Mode for modify-run detail.
PROJECT_DIR (from $ARGUMENTS or auto-pick mode above)PROJECT_DIR/idea.md existsPROJECT_DIR/validate.md existsPROJECT_DIR/prd.md exists, create backup: prd.backup.YYYYMMDD_HHMMSS.mdFrom idea.md:
From validate.md:
Ask user (if not clear from input files):
Create prd.md with these sections:
Read references/prd-template.md for the full template structure.
prd.md to project folderAfter writing prd.md, if the project folder is inside an ideas repo, update the repo README ideas table:
cd to the repo root and run python3 scripts/update_readme_ideas_index.py (if it exists)README.md manually (ensure PRD status becomes ✅ for that idea)git push origin <branch>
git fetch origin && git rebase origin/main && git push.After completing each major step, output a status report in this format:
◆ [Step Name] ([step N of M] — [context])
··································································
[Check 1]: √ pass
[Check 2]: √ pass (note if relevant)
[Check 3]: × fail — [reason]
[Check 4]: √ pass
[Criteria]: √ N/M met
____________________________
Result: PASS | FAIL | PARTIAL
Adapt the check names to match what the step actually validates. Use √ for pass, × for fail, and — to add brief context. The "Criteria" line summarizes how many acceptance criteria were met. The "Result" line gives the overall verdict.
Per-phase check names and the full set of seven templates (one for each of Phases 1-7) live in references/step-reports.md — read it before emitting the first report.
When reporting completion, include:
prd.mdREADME.md when it was updatedLink format (derive <owner>/<repo> from git remote get-url origin):
https://github.com/<owner>/<repo>/blob/main/<relative-path>Entered per the Mode selection note above, once Phase 1's backup (prd.backup.YYYYMMDD_HHMMSS.md) already exists:
A run is considered successful only when every item below is verifiable in the produced prd.md. Use these as a checklist; reject and regenerate the section if any check fails.
prd.md is written to PROJECT_DIR (same folder as idea.md).grep -c '^## ' returns >= 10): Product Overview, User Personas, Feature Requirements, User Flows, Non-Functional Requirements, Technical Specifications, Analytics & Monitoring, Release Planning, Open Questions & Risks, Appendix.Must, Should, Could, Won't) and at least 5 items total.Given <context> / When <action> / Then <outcome> format (verify with grep -E "Given .* When .* Then"). `mermaid block with valid flowchart or sequenceDiagram syntax.prd.md existed, a prd.backup.YYYYMMDD_HHMMSS.md sibling file was written before overwrite.Result: PASS (or explicit PARTIAL/FAIL with reason).Always verify the checklist explicitly in the final completion report (echo each item with √ or ×).
The generated prd.md follows a fixed 10-section skeleton (Product Overview, Personas, Feature Requirements, User Flows, NFRs, Tech Specs, Analytics, Release Planning, Risks, Appendix) with a header citing Source: idea.md, validate.md and a final console summary line. See references/expected-output.md for the full skeleton and console summary template.
Handle missing inputs, verdict=REJECT, conflicting requirements, existing PRDs (always backup), unclear tech/compliance context, and Mermaid validation failures. See references/edge-cases.md for the full list and required behaviour.
Run the grep-backed thresholds listed under ## Acceptance Criteria above (heading count, mermaid block, Given/When/Then, MoSCoW count, idea.md citation, backup sibling). See references/verification-steps.md for the exact shell commands to run each check.