deanpeters/Product-Manager-Skills / plugins/pm-develop/skills/user-story
user-story
VerifiedCreate user stories with Mike Cohn format and Gherkin acceptance criteria. Use when turning user needs into development-ready work with clear outcomes and testable conditions.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.2 KB |
| examples/sample-industrial.md | markdown | 5.1 KB |
| examples/sample.md | markdown | 3.2 KB |
| scripts/user-story-template.py | script | 2.2 KB |
| template.md | markdown | 1.2 KB |
scripts/user-story-template.py
View on GitHub#!/usr/bin/env python3
"""Generate a user story Markdown snippet from CLI inputs.
No network access. Prints to stdout.
"""
import argparse
import sys
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Generate a user story with Gherkin-style acceptance criteria.",
)
parser.add_argument("--summary", help="Short summary/title for the story.")
parser.add_argument("--persona", help='Persona or role for "As a".')
parser.add_argument("--action", help='Action for "I want to".')
parser.add_argument("--outcome", help='Outcome for "so that".')
parser.add_argument("--scenario", help="Scenario description.")
parser.add_argument("--given", action="append", default=[], help="Given precondition (repeatable).")
parser.add_argument("--when", dest="when", help="When trigger.")
parser.add_argument("--then", dest="then", help="Then outcome.")
return parser.parse_args()
def normalize(value: str, placeholder: str) -> str:
if value and value.strip():
return value.strip()
return placeholder
def main() -> int:
args = parse_args()
summary = normalize(args.summary, "[Brief, memorable title focused on value]")
persona = normalize(args.persona, "[persona or role]")
action = normalize(args.action, "[action user takes to get to outcome]")
outcome = normalize(args.outcome, "[desired outcome]")
scenario = normalize(args.scenario, "[Brief, human-readable scenario describing value]")
whens = normalize(args.when, "[Event that triggers the action]")
thens = normalize(args.then, "[Expected outcome]")
givens = args.given or ["[Initial context or precondition]"]
print("### User Story [ID]:\n")
print(f"- **Summary:** {summary}\n")
print("#### Use Case:")
print(f"- **As a** {persona}")
print(f"- **I want to** {action}")
print(f"- **so that** {outcome}\n")
print("#### Acceptance Criteria:\n")
print(f"- **Scenario:** {scenario}")
for index, given in enumerate(givens):
label = "Given" if index == 0 else "and Given"
print(f"- **{label}:** {given}")
print(f"- **When:** {whens}")
print(f"- **Then:** {thens}")
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |