user-stories

Write INVEST-compliant user stories with Given-When-Then acceptance criteria. Use when writing user stories, creating acceptance criteria, or during /design Step 4.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "user-stories" with this command: npx skills add b33eep/claude-code-setup/b33eep-claude-code-setup-user-stories

User Stories

Write high-quality, INVEST-compliant user stories with testable acceptance criteria.


User Story Template

As a [persona],
I want to [action/capability],
So that [benefit/value].

Example:

As a marketing manager,
I want to export campaign reports to PDF,
So that I can share results with stakeholders who don't have system access.

Story Types

TypeTemplateExample
FeatureAs a [persona], I want to [action] so that [benefit]As a user, I want to filter search results so that I find items faster
ImprovementAs a [persona], I need [capability] to [goal]As a user, I need faster page loads to complete tasks without frustration
Bug FixAs a [persona], I expect [behavior] when [condition]As a user, I expect my cart to persist when I refresh the page
EnablerAs a developer, I need to [technical task] to enable [capability]As a developer, I need to implement caching to enable instant search

Persona Reference

PersonaTypical NeedsContext
End UserEfficiency, simplicity, reliabilityDaily feature usage
AdministratorControl, visibility, securitySystem management
Power UserAutomation, customization, shortcutsExpert workflows
New UserGuidance, learning, safetyOnboarding

Adapt personas to your project. Use specific names when possible (e.g., "store owner" instead of "end user").


INVEST Criteria

Validate every story before adding it to the backlog:

CriterionQuestionPass If...
IndependentCan this be developed without other uncommitted stories?No blocking dependencies
NegotiableIs the implementation flexible?Multiple approaches possible
ValuableDoes this deliver user or business value?Clear benefit in "so that"
EstimableCan the team estimate this?Understood well enough to size
SmallCan this complete in one iteration?Reasonably scoped
TestableCan we verify this is done?Clear acceptance criteria

Acceptance Criteria

Given-When-Then Template

Given [precondition/context],
When [action/trigger],
Then [expected outcome].

Examples:

Given the user is logged in with valid credentials,
When they click the "Export" button,
Then a PDF download starts within 2 seconds.

Given the user has entered an invalid email format,
When they submit the registration form,
Then an inline error message displays "Please enter a valid email address."

Given the shopping cart contains items,
When the user refreshes the browser,
Then the cart contents remain unchanged.

AC Checklist

Each story should include criteria for applicable categories:

CategoryExample
Happy PathGiven valid input, When submitted, Then success message displayed
ValidationShould reject input when required field is empty
Error HandlingMust show user-friendly message when API fails
PerformanceShould complete operation within 2 seconds
AccessibilityMust be navigable via keyboard only

Not every category applies to every story. Use judgment.

Minimum Criteria by Story Size

SizeMinimum AC Count
Small (trivial)2-3 criteria
Medium4-6 criteria
Large5-8 criteria
Too largeSplit the story

INVEST Failure Patterns

CriterionRed FlagFix
Independent"After story X is done..."Combine stories or resequence
NegotiableSpecific implementation in storyFocus on outcome, not solution
ValuableNo "so that" clauseAdd benefit statement
EstimableTeam says "no idea"Spike first, then story
SmallToo large to finish in one iterationSplit into smaller stories
Testable"System should be better"Add measurable criteria

Story Splitting

When a story is too large, split using one of these techniques:

TechniqueExample
By workflow step"Create order" -> "Add items" + "Apply discount" + "Submit order"
By persona"User dashboard" -> "Admin dashboard" + "Member dashboard"
By data type"Import data" -> "Import CSV" + "Import Excel"
By operation"Manage users" -> "Add user" + "Edit user" + "Delete user"
Happy path first"Full feature" -> "Basic flow" + "Error handling" + "Edge cases"

Common Antipatterns

Story Antipatterns

AntipatternExampleFix
Solution story"Implement React component""Display user profile information"
Compound story"Create, edit, and delete users"Split into three stories
Missing persona"The system will...""As an admin, I want to..."
No benefit"I want to see a button"Add "so that [benefit]"
Too vague"Improve performance""Reduce page load to <2 seconds"
Technical jargon"Implement Redis caching""Enable instant search results"

Acceptance Criteria Antipatterns

AntipatternExampleFix
Too vague"Works correctly"Specific Given-When-Then
Implementation details"Use PostgreSQL query"Focus on outcome
Missing unhappy pathOnly success scenarioAdd error cases
Untestable"User is happy"Measurable behavior
Too many15+ criteriaSplit the story

References

  • Based on agile-product-owner by alirezarezvani (MIT License)
  • Adapted and reduced to user story focus only (no sprint planning, velocity tracking, or epic breakdown)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

standards-kotlin

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

youtube-transcript

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

standards-javascript

No summary provided by upstream source.

Repository SourceNeeds Review