product-spec
Generate PRODUCT_SPEC.md through guided Q&A. Use as the first step when starting a new greenfield project.
Best use case
product-spec is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate PRODUCT_SPEC.md through guided Q&A. Use as the first step when starting a new greenfield project.
Teams using product-spec should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/product-spec/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How product-spec Compares
| Feature / Agent | product-spec | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate PRODUCT_SPEC.md through guided Q&A. Use as the first step when starting a new greenfield project.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
Generate a product specification document for the current project.
## Workflow
Copy this checklist and track progress:
```
Product Spec Progress:
- [ ] Step 1: Directory guard
- [ ] Step 2: Project root confirmation
- [ ] Step 3: Check for existing PRODUCT_SPEC.md
- [ ] Step 4: Conduct guided Q&A with user
- [ ] Step 5: Write PRODUCT_SPEC.md
- [ ] Step 6: Handle deferred decisions
- [ ] Step 7: Review and refine with user
- [ ] Step 8: Suggest next step (/technical-spec)
```
## Directory Guard
1. If `.toolkit-marker` exists in the current working directory → **STOP**:
"You're in the toolkit repo. Run this from your project directory instead:
`cd ~/Projects/your-project && /product-spec`"
## Project Root Confirmation
Before generating any files, confirm the output location with the user:
```
Will write PRODUCT_SPEC.md to: {absolute path of cwd}/
Continue? (Yes / Change directory)
```
If the user says "Change directory", ask for the correct path and instruct them to `cd` there first.
## Existing File Guard (Prevent Overwrite)
Before asking any questions, check whether `PRODUCT_SPEC.md` already exists in the current directory.
- If it does not exist: continue normally.
- If it exists: **STOP** and ask the user what to do:
1. **Backup then overwrite (recommended)**: read the existing file and write it to `PRODUCT_SPEC.md.bak.YYYYMMDD-HHMMSS`, then write the new document to `PRODUCT_SPEC.md`
2. **Overwrite**: replace `PRODUCT_SPEC.md` with the new document
3. **Abort**: do not write anything; suggest they rename/move the existing file first
## Process
Read `.claude/skills/product-spec/PROMPT.md` and follow its instructions exactly:
1. Ask the user to describe their idea
2. Work through each question category (Problem, Users, Experience, Features, Data)
3. Make recommendations with confidence levels
4. Generate the final PRODUCT_SPEC.md document
## Output
Write the completed specification to `PRODUCT_SPEC.md` in the current directory.
After writing PRODUCT_SPEC.md, verify the file exists and is non-empty by reading the first few lines. If the file was not created successfully, report the error and retry.
## Deferred Requirements Capture (During Q&A)
**IMPORTANT:** Capture deferred requirements interactively during the Q&A process, not after.
### When to Trigger
During the Q&A, watch for signals that the user is deferring a requirement:
- "out of scope"
- "not for MVP" / "post-MVP"
- "v2" / "version 2" / "future"
- "later" / "eventually"
- "maybe" / "nice to have"
- "we'll skip that for now"
- "not right now"
- "that's a separate thing"
### Capture Flow
When you detect a deferral signal, immediately use AskUserQuestion:
```
Question: "Would you like to save this to your deferred requirements?"
Header: "Defer?"
Options:
- "Yes, capture it" — I'll ask a few quick questions to document it
- "No, skip" — Don't record this
```
**If user selects "Yes, capture it":**
Ask these clarifying questions (can be combined into one AskUserQuestion with multiple questions):
1. **What's being deferred?**
"In one sentence, what's the requirement or feature?"
(Pre-fill with your understanding from context)
2. **Why defer it?**
Options: "Out of scope for MVP" / "Needs more research" / "V2 feature" / "Resource constraints" / "Other"
3. **Notes for later?**
"Any context that will help when revisiting this?"
(Optional — user can skip)
### Write to DEFERRED.md Immediately
After collecting answers, append to `DEFERRED.md` right away (don't wait until end).
**If file doesn't exist, create it:**
```markdown
# Deferred Requirements
> Captured during specification Q&A. Review when planning future versions.
## From PRODUCT_SPEC.md ({date})
| Requirement | Reason | Notes |
|-------------|--------|-------|
| {user's answer} | {selected reason} | {notes or "—"} |
```
**If file exists, append:**
```markdown
| {user's answer} | {selected reason} | {notes or "—"} |
```
(If appending to a different spec's section, add a new section header first.)
### Continue Q&A
After capturing (or skipping), continue the spec Q&A where you left off. Don't break the flow.
## Cross-Model Review (Automatic)
After writing PRODUCT_SPEC.md, run cross-model review if Codex CLI is available:
1. Check if Codex CLI is installed: `codex --version`
2. If available, run `/codex-consult` on the generated document
3. Present any findings to the user before proceeding
**Consultation invocation:**
```
/codex-consult --research "product requirements, user stories" PRODUCT_SPEC.md
```
**If Codex finds issues:**
- Show critical issues and recommendations
- Ask user: "Address findings before proceeding?" (Yes/No)
- If Yes: Apply suggested fixes
- If No: Continue with noted issues
**If Codex unavailable:** Skip silently and proceed to Next Step.
## Error Handling
| Situation | Action |
|-----------|--------|
| PROMPT.md not found at `.claude/skills/product-spec/PROMPT.md` | Stop and report "Skill asset missing — reinstall toolkit or run /setup" |
| DEFERRED.md write fails (permissions or disk) | Output deferred items to terminal, warn user, continue with spec generation |
| Codex CLI invocation fails or times out | Log the error, skip cross-model review, proceed to Next Step |
## Next Step
When complete, inform the user:
```
PRODUCT_SPEC.md created at ./PRODUCT_SPEC.md
Deferred Requirements: {count} items captured to DEFERRED.md
Cross-Model Review: PASSED | PASSED WITH NOTES | SKIPPED
Next: Run /technical-spec
```Related Skills
a11y-specialist
Expert in web accessibility (WCAG 2.1/2.2 AA/AAA compliance), ARIA patterns, keyboard navigation, screen reader testing, color contrast, focus management, and automated accessibility testing
u01859-handoff-contracting-for-product-management-execution
Operate the "Handoff Contracting for product management execution" capability in production for product management execution workflows. Use when mission execution explicitly requires this capability and outcomes must be reproducible, policy-gated, and handoff-ready.
spec-prd-creator
Generate a Product Requirements Document (PRD) for a new feature. Use when planning a feature, starting a new project, or when asked to create a PRD. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out.
productlane-automation
Automate Productlane tasks via Rube MCP (Composio). Always search tools first for current schemas.
production-scheduling
Codified expertise for production scheduling, job sequencing, line balancing, changeover optimisation, and bottleneck resolution in discrete and batch manufacturing.
production-principles
Production-ready development principles balancing simplicity with reliability for 10-100 MSP scale
Productboard Automation
Automate product management workflows in Productboard -- manage features, notes, objectives, components, and releases through natural language commands.
product-naming
Use when brainstorming product names, company names, or brand names. Based on David Placek's Lexicon Branding methodology (Vercel, Swiffer, Sonos, Azure, BlackBerry).
product-manager-toolkit
Comprehensive toolkit for product managers including RICE prioritization, customer interview analysis, PRD templates, discovery frameworks, and go-to-market strategies. Use for feature prioritizati...
product-discovery
Conducts discovery sessions for features/products. Explores concept definition, business model, user journeys, competitive analysis, scoping decisions, and data modeling. Use when you need to explore "what is X", "let's understand", "discovery for", or the /discovery command.
new-product
Deep research and architecture design for new product development
gspec-epic
Break down a large epic into multiple focused feature PRDs with dependency mapping