user-story-gen

user-story-gen is a command for Claude Code from Dokkabei97/forged-claude-code. It costs 20 tokens per session (1,147 once invoked), scanned A, original, MIT.

A command that turns a product requirements document or feature description into user stories with acceptance criteria. User stories describe what a particular kind of user needs to do and why.

In plain words
What is it for?
Use it to generate stories from text or a PRD file, identify user types, describe user goals and actions, and create criteria for checking whether each story is complete.
Why use it?
It breaks broad requirements into smaller pieces that can be planned and implemented. It also identifies the different users and system actors involved.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the forged-claude-code plugin — 29 skills, 14 commands, 9 agents, 2 hooks shipped together

Good fit Use it to generate stories from text or a PRD file, identify user types, describe user goals and actions, and create criteria for checking whether each story is complete.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dokkabei97/forged-claude-code/user-story-gen
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Dokkabei97/forged-claude-code

Made for: Claude Code.

Or install forged-claude-code, the plugin that ships this one along with the rest of its 29 skills, 14 commands, 9 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for user-story-gen

README.md
[![agentmods](https://agentmods.dev/badge/commands/dokkabei97/forged-claude-code/user-story-gen/github.svg)](https://agentmods.dev/commands/dokkabei97/forged-claude-code/user-story-gen)
Your own site
<a href="https://agentmods.dev/commands/dokkabei97/forged-claude-code/user-story-gen"><img src="https://agentmods.dev/badge/commands/dokkabei97/forged-claude-code/user-story-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for user-story-gen

Your own site · 80×15
<a href="https://agentmods.dev/commands/dokkabei97/forged-claude-code/user-story-gen"><img src="https://agentmods.dev/badge/commands/dokkabei97/forged-claude-code/user-story-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.01147
Opus 5 $0.00010 $0.00574
Sonnet 5 $0.00004 $0.00229
Haiku 4.5 $0.00002 $0.00115

Measured 9d ago against content hash 91b5c86e6920, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

user-story-gen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/user-story-gen.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/user-story-gen - User Story Generator

Triggers

  • When a PRD or feature description needs to be broken into implementable stories
  • When planning sprint backlog items
  • When acceptance criteria need to be formalized

Usage

/user-story-gen [feature description or PRD path]
/user-story-gen --from prd.md
/user-story-gen "Users can upload profile photos"

Behavioral Flow

Phase 1: Input Analysis

Analyze the input to understand the feature scope.

If file path provided:

Read the PRD/spec file
Extract: Problem statement, scope items, user flows

If text description provided:

Parse the feature description
Identify: User types, actions, goals

Phase 2: Identify User Types

Extract all distinct user types/personas from the input:

- Primary user (the main beneficiary)
- Secondary users (admin, support, etc.)
- System actors (scheduled jobs, webhooks, etc.)

Phase 3: Generate User Stories

For each scope item, generate stories following INVEST principles:

Principle Check
Independent Can be developed without other stories
Negotiable Not a contract, details can change
Valuable Delivers value to user or business
Estimable Team can estimate effort
Small Fits in one sprint (ideally 1-3 days)
Testable Clear pass/fail criteria

Story Format:

### [STORY-ID] [Short Title]

> As a **[user type]**,
> I want to **[action/capability]**,
> so that **[benefit/value]**.

**Acceptance Criteria:**
- [ ] Given [precondition], when [action], then [expected result]
- [ ] Given [precondition], when [action], then [expected result]
- [ ] Given [edge case], when [action], then [expected result]

**Notes:**
- [Implementation hints or constraints]
- [Dependencies on other stories]

**Size:** S / M / L
**Priority:** P0 (must) / P1 (should) / P2 (could)

Phase 4: Story Splitting

If a story is too large (estimated > 3 days), split it using these patterns:

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 174 lines · 20 tokens per session scan A 91b5c86e6920

Subscribe to this mod's changes

user-story-gen is a command published in the GitHub repository Dokkabei97/forged-claude-code (2 stars, last pushed 6mo ago), licensed MIT. It adds 20 tokens to every session and 1,147 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.