
User Story Writing
Turn a feature idea into sprint-ready user stories with Gherkin acceptance criteria and explicit non-functional requirements.
Overview
User Story Writing is an agent skill most often used in Validate (also Build PM) that models user stories with Gherkin acceptance criteria and non-functional requirements for testable feature scope.
Install
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill user-story-writingWhat is this skill?
- Gherkin-style Given/When/Then scenarios for happy path, edit, delete, and error flows
- Dedicated security and PCI-oriented acceptance scenarios (HTTPS, no full PAN in page source)
- Non-functional requirements block (performance, usability, reliability targets)
- YAML-framed story + criteria template you can paste into specs or tickets
- Example story includes 5 Gherkin-style acceptance scenarios
- Non-functional block covers performance, usability, and reliability targets
Adoption & trust: 614 installs on skills.sh; 250 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You know what feature you want but lack concrete, testable acceptance criteria your agent or QA can run against.
Who is it for?
Indie SaaS builders scoping checkout, settings, or account flows who want BDD-style criteria before writing code.
Skip if: Teams that already maintain a locked spec in Jira with signed-off criteria and no need for agent-generated story templates.
When should I use this skill?
Scoping a feature, writing backlog items, or defining testable acceptance criteria before implementation.
What do I get? / Deliverables
You get a repeatable story-and-scenario pattern—ready to adapt per feature—so implementation and testing share one definition of done.
- User story with role/goal phrasing
- Multi-scenario acceptance criteria
- Non-functional requirements list
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
User stories and acceptance criteria are the canonical artifact for locking scope before and during implementation—best shelved under Validate so builders find them when scoping features. Scope is where solo builders define what “done” means; this skill’s YAML/Gherkin examples fit defining and refining feature boundaries.
Where it fits
Draft save-payment-method stories with five scenarios before estimating build time.
Paste the YAML pattern into a spec file so the agent implements only what criteria cover.
Convert each Given/When/Then block into manual or E2E test steps.
How it compares
Use instead of vague bullet acceptance lists that agents cannot turn into automated or manual test cases.
Common Questions / FAQ
Who is user-story-writing for?
Solo builders and small teams using AI coding agents who need sprint-ready stories and Given/When/Then criteria without a dedicated product manager.
When should I use user-story-writing?
During Validate when scoping a feature, during Build PM when breaking epics into stories, and before Ship testing when you want scenarios that map directly to QA checks.
Is user-story-writing safe to install?
It is prompt and example content only—review the Security Audits panel on this page before installing any skill from the repo.
SKILL.md
READMESKILL.md - User Story Writing
# Acceptance Criteria Examples ## Acceptance Criteria Examples ```yaml Story: As a customer, I want to save payment methods so I can checkout faster Acceptance Criteria: Scenario 1: Add a new payment method Given I'm logged in And I'm on the payment settings page When I click "Add payment method" And I enter valid payment details And I click "Save" Then the payment method is saved And I see a success message And the new method appears in my saved list Scenario 2: Edit existing payment method Given I have saved payment methods When I click "Edit" on a method And I change the expiration date And I click "Save" Then the changes are saved And other fields are unchanged Scenario 3: Delete a payment method Given I have multiple saved payment methods When I click "Delete" on a method And I confirm the deletion Then the method is removed And my default method is updated if needed Scenario 4: Error handling Given I enter invalid payment information When I click "Save" Then I see an error message And the method is not saved And I'm returned to the form to correct Scenario 5: Security Given the payment form is displayed When I view the page source Then I don't see full payment numbers (PCI compliance) And credit card data is encrypted And the connection is HTTPS --- Non-Functional Requirements: - Performance: Form save must complete in <2 seconds - Usability: Form must be completable in <3 steps - Reliability: 99.9% uptime for payment service - Accessibility: WCAG 2.1 AA compliance - Security: PCI DSS Level 1 compliance ``` # Story Estimation ## Story Estimation ```yaml Story Pointing Framework: 1 Point: Trivial - Update label text - Add CSS class - Simple config change - Time: <2 hours 2 Points: Very small - Add simple field to form - Update error message - Simple validation - Time: 2-4 hours 3 Points: Small - Create single page/component - Add basic API endpoint - Simple integration - Time: 4-8 hours 5 Points: Medium - Create feature with multiple interactions - Build API with multiple endpoints - Complex business logic - Time: 1-2 days 8 Points: Large - Feature spanning multiple pages - Complex integration - Multiple technical challenges - Time: 2-3 days 13 Points: Very large (TOO BIG - Split it!) - Should be split into smaller stories - Or elevated to epic - Time: >3 days --- Estimation Tips: - Use relative sizing (compare to known stories) - Consider unknowns and risks - Include non-coding time (testing, docs) - Account for team skill level - Be transparent about assumptions - Re-estimate after learning ``` # Story Refinement Process ## Story Refinement Process ```python # Story refinement and quality gates class UserStoryRefinement: QUALITY_GATES = { 'Independent': 'Story can be implemented independently', 'Negotiable': 'Details can be discussed and refined', 'Valuable': 'Delivers clear business value', 'Estimable': 'Team can estimate effort', 'Small': 'Can be completed in one sprint', 'Testable': 'Clear acceptance criteria' } def evaluate_story(self, story): """Assess story quality using INVEST criteria""" assessment = {} for criterion, description in self.QUALITY_GATES.items(): assessment[criterion] = self.check_criterion(story, criterion) return { 'story_id': story.id, 'assessment': assessment, 'ready_for_development': all(assessment.values()), 'issues': self.identify_issues(story), 'recommendations': self.provide_recommendations(story) } def check_criterion(self, story, criterion): """Evaluate against specific INVEST criterion""" checks = { 'Independent': lambda s: len(s.dependencies) == 0, 'Negotiable': lambda s: len(s.acceptance_criteria) > 0, 'Valu