AI prompt for writing user stories
This is a ready-made AI prompt for writing user stories, written for Claude and free to copy. User stories fail when the "so that" clause restates the goal — "so that I can log in" adds nothing — and when only the happy path is specified, leaving every error state to be discovered in QA. The prompt below handles that: it is compiled as a writing task, so it carries the structure and the constraints that kind of work needs.
The prompt
Written for Claude. Compiled as a writing task — producing original prose: articles, essays, stories, letters, and long-form copy.
<role>
You are a senior writer and editor with a decade of experience in this exact form.
</role>
<context>
Who uses it: {{users}}. The problem it solves: {{problem}}. Known constraints: {{constraints}}.
</context>
<task>
Write user stories for {{feature}}.
</task>
<constraints>
- Each story states a user, a goal and a reason. The reason must not restate the goal.
- Acceptance criteria must be testable — a tester could mark each pass or fail.
- Include the edge cases and error states, not just the happy path.
- Split anything that needs "and" in the goal.
- Write in plain, direct prose. Do not restate the prompt, and do not open with a throat-clearing sentence.
- Vary sentence length. Do not begin consecutive sentences with the same word or structure.
- Do not invent facts, statistics, quotations, or attributed opinions.
</constraints>
<output_format>
Respond in Markdown. Use descriptive headings, and keep paragraphs to three sentences or fewer.
</output_format>
<success_criteria>
Before you finish, check the output against every item below and fix anything that fails.
- A developer could build from these without asking what happens when it fails.
</success_criteria>
<before_you_start>
If anything above is unclear, or you are missing information you need, ask up to three specific clarifying questions before producing any output. Do not invent facts, names, numbers, sources, or quotations to fill a gap — if you do not know something, say so plainly.
</before_you_start>
Now, write user stories for {{feature}}.Open this in the prompt builder to add your own context and see what would improve it most.
What makes writing user stories hard to prompt for
User stories fail when the "so that" clause restates the goal — "so that I can log in" adds nothing — and when only the happy path is specified, leaving every error state to be discovered in QA.
Why this prompt works
- Background comes before the instruction
- The model reads the situation before it learns what to do with it, which stops the instruction being diluted by everything that follows. The task is then restated as the final line, where models weight it most heavily.
- Rules a writing task assumes but nobody writes down
- Write in plain, direct prose. Do not restate the prompt, and do not open with a throat-clearing sentence. Vary sentence length. Do not begin consecutive sentences with the same word or structure. These are added automatically because leaving them implicit is the most common reason this kind of output disappoints.
- Success criteria the model checks itself against
- Stating how the output will be judged gives the model something concrete to verify before it finishes. Prompts without criteria produce work that is plausible but incomplete, because nothing defined when it was done.
- Permission to ask instead of guess
- This brief leaves room for interpretation, so the prompt tells the model to ask before inventing details. That converts a confidently wrong answer into a question you can actually answer.
What to replace
| Placeholder | What to put there |
|---|---|
| {{users}} | Your users. |
| {{problem}} | Your problem. |
| {{constraints}} | Your constraints. |
| {{feature}} | Your feature. |
Check the output before you use it
- Read each "so that" clause alone. If it just restates the goal, the reason is missing.
- Check every story has at least one failure-case criterion.
- Look for stories containing "and" in the goal — those are two stories.
The same prompt for other models
Identical content, packaged the way each model reads most reliably.
ChatGPT
## Role
You are a senior writer and editor with a decade of experience in this exact form.
## Context
Who uses it: {{users}}. The problem it solves: {{problem}}. Known constraints: {{constraints}}.
## Task
Write user stories for {{feature}}.
## Constraints
- Each story states a user, a goal and a reason. The reason must not restate the goal.
- Acceptance criteria must be testable — a tester could mark each pass or fail.
- Include the edge cases and error states, not just the happy path.
- Split anything that needs "and" in the goal.
- Write in plain, direct prose. Do not restate the prompt, and do not open with a throat-clearing sentence.
- Vary sentence length. Do not begin consecutive sentences with the same word or structure.
- Do not invent facts, statistics, quotations, or attributed opinions.
## Output format
Respond in Markdown. Use descriptive headings, and keep paragraphs to three sentences or fewer.
## Success criteria
Before you finish, check the output against every item below and fix anything that fails.
- A developer could build from these without asking what happens when it fails.
## Before you start
If anything above is unclear, or you are missing information you need, ask up to three specific clarifying questions before producing any output. Do not invent facts, names, numbers, sources, or quotations to fill a gap — if you do not know something, say so plainly.
Now, write user stories for {{feature}}.Gemini
**Task**
Write user stories for {{feature}}.
**Role**
You are a senior writer and editor with a decade of experience in this exact form.
**Context**
Who uses it: {{users}}. The problem it solves: {{problem}}. Known constraints: {{constraints}}.
**Constraints**
- Each story states a user, a goal and a reason. The reason must not restate the goal.
- Acceptance criteria must be testable — a tester could mark each pass or fail.
- Include the edge cases and error states, not just the happy path.
- Split anything that needs "and" in the goal.
- Write in plain, direct prose. Do not restate the prompt, and do not open with a throat-clearing sentence.
- Vary sentence length. Do not begin consecutive sentences with the same word or structure.
- Do not invent facts, statistics, quotations, or attributed opinions.
**Output format**
Respond in Markdown. Use descriptive headings, and keep paragraphs to three sentences or fewer.
**Success criteria**
Before you finish, check the output against every item below and fix anything that fails.
- A developer could build from these without asking what happens when it fails.
**Before you start**
If anything above is unclear, or you are missing information you need, ask up to three specific clarifying questions before producing any output. Do not invent facts, names, numbers, sources, or quotations to fill a gap — if you do not know something, say so plainly.
Now, write user stories for {{feature}}.Common questions
- What makes acceptance criteria testable?
- A tester can mark each one pass or fail without asking a question. "The form validates correctly" is not testable; "submitting an empty email field shows the message Email is required" is.
- How detailed should user stories be?
- Detailed enough that a developer does not have to guess what happens when something fails. The happy path is usually obvious; the error states are where the actual work and the actual ambiguity live.
- Which AI model is best for writing user stories?
- All of them handle this; what changes is the packaging. This page shows the same prompt written for Claude, ChatGPT, Gemini. Claude follows XML-delimited structure most reliably, ChatGPT works best with markdown headings, and Gemini prefers the task stated before the material. The content of the prompt is identical in each.
- Can I change this prompt for my own situation?
- Yes, and you should. Replace the placeholders with your own details, then open it in the builder to add context specific to you. The builder scores what you supply and tells you exactly which missing piece would improve it most.
- Why does this prompt include rules I did not ask for?
- Because writing tasks carry requirements that experienced practitioners apply automatically and rarely write down. The compiler adds them so the output does not fail on something obvious. Every added rule is listed on the how it works page.
Related prompts
- AI prompt for creating user personas
- AI prompt for writing release notes
- AI prompt for writing error messages
- AI prompt for writing a system prompt for a chatbot
- AI prompt for creating a D&D encounter
- AI prompt for creating a logo with AI
Browse all ready-made prompts, the full prompt library, or read the guides.