
User Story
Write tight user stories and Given/When/Then acceptance criteria agents and QA can actually test.
Overview
user-story is an agent skill most often used in Build (also Validate scope) that teaches well-formed user stories and testable Given/When/Then acceptance criteria via good-vs-bad examples.
Install
npx skills add https://github.com/deanpeters/product-manager-skills --skill user-storyWhat is this skill?
- Contrasts a good story (specific persona, clear OAuth flow) with a vague failing example
- Enforces testable acceptance criteria: one When, one Then, scoped scenario
- Summary + As/I want/so that structure with explicit motivation
- Flags anti-patterns like generic "user" and unverifiable outcomes
- Numbered user story examples (e.g. User Story 042) for copy-paste patterns
- Includes numbered examples such as User Story 042 and User Story 999 (bad example)
Adoption & trust: 2.2k installs on skills.sh; 5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your backlog items read like "user wants better login" and nobody can write tests or estimate them.
Who is it for?
Indie builders drafting MVP scope or agent-ready tickets without a dedicated PM.
Skip if: Teams that already enforce a rigid Jira template and only need API integration—not story craft.
When should I use this skill?
User needs to draft or refine user stories, acceptance criteria, or compare good vs bad story patterns.
What do I get? / Deliverables
Stories name a specific persona, a clear action, and acceptance criteria QA can verify in one scenario path.
- User story with summary and As/I want/so that
- Scenario-based acceptance criteria
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
PM artifacts belong on the Build shelf because they translate validated intent into buildable, testable units. pm is where backlog items, personas, and acceptance criteria are defined before implementation.
Where it fits
Turn "Google login for trials" into a scoped story before committing eng time.
Number stories and attach Given/When/Then blocks agents can implement in order.
Derive manual or automated test cases directly from acceptance criteria bullets.
How it compares
Story-quality patterns and examples, not a codegen or testing runner.
Common Questions / FAQ
Who is user-story for?
Solo founders and small teams who write their own specs and want agent-friendly, testable user stories.
When should I use user-story?
Use it in Validate when scoping an MVP flow, in Build pm when splitting OAuth or onboarding work, or before handing requirements to an coding agent.
Is user-story safe to install?
It is documentation-style guidance with no built-in shell access in the excerpt; check the Security Audits panel on this Prism page for the packaged skill.
SKILL.md
READMESKILL.md - User Story
# User Story Examples ## Example 1: Good User Story ```markdown ### User Story 042: - **Summary:** Enable Google login for trial users to reduce signup friction #### Use Case: - **As a** trial user visiting the app for the first time - **I want to** log in using my Google account - **so that** I can access the app without creating and remembering a new password #### Acceptance Criteria: - **Scenario:** First-time trial user logs in via Google OAuth - **Given:** I am on the login page - **and Given:** I have a Google account - **and Given:** The "Sign in with Google" button is visible - **When:** I click the "Sign in with Google" button and authorize the app - **Then:** I am logged into the app and redirected to the onboarding flow ``` **Why this works:** - Persona is specific ("trial user visiting for the first time") - Action is clear ("log in using my Google account") - Outcome explains motivation ("without creating a new password") - Acceptance criteria are testable (QA can verify each step) - Only one When, one Then (appropriately scoped) --- ## Example 2: Bad User Story (Too Vague) ```markdown ### User Story 999: - **Summary:** Improve login experience #### Use Case: - **As a** user - **I want to** better login - **so that** I can use the app #### Acceptance Criteria: - **Scenario:** User logs in - **Given:** I want to log in - **and Given:** I have an active account - **When:** I log in - **Then:** It works better ``` **Why this fails:** - "User" is too generic (trial user? returning user? admin?) - "Better login" is not an action (what specifically?) - "Use the app" is not a specific outcome (everyone wants to use the app) - Acceptance criteria are untestable ("works better" = unmeasurable) **How to fix it:** - Narrow the persona: "trial user," "returning user without password manager," etc. - Define the action: "log in using Google," "reset my password via email," etc. - Specify the outcome: "without remembering a new password," "in under 30 seconds," etc. - Make acceptance criteria falsifiable: "Then I am redirected to the dashboard within 2 seconds" --- ## Example 3: Story That Needs Splitting ```markdown ### User Story 100: - **Summary:** Manage shopping cart #### Use Case: - **As a** shopper - **I want to** add items, remove items, update quantities, apply coupons, and checkout - **so that** I can complete my purchase #### Acceptance Criteria: - **Scenario:** Shopping cart management - **Given:** I have items in my cart - **When:** I add an item - **Then:** It appears in the cart - **When:** I remove an item - **Then:** It disappears from the cart - **When:** I update quantity - **Then:** The quantity changes - **When:** I apply a coupon - **Then:** The discount is applied - **When:** I checkout - **Then:** I proceed to payment ``` **Why this needs splitting:** - Multiple "When" statements = multiple stories - Scope is too large for a single sprint - Different outcomes aren't related (adding items ≠ applying coupons) **How to split it:** Use `skills/user-story-splitting/SKILL.md` to break this into: 1. "Add items to cart" 2. "Remove items from cart" 3. "Update item quantities" 4. "Apply discount coupons" 5. "Checkout and proceed to payment" Each becomes its own story with focused acceptance criteria. #!/usr/bin/env python3 """Generate a user story Markdown snippet from CLI inputs. No network access. Prints to stdout. """ import argparse import sys def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser( description="Generate a user story with Gherkin-style acceptance criteria.", ) parser.add_argument("--summary", help="Short summary/title for the story.") parser.add_argument("--persona", help='Persona or role for "As a".') parser.add_argument("--action", help='Action for "I want to".') parser.add_argument("--outcome", help='Outcome for "so that".') parser.add_argument("--scenario", help="Scenario description.") parser.add_argum