Skip to content
Back to skills

User Story

ASecurity

Write user stories in Mike Cohn format with Gherkin acceptance criteria. Use when turning a user need into a slice's title/so_that and acceptance_criteria, or whenever asked to write a user story.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 3, 2026
developmentpythongo

Works with

  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add restierecon/tbv --skill user-story --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of User Story?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for User Story
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/restierecon-user-story/badge)](https://www.skillsdirectory.com/skills/restierecon-user-story)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: user-story
description: Write user stories in Mike Cohn format with Gherkin acceptance criteria. Use when turning a user need into a slice's title/so_that and acceptance_criteria, or whenever asked to write a user story.
---

# User Story

Format:

```
As a [specific persona, not "user"]
I want to [action]
so that [outcome — the motivation, not a restatement of the action]
```

Acceptance criteria, Gherkin:

```
Scenario: [one sentence]
Given [precondition]
and Given [more preconditions as needed]
When [the one triggering event — matches "I want to"]
Then [the one expected outcome — matches "so that"]
```

## Rules
- Persona specific ("trial user", "org admin"), never generic "user."
- "So that" states motivation, not the action again. `"I want to click save, so that I save"` is not a story.
- Exactly one When, one Then per scenario. Multiple Whens/Thens = multiple stories — split it.
- Then must be verifiable (`"loads in under 2s"`, not `"is faster"`).
- Not a story: no user-facing outcome ("as a developer, refactor the DB") → that's an engineering task, skip this skill.

## Helpers
- `template.md` — blank fill-in stub.
- `examples/sample.md` — good, bad, and split-needed stories.
- `~/.tbv/skills/user-story/scripts/user-story-template.py` — prints a filled
  Markdown stub from `--persona/--action/--outcome` (`python` on Windows), e.g.
  `python3 ~/.tbv/skills/user-story/scripts/user-story-template.py --persona "trial user" --action "log in with Google" --outcome "access the app without a new password"`

## In this workflow
This produces exactly the fields slice-planning needs: title ("Actor can...") and
`so_that` come straight from the story's persona, action and outcome; Gherkin scenarios become
`acceptance_criteria` entries (one bullet per Given/When/Then group). Write the
story before calling slice-planning, not after — a slice whose `so_that` you can't
state as real user motivation isn't a slice yet.

## Example
```
As a trial user visiting for the first time
I want to log in with my Google account
so that I can access the app without creating a new password

Scenario: First-time trial user logs in via Google OAuth
Given I am on the login page
and Given I have a Google account
When I authorize the app on Google's consent screen
Then I land on onboarding, signed in
```

Files in this skill

  • SKILL.md2.3 KB
  • examples/sample.md1.4 KB
  • scripts/user-story-template.py1.1 KB
  • template.md506 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.