create-user-stories
Skill8 starsChanged 9 months agoMITView on GitHub
Generate user story map with BDD acceptance criteria when the user asks to create user stories, write stories, or break down a feature into stories
In this repository79 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyze-competitorsSkill
- analyze-dependenciesSkill
- analyze-metricsSkill
- audit-accessibilitySkill
- audit-api-consistencySkill
- audit-performanceSkill
- audit-securitySkill
- capture-pr-visualsSkill
- commitSkill
- create-adrSkill
- create-api-designSkill
- create-bug-reportSkill
- create-commit-messageSkill
- create-data-modelSkill
- create-decision-logSkill
- create-docSkill
- create-estimationSkill
- create-experiment-designSkill
- create-feature-flag-planSkill
- create-gtm-briefSkill
- create-handoffSkill
- create-incident-reportSkill
- create-interview-guideSkill
- create-jtbd-canvasSkill
- create-metrics-frameworkSkill
- create-onboarding-guideSkill
- create-ostSkill
- create-planSkill
- create-postmortemSkill
- create-pr-descriptionSkill
- create-prdSkill
- create-prSkill
- create-release-checklistSkill
- create-release-notesSkill
- create-retroSkill
- create-reviewSkill
- create-rfcSkill
- create-roadmapSkill
- create-rollback-planSkill
- create-runbookSkill
- create-shape-up-pitchSkill
- create-stakeholder-updateSkill
- create-test-planSkill
- create-threat-modelSkill
- debug-systematicSkill
- fastapi-endpoint-patternsSkill
- fix-findingsSkill
- fix-reviewSkill
- flutter-platform-patternsSkill
- flutter-state-managementSkill
- flutter-version-managementSkill
- flutter-widget-patternsSkill
- manage-tech-debtSkill
- nextjs-api-patternsSkill
- nextjs-app-router-patternsSkill
- nextjs-performanceSkill
- product-context-docsSkill
- project-skill-creatorSkill
- project-standardsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 111
As a [persona]: Use a specific persona from the product profile, not "a user." If no personas exist, define them inline (e.g., "As a …
- Very specific: line 117
Every criterion follows Given/When/Then strictly:
- Distinctive: line 143
If a story is larger than L, it should be split into smaller stories.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create User Stories
Overview
Generate a user story map following Jeff Patton's story mapping approach, with BDD-style Given/When/Then acceptance criteria for every story. Stories are grouped by user activity, tagged with priority and complexity, and include dedicated edge-case stories.
Workflow
- Read product context — Load
.chalk/docs/product/0_product_profile.mdand any JTBD docs to understand personas, goals, and existing terminology. If no product context exists, work from what the user provides. - Locate the PRD — If
$ARGUMENTSreferences a PRD (by path or name), read it. Search.chalk/docs/product/for PRD files matching the feature. If a PRD exists, it is the primary input. If no PRD exists, accept the feature description from$ARGUMENTSdirectly and note that stories are being written without a PRD. - Identify user activities — Break the feature into 3-7 high-level user activities (the "backbone" in story mapping). Each activity represents a distinct thing the user does to accomplish their goal. Activities are ordered left-to-right by the sequence the user would perform them.
- Write stories for each activity — Under each activity, write stories from highest to lowest priority. Each story gets:
- The story statement: "As a [persona], I want [action], so that [outcome]"
- 2-4 acceptance criteria in Given/When/Then format
- A priority tag: must (MVP), should (important but not blocking), could (nice-to-have)
- A complexity tag: S (< 1 day), M (1-3 days), L (3-5 days)
- Generate edge-case stories — For every activity, add at least one story covering:
- Error states (what happens when things go wrong)
- Empty states (first-time use, no data available)
- Boundary conditions (max limits, large inputs, concurrent access)
- Permission boundaries (unauthorized user, expired session, role restrictions)
- Determine the next file number — Read filenames in
.chalk/docs/product/to find the highest numbered file. The next number ishighest + 1. - Write the file — Save to
.chalk/docs/product/<n>_user_stories_<feature_slug>.md. - Confirm — Tell the user the stories were created, share the file path, total story count, and the must/should/could breakdown.
Story Map Structure
# User Stories: <Feature Name>
Last updated: <YYYY-MM-DD> (Initial draft)
Source PRD: [<PRD title>](./<prd_filename>.md) (or "None — stories written from feature description")
## Story Map Overview
| Activity | Must | Should | Could | Total |
|----------|------|--------|-------|-------|
| <activity 1> | X | Y | Z | N |
| <activity 2> | X | Y | Z | N |
| **Total** | **X** | **Y** | **Z** | **N** |
---
## Activity 1: <Activity Name>
<1-sentence description of what the user is doing and why>
### Story 1.1: <Short story title>
**Priority**: must | **Complexity**: S/M/L
As a [persona], I want [action], so that [outcome].
**Acceptance Criteria**:
- Given [context], when [action], then [expected result]
- Given [context], when [action], then [expected result]
- Given [context], when [action], then [expected result]
### Story 1.2: <Short story title>
...
### Story 1.E1: <Edge case title>
**Priority**: must | **Complexity**: S/M/L
**Edge case type**: error state | empty state | boundary | permission
As a [persona], I want [behavior when X goes wrong], so that [I can recover / understand what happened].
**Acceptance Criteria**:
- Given [error/edge context], when [action], then [graceful handling]
- Given [error/edge context], when [action], then [user feedback]
---
## Activity 2: <Activity Name>
...Writing Stories
The Story Statement
Each story has three parts that must all be present:
- As a [persona]: Use a specific persona from the product profile, not "a user." If no personas exist, define them inline (e.g., "As a first-time customer who has never used the product").
- I want [action]: Describe the action from the user's perspective. "I want to filter search results" not "I want the system to implement filtering."
- So that [outcome]: State the user value, not the system behavior. "So that I can find the right item without scrolling through hundreds of results" not "so that the filter query runs on the backend."
Acceptance Criteria
Every criterion follows Given/When/Then strictly:
- Given [a specific, reproducible starting state]
- When [a single user action]
- Then [an observable, verifiable outcome]
Good: "Given a user with 50+ saved items, when they type 3 characters in the search field, then matching items appear within 500ms and non-matching items are hidden."
Bad: "Given the user is on the page, when they search, then it works correctly."
Priority Tags
| Tag | Meaning | Guidance |
| must | MVP — feature does not ship without this | Core happy path, critical error handling |
| should | Important but not launch-blocking | Secondary workflows, polish, non-critical edge cases |
| could | Nice-to-have, do if time permits | Convenience features, optimizations, advanced scenarios |
Complexity Tags
| Tag | Meaning | Guidance |
| S | Less than 1 day of engineering work | Single component, no new APIs, no data model changes |
| M | 1-3 days of engineering work | Multiple components, may need a new API endpoint or schema change |
| L | 3-5 days of engineering work | Cross-cutting, new infrastructure, significant data model changes |
If a story is larger than L, it should be split into smaller stories.
Output
- File:
.chalk/docs/product/<n>_user_stories_<feature_slug>.md - Format: Plain markdown, no YAML frontmatter
- First line:
# User Stories: <Feature Name> - Second line:
Last updated: <YYYY-MM-DD> (Initial draft)
Anti-patterns
- Stories without acceptance criteria — A story with no Given/When/Then is just a sentence. It cannot be estimated, tested, or verified. Every story gets 2-4 criteria, no exceptions.
- Missing edge-case stories — Happy-path-only story maps lead to brittle products. Every activity must have at least one edge-case story covering error states, empty states, boundaries, or permissions.
- Acceptance criteria that are not testable — "The experience should be smooth" cannot be verified. Every criterion must be specific enough that a QA engineer can write a test case from it without asking questions.
- Stories that are really tasks — "As a developer, I want to set up the database schema" is a task, not a user story. Stories describe user-visible value. Implementation tasks belong in engineering plans, not story maps.
- "As a user" without specificity — Always use a named persona or a descriptive phrase. "As a user" tells the engineer nothing about who they are building for. "As a warehouse manager checking inventory at end-of-shift" tells them everything.
- Skipping the story map overview — The summary table is the first thing a PM or stakeholder reads. It shows scope at a glance: how many stories, how they break down by priority. Never omit it.
- One giant activity — If an activity has more than 8 stories, it is too broad. Split it into two activities. Story maps should be scannable.
- Duplicating the PRD — Stories operationalize the PRD, they do not restate it. Do not copy-paste problem statements or metrics into the stories doc. Reference the PRD by filename instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

