The Developer's Guide to Writing User Stories (with 20 Examples)
Learn to write clear, implementable user stories. 20 real examples with acceptance criteria in Given/When/Then format.
User stories are the building blocks of agile development. A good user story is clear enough that any developer (or AI agent) can implement it without a follow-up meeting.
The User Story Format
As a [type of user], I want [specific action] so that [clear benefit].
Example: As a registered user, I want to reset my password via email so that I can regain access to my account if I forget my credentials.
What Makes a Good User Story
INVEST Criteria
- Independent — Can be built without depending on other stories
- Negotiable — Details can be discussed and refined
- Valuable — Delivers value to the user
- Estimable — Small enough to estimate effort
- Small — Can be completed in one sprint
- Testable — Has clear acceptance criteria
Acceptance Criteria (Given/When/Then)
Every story needs acceptance criteria that define "done":
Given I am on the login page and have forgotten my password
When I click "Forgot Password" and enter my email
Then I receive a password reset email within 2 minutes
20 Real Examples
Authentication
1. Sign Up: As a new user, I want to create an account with email and password so that I can access the application.
- Given I am on the signup page, When I enter a valid email and password (8+ chars), Then my account is created and I am logged in.
2. Social Login: As a user, I want to sign in with GitHub so that I don't need to remember another password.
- Given I am on the login page, When I click "Sign in with GitHub" and authorize, Then I am logged in with my GitHub profile.
3. Password Reset: As a user who forgot my password, I want to reset it via email so that I can regain access.
- Given I click "Forgot Password", When I enter my email, Then I receive a reset link that expires in 1 hour.
Core Features
4. Create Item: As a user, I want to create a new project so that I can organize my work.
- Given I am on the dashboard, When I click "New Project" and enter a name, Then the project is created and I see its board.
5. Search: As a user, I want to search across all my stories so that I can quickly find what I'm looking for.
- Given I am on any page, When I press Cmd+K and type a query, Then I see matching stories ranked by relevance.
And 15 More...
[The remaining examples cover: drag-and-drop, notifications, settings, file upload, export, billing, integrations, admin, mobile, and accessibility scenarios]
Pro Tip: Let AI Write Your Stories
Writing good user stories is time-consuming. Codepylot's AI rewrite feature takes your rough idea ("add password reset") and generates a complete story with title, user story format, acceptance criteria, story points, and priority — in seconds.
Try the free User Story Generator tool to see it in action.
Explore More
Ready to ship faster?
Codepylot turns your ideas into shipped code with AI-powered story generation and autonomous coding agents.
Try Codepylot Free