User Story Writer Skill

Write well-structured user stories with acceptance criteria and edge cases.

User Story Writer Skill — The Skill Playground: pick the Executive Update skill, fill in a few notes, hit run, and watch a structured executive… (from the mohitagw15856/pm-claude-skills README)

From the mohitagw15856/pm-claude-skills README — shows the whole collection, not only this skill. · view on GitHub

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/user-story-writer.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit mohitagw15856/pm-claude-skills/skills/user-story-writer#main ~/.claude/skills/user-story-writer

For one project only, change the path to .claude/skills/user-story-writer.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of User Story Writer Skill

Show the full text245 lines
namedescription
user-story-writerWrite well-structured user stories with acceptance criteria and edge cases. Use when asked to write user stories, create tickets from a feature brief, convert a PRD into stories, or write acceptance criteria. Produces ready-to-estimate stories in the standard format with clear acceptance criteria, edge cases, and definition of done.

User Story Writer Skill

This skill produces production-ready user stories from a feature brief, PRD section, or verbal description. Each story follows the standard format with a clear who/what/why, behavioural acceptance criteria in Given/When/Then format, edge cases, and definition of done. Output is ready to paste into Jira, Linear, or your planning tool.

Required Inputs

Ask the user for these if not provided:

  • Feature or change to break into stories — paste the brief, PRD section, or describe the feature
  • User types / personas involved (e.g. admin, end user, guest, API consumer)
  • Scope — are we writing one story or decomposing an epic into a full set of stories?
  • Acceptance criteria format preference — Given/When/Then, bullet checklist, or both?
  • Technical constraints or notes — anything the engineering team has flagged that should shape the stories

Output Structure

For each story:


Story: [Short title — verb + noun, e.g. "Filter search results by date range"]

Epic: [Parent epic name — e.g. "Advanced Search"] Story ID: [Jira/Linear ID — leave blank if not yet created] Priority: [P1 / P2 / P3] Story points: [Leave blank — for engineering to estimate]


User Story

As a [specific user type — not "user"], I want to [concrete action they want to take], So that [the outcome they achieve — business value, not feature description].

Example:

As an account manager, I want to filter my client list by last contact date, so that I can quickly identify clients I haven't spoken to in over 30 days and prioritise outreach.


Context

[1–3 sentences of context that aren't in the user story itself: when does this story matter, what triggers the need, how does it fit into a larger flow. This helps engineers understand why before they ask.]


Acceptance Criteria

Format: Given / When / Then

Each criterion tests one specific behaviour. Write one GWT per observable outcome — not one GWT for the whole feature.

AC1: [Short name for this criterion]

Given [starting state or context]
When [user action]
Then [observable system behaviour]

AC2: [Short name]

Given [...]
When [...]
Then [...]

AC3: [Short name]

Given [...]
When [...]
Then [...]

Edge Cases

[List scenarios that are non-obvious but must be handled. These become additional ACs or notes to engineering.]

  • [Edge case 1]: [e.g. User applies a date filter that returns 0 results — show empty state with clear messaging and a "clear filters" action]
  • [Edge case 2]: [e.g. User has >10,000 clients — filter must not degrade load time >200ms]
  • [Edge case 3]: [e.g. Date filter persists across page refresh — or explicitly should not if that's the decision]
  • [Permission edge case]: [e.g. Read-only users can see the filter but cannot save filter presets]

Out of Scope

[Explicitly state what this story does NOT cover — prevents scope creep and clarifies where the next story begins.]

  • Saving and sharing filter presets (separate story — see [Story X])
  • Bulk actions on filtered results
  • Exporting filtered client list to CSV

Definition of Done
  • Acceptance criteria all pass
  • Edge cases handled (or explicitly deferred with a new ticket raised)
  • Unit tests written for each AC
  • Works on mobile viewport (if applicable)
  • Accessibility: keyboard navigable and screen-reader compatible
  • Error states are handled and copy approved
  • Product and design have reviewed in staging
  • No console errors in production build

Epic Decomposition Template

If the user provides an epic or feature brief, decompose it into a full set of stories before writing them:

Epic: [Name] Goal: [What outcome does completing this epic achieve?] Stories:

# Story Notes Dependencies
1 [Core happy path story — the simplest version of the feature that delivers value]
2 [Validation / error handling story] Depends on #1
3 [Edge case or power user story] Depends on #1
4 [Admin or configuration story]
5 [Performance or scale story — if applicable] Depends on #1

Suggested sprint order: [Which stories are P1 for MVP? Which can follow in a later sprint?]


Common Story Anti-Patterns — and Fixes

Use these to review stories before handing to engineering:

Anti-pattern Example Fix
Solution in the story "As a user I want a dropdown filter" Remove the UI decision — "As a user I want to filter by date range"
Vague "so that" "so that it's easier to use" Make it specific — "so that I can prioritise outreach without opening each record manually"
Too big Story covers 5 distinct user flows Split into separate stories per flow
No acceptance criteria Story has description only Add at least 3 GWT criteria before engineering starts
ACs that test the solution, not the behaviour "Given the dropdown is open, When I select an option" Test the outcome — "Given I have applied a date filter, When I view my results, Then only clients last contacted in that date range appear"
Missing empty state No AC for what happens with 0 results Add it — empty states are part of the feature
Missing error state No AC for network failure or invalid input Add error handling ACs explicitly

Example: Full Story Set for a Feature

Feature brief: "Allow users to export their invoice history as a PDF or CSV"


Story 1: Export invoice list as CSV

As a finance admin, I want to export my invoice history as a CSV file, so that I can import it into our accounting software without manual data entry.

AC1: Successful export

Given I am on the Invoices page with at least one invoice
When I click "Export" and select "CSV"
Then a CSV file is downloaded containing all visible invoices with columns: Invoice ID, Date, Amount, Status, Customer Name

AC2: Empty state

Given I am on the Invoices page with no invoices
When I click "Export"
Then the export button is disabled and a tooltip reads "No invoices to export"

AC3: Filtered export

Given I have applied a date filter showing invoices from Jan 2026 only
When I click "Export" and select "CSV"
Then the export contains only invoices from Jan 2026 — not all invoices

Edge cases:

  • Export with >10,000 invoices — must complete in <30s or show a progress indicator
  • Export triggered on mobile — downloads to device's default download location

Out of scope: PDF export (Story 2), scheduled exports (future epic)


Story 2: Export invoice list as PDF

As a finance admin, I want to export my invoice history as a formatted PDF, so that I can share a professional summary with our accountant.

[... ACs follow same pattern ...]


Deeper Materials

This skill ships with support files — use them when they are available:

  • references/acceptance-criteria-craft.md — Acceptance Criteria That Actually Gate. Apply it while producing the output; it carries the calibration and judgment calls the method summary above compresses.
  • templates/story-card.md — a fill-in version of the deliverable with the quality gates inline. Offer it when the user wants to work the document themselves rather than have it generated.

Scoring Rubric (0–40)

Score any output of this skill before handing it over; 32+ is ship-quality.

Dimension 0 5 10
User voice & value Stories written from the system's or developer's perspective; "so that" is missing or circular ("so that it's easier") Personas are specific but some "so that" clauses describe the feature rather than the outcome the user gets Every story names a specific user type and a "so that" stating the concrete outcome they achieve — a stakeholder could read it and know why it's worth building
AC testability & granularity ACs missing, or prose descriptions with no pass/fail condition GWT format used, but criteria bundle multiple behaviours or test the UI solution instead of the observable outcome One GWT per observable behaviour, each with an unambiguous pass/fail condition, testing outcomes not implementation
Unhappy-path coverage Happy path only — no empty, error, or permission states anywhere Some edge cases listed, but key failure modes (empty state, mid-flow failure, permission boundaries) are missing or vague Empty states, error states, permission boundaries, and known technical constraints all appear as explicit ACs or edge cases with defined behaviour
Scope discipline & sizing Stories are epic-sized, interdependent, with no out-of-scope section Out of scope is present but generic; some stories too large to estimate or ship independently in one sprint Every story is sprint-sized and independently shippable, splits are recorded with their reason, and Out of Scope names where the next story begins

Quality Checks

  • Every story has a specific user type — not "a user" or "the system"
  • The "so that" explains business value — not just feature description
  • Each AC tests one observable outcome — not a bundle of behaviours
  • Empty states, error states, and edge cases are explicitly handled
  • Out of scope is documented — not assumed
  • Stories are independent — they can be shipped individually without depending on unreleased work (except where explicitly noted)

Anti-Patterns

  • Do not write user stories from a technical perspective — every story must be from the user's point of view and state their goal
  • Do not write acceptance criteria that are untestable — every criterion must have a clear pass/fail condition
  • Do not create stories that are too large to complete in a single sprint — break epics into estimable, independently deliverable stories
  • Do not omit edge cases — unhappy paths and error states are required, not optional
  • Do not skip the Definition of Done — without it, "done" means different things to different people

Example Trigger Phrases

  • "Write user stories for [feature] from this brief"
  • "Break this PRD section into user stories with acceptance criteria"
  • "Convert these feature requirements into Jira tickets"
  • "Write the user stories and ACs for [feature name]"
  • "Decompose this epic into individual stories ready for sprint planning"
1---
2name: user-story-writer
3description: "Write well-structured user stories with acceptance criteria and edge cases. Use when asked to write user stories, create tickets from a feature brief, convert a PRD into stories, or write acceptance criteria. Produces ready-to-estimate stories in the standard format with clear acceptance criteria, edge cases, and definition of done."
4---
5 
6# User Story Writer Skill
7 
8This skill produces production-ready user stories from a feature brief, PRD section, or verbal description. Each story follows the standard format with a clear who/what/why, behavioural acceptance criteria in Given/When/Then format, edge cases, and definition of done. Output is ready to paste into Jira, Linear, or your planning tool.
9 
10## Required Inputs
11 
12Ask the user for these if not provided:
13- **Feature or change** to break into stories — paste the brief, PRD section, or describe the feature
14- **User types / personas** involved (e.g. admin, end user, guest, API consumer)
15- **Scope** — are we writing one story or decomposing an epic into a full set of stories?
16- **Acceptance criteria format preference** — Given/When/Then, bullet checklist, or both?
17- **Technical constraints or notes** — anything the engineering team has flagged that should shape the stories
18 
19## Output Structure
20 
21For each story:
22 
23---
24 
25## Story: [Short title — verb + noun, e.g. "Filter search results by date range"]
26 
27**Epic:** [Parent epic name — e.g. "Advanced Search"]
28**Story ID:** [Jira/Linear ID — leave blank if not yet created]
29**Priority:** [P1 / P2 / P3]
30**Story points:** [Leave blank — for engineering to estimate]
31 
32---
33 
34### User Story
35 
36> **As a** [specific user type — not "user"],
37> **I want to** [concrete action they want to take],
38> **So that** [the outcome they achieve — business value, not feature description].
39 
40**Example:**
41> As an **account manager**,
42> I want to **filter my client list by last contact date**,
43> so that I **can quickly identify clients I haven't spoken to in over 30 days and prioritise outreach**.
44 
45---
46 
47### Context
48 
49[1–3 sentences of context that aren't in the user story itself: when does this story matter, what triggers the need, how does it fit into a larger flow. This helps engineers understand why before they ask.]
50 
51---
52 
53### Acceptance Criteria
54 
55**Format: Given / When / Then**
56 
57Each criterion tests one specific behaviour. Write one GWT per observable outcome — not one GWT for the whole feature.
58 
59**AC1: [Short name for this criterion]**
60```
61Given [starting state or context]
62When [user action]
63Then [observable system behaviour]
64```
65 
66**AC2: [Short name]**
67```
68Given [...]
69When [...]
70Then [...]
71```
72 
73**AC3: [Short name]**
74```
75Given [...]
76When [...]
77Then [...]
78```
79 
80---
81 
82### Edge Cases
83 
84[List scenarios that are non-obvious but must be handled. These become additional ACs or notes to engineering.]
85 
86- [ ] **[Edge case 1]:** [e.g. User applies a date filter that returns 0 results — show empty state with clear messaging and a "clear filters" action]
87- [ ] **[Edge case 2]:** [e.g. User has >10,000 clients — filter must not degrade load time >200ms]
88- [ ] **[Edge case 3]:** [e.g. Date filter persists across page refresh — or explicitly should not if that's the decision]
89- [ ] **[Permission edge case]:** [e.g. Read-only users can see the filter but cannot save filter presets]
90 
91---
92 
93### Out of Scope
94 
95[Explicitly state what this story does NOT cover — prevents scope creep and clarifies where the next story begins.]
96 
97- Saving and sharing filter presets (separate story — see [Story X])
98- Bulk actions on filtered results
99- Exporting filtered client list to CSV
100 
101---
102 
103### Definition of Done
104 
105- [ ] Acceptance criteria all pass
106- [ ] Edge cases handled (or explicitly deferred with a new ticket raised)
107- [ ] Unit tests written for each AC
108- [ ] Works on mobile viewport (if applicable)
109- [ ] Accessibility: keyboard navigable and screen-reader compatible
110- [ ] Error states are handled and copy approved
111- [ ] Product and design have reviewed in staging
112- [ ] No console errors in production build
113 
114---
115 
116## Epic Decomposition Template
117 
118If the user provides an epic or feature brief, decompose it into a full set of stories before writing them:
119 
120**Epic:** [Name]
121**Goal:** [What outcome does completing this epic achieve?]
122**Stories:**
123 
124| # | Story | Notes | Dependencies |
125|---|---|---|---|
126| 1 | [Core happy path story — the simplest version of the feature that delivers value] | | |
127| 2 | [Validation / error handling story] | | Depends on #1 |
128| 3 | [Edge case or power user story] | | Depends on #1 |
129| 4 | [Admin or configuration story] | | |
130| 5 | [Performance or scale story — if applicable] | | Depends on #1 |
131 
132**Suggested sprint order:** [Which stories are P1 for MVP? Which can follow in a later sprint?]
133 
134---
135 
136## Common Story Anti-Patterns — and Fixes
137 
138Use these to review stories before handing to engineering:
139 
140| Anti-pattern | Example | Fix |
141|---|---|---|
142| **Solution in the story** | "As a user I want a dropdown filter" | Remove the UI decision — "As a user I want to filter by date range" |
143| **Vague "so that"** | "so that it's easier to use" | Make it specific — "so that I can prioritise outreach without opening each record manually" |
144| **Too big** | Story covers 5 distinct user flows | Split into separate stories per flow |
145| **No acceptance criteria** | Story has description only | Add at least 3 GWT criteria before engineering starts |
146| **ACs that test the solution, not the behaviour** | "Given the dropdown is open, When I select an option" | Test the outcome — "Given I have applied a date filter, When I view my results, Then only clients last contacted in that date range appear" |
147| **Missing empty state** | No AC for what happens with 0 results | Add it — empty states are part of the feature |
148| **Missing error state** | No AC for network failure or invalid input | Add error handling ACs explicitly |
149 
150---
151 
152## Example: Full Story Set for a Feature
153 
154**Feature brief:** "Allow users to export their invoice history as a PDF or CSV"
155 
156---
157 
158### Story 1: Export invoice list as CSV
159 
160> As a **finance admin**,
161> I want to **export my invoice history as a CSV file**,
162> so that I can **import it into our accounting software without manual data entry**.
163 
164**AC1: Successful export**
165```
166Given I am on the Invoices page with at least one invoice
167When I click "Export" and select "CSV"
168Then a CSV file is downloaded containing all visible invoices with columns: Invoice ID, Date, Amount, Status, Customer Name
169```
170 
171**AC2: Empty state**
172```
173Given I am on the Invoices page with no invoices
174When I click "Export"
175Then the export button is disabled and a tooltip reads "No invoices to export"
176```
177 
178**AC3: Filtered export**
179```
180Given I have applied a date filter showing invoices from Jan 2026 only
181When I click "Export" and select "CSV"
182Then the export contains only invoices from Jan 2026 — not all invoices
183```
184 
185**Edge cases:**
186- [ ] Export with >10,000 invoices — must complete in <30s or show a progress indicator
187- [ ] Export triggered on mobile — downloads to device's default download location
188 
189**Out of scope:** PDF export (Story 2), scheduled exports (future epic)
190 
191---
192 
193### Story 2: Export invoice list as PDF
194 
195> As a **finance admin**,
196> I want to **export my invoice history as a formatted PDF**,
197> so that I can **share a professional summary with our accountant**.
198 
199[... ACs follow same pattern ...]
200 
201---
202 
203## Deeper Materials
204 
205This skill ships with support files — use them when they are available:
206 
207- **`references/acceptance-criteria-craft.md`** — Acceptance Criteria That Actually Gate. Apply it while producing the output; it carries the calibration and judgment calls the method summary above compresses.
208- **`templates/story-card.md`** — a fill-in version of the deliverable with the quality gates inline. Offer it when the user wants to work the document themselves rather than have it generated.
209 
210## Scoring Rubric (0–40)
211 
212Score any output of this skill before handing it over; 32+ is ship-quality.
213 
214| Dimension | 0 | 5 | 10 |
215|---|---|---|---|
216| **User voice & value** | Stories written from the system's or developer's perspective; "so that" is missing or circular ("so that it's easier") | Personas are specific but some "so that" clauses describe the feature rather than the outcome the user gets | Every story names a specific user type and a "so that" stating the concrete outcome they achieve — a stakeholder could read it and know why it's worth building |
217| **AC testability & granularity** | ACs missing, or prose descriptions with no pass/fail condition | GWT format used, but criteria bundle multiple behaviours or test the UI solution instead of the observable outcome | One GWT per observable behaviour, each with an unambiguous pass/fail condition, testing outcomes not implementation |
218| **Unhappy-path coverage** | Happy path only — no empty, error, or permission states anywhere | Some edge cases listed, but key failure modes (empty state, mid-flow failure, permission boundaries) are missing or vague | Empty states, error states, permission boundaries, and known technical constraints all appear as explicit ACs or edge cases with defined behaviour |
219| **Scope discipline & sizing** | Stories are epic-sized, interdependent, with no out-of-scope section | Out of scope is present but generic; some stories too large to estimate or ship independently in one sprint | Every story is sprint-sized and independently shippable, splits are recorded with their reason, and Out of Scope names where the next story begins |
220 
221## Quality Checks
222 
223- [ ] Every story has a specific user type — not "a user" or "the system"
224- [ ] The "so that" explains business value — not just feature description
225- [ ] Each AC tests one observable outcome — not a bundle of behaviours
226- [ ] Empty states, error states, and edge cases are explicitly handled
227- [ ] Out of scope is documented — not assumed
228- [ ] Stories are independent — they can be shipped individually without depending on unreleased work (except where explicitly noted)
229 
230## Anti-Patterns
231 
232- [ ] Do not write user stories from a technical perspective — every story must be from the user's point of view and state their goal
233- [ ] Do not write acceptance criteria that are untestable — every criterion must have a clear pass/fail condition
234- [ ] Do not create stories that are too large to complete in a single sprint — break epics into estimable, independently deliverable stories
235- [ ] Do not omit edge cases — unhappy paths and error states are required, not optional
236- [ ] Do not skip the Definition of Done — without it, "done" means different things to different people
237 
238## Example Trigger Phrases
239 
240- "Write user stories for [feature] from this brief"
241- "Break this PRD section into user stories with acceptance criteria"
242- "Convert these feature requirements into Jira tickets"
243- "Write the user stories and ACs for [feature name]"
244- "Decompose this epic into individual stories ready for sprint planning"
245 

Discussion

Alternatives

Also in Specs & PRDsSee all 277 in Product →