.claude/skills/gen-user-story/SKILL.md
Use when capturing a feature requirement as a user story before writing use cases or tests. Generates a story card with role, capability, benefit, acceptance criteria, and MoSCoW priority. Pairs with gen-use-case (downstream). Also invoke when the user mentions: user story, As a user, feature card, story card, acceptance criteria. Domain: Requirements, Agile. Level: Beginner.
npx skillsauth add klod68/littlerae gen-user-storyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a senior business analyst. Generate a complete user story card using the template below. A user story captures what the stakeholder needs and why — it is problem-space language, free of implementation detail.
The story will serve as input to a Use Case document (via /gen-use-case),
which models how the system satisfies the need.
${1:e.g. Working Hours Logging}${2:e.g. HR Portal}${3:e.g. Employee}${4|Mandatory,Highly-desirable,Desirable,Optional|}${5:e.g. Time Management}Generate the story card below. Fill in every section. If a detail is unknown,
write TBD and add a corresponding entry to the Notes section.
${1}Application:
${2}Epic:${5}Priority:${4}
As a
${3}, I want<capability — what the actor wants to do>, so that<benefit — the measurable value delivered>.
High-level conditions that must be true for this story to be considered satisfied. These are refined into executable Gherkin scenarios during Phase 3 of the workflow.
| # | Criterion | Category |
|---|---|---|
| AC-1 | <Given [context], when [action], then [outcome]> | happy-path |
| AC-2 | <Given [context], when [action], then [outcome]> | business-rule |
| AC-3 | <Given [context], when [action], then [outcome]> | alternative |
| AC-4 | <Given [context], when [action], then [outcome]> | negative |
Category values: happy-path · business-rule · alternative · negative
| In Scope | Out of Scope |
|---|---|
| <What this story covers> | <What this story explicitly does NOT cover> |
Context, constraints, dependencies, or open questions for discussion.
| # | Note |
|---|---|
| 1 | <note or open question> |
This story feeds into the following workflow phases:
| Phase | Tool | Output |
|---|---|---|
| Design | /gen-use-case | Use Case document (7 sections) |
| Derive | /gen-gherkin-feature | Gherkin .feature + Coverage Matrix |
| Implement | /gen-cqrs-handler, /gen-minimal-api-endpoint, etc. | Code artifacts |
| Evaluate | /gen-test-class, /review-* | Test proof instances |
Employee, Manager, System Administrator) — never use generic "user". This actor name carries through all downstream artifacts.happy-path, business-rule, alternative, negative) to map directly to Gherkin scenario tags.TBD entries in Acceptance Criteria propagate downstream as @pending Gherkin scenarios.tools
Use when cross-cutting concerns (logging, metrics, validation, authorization) are tangled into command handlers or service methods, when building database command pipelines with reorderable concerns, or when HTTP client pipelines or message handlers need composable, independently-replaceable processing stages. Covers ICommandInterceptor interface, InterceptorPipeline with reverse-chain construction, zero-cost Empty sentinel to skip overhead when no interceptors are registered, and ConfigureAwait(false) discipline for library code. Domain: Architecture, Cross-Cutting Concerns. Level: Intermediate. Tags: interceptor, pipeline, middleware, decorator, cross-cutting-concerns.
development
Use when writing integration tests for Razor Pages, MVC, or Minimal API applications to validate routing, middleware, page rendering, and HTTP behavior without a browser or live server, or when adding fast smoke tests to a CI pipeline. Covers WebApplicationFactory<Program> setup with public partial class Program, in-memory test server, AngleSharp HTML parsing, CSS selector assertions, redirect and status code testing, and a shared static fixture pattern for minimal per-test startup overhead. Domain: Testing, ASP.NET Core. Level: Intermediate. Tags: integration-testing, webapplicationfactory, razor-pages, anglesharp, http-testing.
development
Use when designing indexes for new tables, diagnosing slow queries that are not using indexes efficiently, reviewing index fragmentation and maintenance, or when the current indexing strategy results in key lookups, table scans, or missing index warnings. Covers clustered index key selection (narrow, unique, ever-increasing), non-clustered index design for query patterns, covering indexes with INCLUDE columns, filtered indexes for subset queries, composite index column ordering, DMV-based monitoring for missing and unused indexes, and rebuild vs reorganize maintenance thresholds. Domain: Database, Performance. Level: Intermediate. Tags: index, sql-server, covering-index, filtered-index, performance, dmv, maintenance.
development
Use when building a searchable in-memory catalog or registry for documentation sites, admin panels, or type/API browsers where you need keyword matching, fuzzy search, and ranked results without an external search engine or database. Covers RegistryService with weighted scoring across name, description, keywords, and method names; Levenshtein fuzzy matching; synonym expansion; category and subcategory filtering; and singleton DI registration for datasets of hundreds to low thousands of items. Domain: Search, Data Access Patterns. Level: Intermediate. Tags: search, registry, fuzzy-matching, in-memory, catalog, filtering.