.claude/skills/writing-feature-prds/SKILL.md
Use when starting a new feature, defining requirements before implementation, or when the user says "new feature", "create a spec", "create a PRD", or "feature PRD".
npx skillsauth add jamesgray-ai/handsonai writing-feature-prdsInstall 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.
Guide the user through creating a well-defined feature PRD (Product Requirements Document) before implementation.
Important: A PRD describes one feature — a single, buildable piece of work. If the user's idea is bigger than one feature (multiple epics, many capabilities), they should run /agentic-coding:writing-vision-briefs first to break it down. This skill takes one feature as input, not an entire vision.
| Phase | Goal |
|-------|------|
| 1. Define | Create PRD in a specs/ directory |
| 2. Stress-test | Review for gaps and ambiguities |
| 3. Track | GitHub issue with type:feature label |
| 4. Handoff | Move to plan mode for implementation planning |
First, figure out where the user is coming from:
Path A — Coming from a Vision Brief (recommended flow): If the user references a Vision Brief or a specific feature from a breakdown (e.g., "Write a PRD for email verification from specs/onboarding-vision.md"):
| Vision Brief Section | PRD Section | How to Translate |
|---------------------|-------------|-----------------|
| The Problem | Motivation | Scope the problem to this specific feature. Keep quantification from the brief. |
| Who Feels It | User Stories | Use as the user type(s) in story format. |
| Stakeholders | (note in issue) | Carry over to the GitHub issue body for review assignments. |
| Current State | Motivation | Add as context for why the current state is insufficient. |
| Alternatives Considered | Design Constraints | Note what was ruled out and why — these become constraints. |
| Strategic Context | Motivation | Include urgency signals that apply to this feature. |
| The Vision | Summary | Scope the vision statement down to this one feature. |
| Key Capabilities | User Stories + AC | Map relevant capabilities to stories with [MUST]/[SHOULD]/[COULD] criteria. |
| Inspiration | UI/UX Requirements | Pull in relevant design references for user-facing features. |
| What Success Looks Like | Success Metrics | Translate early signals and real outcomes into measurable metrics for this feature. |
| Risks & Assumptions | Open Questions | Surface risks that apply to this feature as questions to resolve. |
| Dependencies | Dependencies & Prerequisites | Carry over dependencies relevant to this feature. |
| Constraints & Context | Design Constraints + NFRs | Split into design constraints and non-functional requirements. |
| Future Considerations | Future Considerations | Carry over items relevant to this feature's domain. |
Path B — Starting fresh (no Vision Brief): If the user doesn't mention a Vision Brief:
/agentic-coding:writing-vision-briefs first to break it into pieces? That way we can spec each piece clearly."Ask the user these questions to understand the feature:
Then create a PRD file. Use this structure for the PRD:
# Feature: [Feature Name]
**Epic:** [Epic Name] (issue #XX) — omit if standalone feature
**Vision Brief:** specs/[name]-vision.md — omit if no Vision Brief exists
## Summary
One-sentence description of the feature.
> *Example: "Add email verification to the signup flow so new accounts are confirmed before accessing the workspace."*
## Motivation
Why this feature needs to exist. What problem it solves. Include quantification where available.
> *Example: "12% of new accounts are created with invalid or disposable email addresses, generating ~40 bounced welcome emails per week and inflating our active user count. This wastes marketing spend on unreachable users and skews our activation metrics."*
## User Stories & Acceptance Criteria
### Story 1: [Short title]
**As a** [user type], **I want** [goal] **so that** [benefit].
**Acceptance Criteria:**
1. `[MUST]` [Yes/no verifiable statement]
2. `[MUST]` [Another verifiable statement]
3. `[SHOULD]` [A desirable but non-blocking criterion]
> *Example:*
> ### Story 1: Email verification on signup
> **As a** new user, **I want** to verify my email during signup **so that** my account is secured and I receive important notifications.
>
> **Acceptance Criteria:**
> 1. `[MUST]` Verification email is sent within 30 seconds of form submission
> 2. `[MUST]` Clicking the verification link activates the account and redirects to the dashboard
> 3. `[MUST]` Unverified accounts cannot access workspace features
> 4. `[SHOULD]` "Resend verification" button is available on the pending screen
> 5. `[COULD]` Verification link includes the user's name in the email greeting
### Story 2: [Short title]
**As a** [user type], **I want** [goal] **so that** [benefit].
**Acceptance Criteria:**
1. `[MUST]` [Yes/no verifiable statement]
### Global Acceptance Criteria
_Criteria that apply across all stories (e.g., performance, accessibility). Omit if none._
1. `[MUST]` [Yes/no verifiable statement]
## Scope
### In Scope
- [What this feature includes]
### Out of Scope
- [What this feature explicitly does NOT include]
## Approach
High-level technical approach and key design decisions. Keep this brief — detailed implementation planning happens in plan mode.
## Non-Functional Requirements
_Include only categories that are relevant to this feature. Omit categories that don't apply._
- **Performance:** [Response time targets, throughput requirements, resource limits]
- **Security:** [Authentication, authorization, data protection, input validation]
- **Accessibility:** [WCAG level, keyboard navigation, screen reader support]
- **Scalability:** [Expected load, growth projections, scaling approach]
- **Reliability:** [Uptime targets, graceful degradation, retry behavior]
- **Compatibility:** [Browsers, devices, OS versions, API versions]
## Error States
_What should happen when things go wrong? Cover the most likely failure scenarios._
| Scenario | Expected Behavior |
|----------|-------------------|
| [Error scenario 1] | [What the user sees/what happens] |
| [Error scenario 2] | [What the user sees/what happens] |
> *Example:*
> | Scenario | Expected Behavior |
> |----------|-------------------|
> | Invalid email format entered | Inline validation message: "Please enter a valid email address." Form does not submit. |
> | Verification link expired (>24h) | Landing page shows "Link expired" with a "Resend verification" button. |
> | Email delivery fails | System retries once after 5 minutes. If still failed, logs error and shows "Didn't receive it?" prompt. |
## Success Metrics & Instrumentation
_How will you know this feature is working? Define what to measure and when to evaluate._
- **Primary metric:** [The one number that tells you this worked]
- **Secondary metrics:** [Supporting indicators]
- **Events to track:** [Specific user actions or system events to instrument]
- **Evaluation timeline:** [When to check — e.g., "2 weeks post-launch for early signal, 6 weeks for full assessment"]
## Dependencies & Prerequisites
_Omit this section if there are no dependencies._
- [Feature, data source, API, or tool that must exist first]
- [Decision that must be made before implementation]
## Migration & Rollback
_Omit this section if the feature doesn't change existing behavior, data, or URLs._
- **Migration plan:** [How existing users/data transition to the new behavior]
- **Rollback plan:** [How to revert if something goes wrong]
- **Backwards compatibility:** [What stays the same for existing users during transition]
## UI/UX Requirements
_Omit this section for non-user-facing features (APIs, background jobs, infrastructure)._
- **Key interactions:** [Primary user flows and interaction patterns]
- **Copy & messaging:** [Key labels, error messages, confirmation text]
- **Responsive behavior:** [How it adapts across screen sizes, if applicable]
- **Design references:** [Links to wireframes, mockups, or inspiration screenshots]
## Design Constraints
Constraints the implementation must respect — technical boundaries, conventions, and decisions that limit how the feature can be built. This is NOT an implementation plan.
- [Constraint 1 — e.g., "Must use the existing auth middleware, not a custom solution"]
- [Constraint 2 — e.g., "Must work without JavaScript for core functionality"]
- [Constraint 3 — e.g., "Must not introduce new runtime dependencies"]
## Verification
Step-by-step instructions to verify the feature works end-to-end after implementation. Cover the happy path and at least one error/edge case.
## Open Questions
- [Any unresolved decisions or questions]
## Future Considerations
_Ideas that came up during requirements gathering but are out of scope for this feature. A parking lot for good ideas worth remembering._
- [Future idea 1]
- [Future idea 2]
## Revision History
_Track significant changes to this PRD after initial draft._
| Date | Change | Author |
|------|--------|--------|
| [date] | Initial draft | [name] |
Choose the PRD location based on what exists in the repo:
specs/ directory exists, use specs/[feature-name]-prd.mddocs/specs/ directory exists, use docs/specs/[feature-name]-prd.mdspecs/[feature-name]-prd.mdEach user story gets its own acceptance criteria directly beneath it. This keeps requirements traceable — you can verify which criteria map to which user goal without jumping between sections.
Story guidelines:
Acceptance criteria rules:
[MUST] (required for launch), [SHOULD] (important but not blocking), or [COULD] (nice to have, build if time permits)After drafting the PRD, review it critically:
"Let me review this PRD critically. What edge cases are missing? Which acceptance criteria are ambiguous?"
Check for:
Iterate with the user until the PRD is solid.
Once the PRD is finalized, create a GitHub issue to track the feature. A GitHub issue is a to-do item in your project that links back to the PRD so you can track progress, leave comments, and close it when the feature ships.
gh issue create --title "[Feature] Feature Name" --label "type:feature" --body "..."
The issue body should include:
The PRD defines what to build. The next step is planning how to build it — Claude will enter plan mode to explore the codebase, design the approach, and break the work into implementation tasks before writing any code.
Tell the user:
"Your PRD and issue are ready. The next step is planning the implementation. Tell Claude:
'Plan the implementation for specs/[feature-name]-prd.md (tracked in issue #XX)'
Claude will enter plan mode — it'll explore your codebase, design the approach, and present an implementation plan for your approval before writing any code."
See workflow-checklist.md for a condensed checklist.
documentation
Write Standard Operating Procedure documentation for workflows and save as markdown files. Selects full or lightweight SOP template based on autonomy level (deterministic vs. guided/autonomous), then adapts for workflow type (Manual, Augmented, Automated). Use when the user asks to write an SOP, document a workflow, create procedure documentation, or capture how a workflow is executed. Triggers on "write an SOP", "document this workflow", "create operating instructions", "how is this workflow executed".
documentation
Write Business Process Guide documentation that explains when, why, and how to execute a complete business process with its component workflows, and save as markdown files. Use when documenting a business process end-to-end, creating playbooks, or explaining how multiple workflows fit together. Triggers on "write process guide", "document this process", "create a playbook for", "how do these workflows connect".
development
This skill should be used when the user wants to sync skills to GitHub, push skill changes to a remote repository, or back up local skills. Syncs Claude Agent Skills from ~/.claude/skills/ (local) to GitHub repository using git commands. Commits changes, pushes to remote, and updates Notion AI Building Blocks with GitHub URLs.
development
This skill should be used when the user wants to register or update AI building blocks (Skills, Agents, Prompts, Context MDs) in the Notion AI Building Blocks database. Triggers after skill creation, agent creation, prompt authoring, context MD updates, or when the user asks to register, add, or track a building block in Notion.