Skip to content

deanpeters/Product-Manager-Skills / plugins/pm-develop/skills/user-story

user-story

Verified

Create 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.

FileKindSize
SKILL.mdskill md11.2 KB
examples/sample-industrial.mdmarkdown5.1 KB
examples/sample.mdmarkdown3.2 KB
scripts/user-story-template.pyscript2.2 KB
template.mdmarkdown1.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())
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall