skills/prd-generator/SKILL.md
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.
npx skillsauth add luongnv89/skills prd-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.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 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.
Phase 1 — Validate Input
◆ Validate Input (step 1 of 5 — input resolution)
··································································
Input files found: √ pass
Dependencies resolved: √ pass (PROJECT_DIR confirmed)
Backup created: √ pass | — skipped (no existing prd.md)
____________________________
Result: PASS | FAIL | PARTIAL
Phase 2 — Extract Context
◆ Extract Context (step 2 of 5 — context extraction)
··································································
idea.md parsed: √ pass (concept + technical context read)
validate.md parsed: √ pass (verdict + ratings extracted)
Context extracted: √ pass (idea.md + validate.md read)
____________________________
Result: PASS | FAIL | PARTIAL
Phase 3 — Clarify Requirements
◆ Clarify Requirements (step 3 of 5 — requirements gathering)
··································································
Questions answered: √ pass
Scope defined: √ pass (MVP timeframe confirmed)
Stakeholders identified: √ pass (team size, compliance noted)
____________________________
Result: PASS | FAIL | PARTIAL
Phase 4 — Generate PRD
◆ Generate PRD (step 4 of 5 — document generation)
··································································
10 sections written: √ pass
prd.md created: √ pass
Cross-references valid: √ pass (mermaid diagrams render)
____________________________
Result: PASS | FAIL | PARTIAL
Phase 5 — Output
◆ Output (step 5 of 5 — delivery)
··································································
File written: √ pass
Summary presented: √ pass
Next steps suggested: √ pass
____________________________
Result: PASS | FAIL | PARTIAL
After 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.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>If user wants to modify existing PRD:
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.
After generation, verify file exists, has >=10 ^## headings, >=1 mermaid block, >=1 Given/When/Then line, >=4 MoSCoW labels, cites idea.md, and (if applicable) a prd.backup.*.md sibling exists. See references/verification-steps.md for the exact shell checks.
documentation
Manage software releases end-to-end: bump version, generate changelog, tag, push, GitHub release, publish to PyPI/npm. Use when user asks to ship, cut a release, tag a version, or list changes since last tag. Skip routine commits and marketplace publishing.
development
Review UI for usability issues using Steve Krug's principles and produce a scannable report. Use when asked for a usability audit, UX review, or UI feedback on screenshots, URLs, or code. Don't use for visual/brand design critique, accessibility (WCAG) audits, or backend/API review.
development
Validate app/startup ideas with market, feasibility, commercial, and open-source competitor analysis. Use when asked to evaluate, validate, or score a product idea. Don't use for PRDs, go-to-market plans, or investor decks.
testing
Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews.