.claude/skills/gen-use-case/SKILL.md
Use when documenting a feature's business behavior before implementation. Generates a use case document (Manage X template) with Main Scenario, Extensions, Data Structures, Business Rules, and Pending Issues. Pairs with gen-user-story (upstream) and gen-gherkin-feature (downstream). Also invoke when the user mentions: use case document, UC document, business scenario, feature specification, requirements doc. Domain: Requirements, Analysis. Level: Intermediate.
npx skillsauth add klod68/littlerae gen-use-caseInstall 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.
Generate a complete use case document using the template below.
Fill in every placeholder using the details provided.
Keep all tables intact. Do not skip any section.
If information is unknown, write TBD in that cell.
${1:e.g. Manage Working Hours}${2:e.g. HR Portal}${3:e.g. Employee}${4:e.g. time tracking}${5|Mandatory,Highly-desirable,Desirable,Optional|}${1}Application:
${2}Description: This use case describes the execution of CRUD operations over${1}content in${2}.
| Item | Content |
|---|---|
| Use Case ID | <Action Verb + Object> |
| Related User Story | <User story statement> |
| Context of Use | A ${3} wants to manage a ${4}. |
| Scope | ${2} |
| Level | <User-goal \| Summary \| Component> |
| Primary Actors | ${3} |
| Stakeholder List | <Enumerate stakeholders and their interest> |
| Priority | ${5} |
| Preconditions | - The user is authenticated. <br>- <additional preconditions> |
| Postconditions | - <state after successful completion> <br>- <additional postconditions> |
(10 steps or fewer is optimal)
| Step | Actor | Action |
|---|---|---|
| 1 | ${3} | Starts a session in ${2}. |
| 2 | | <describe action> |
| 3 | | <describe action> |
| 4 | | <describe action> |
| 5 | | <describe action> |
| 6 | | <describe action> |
| 7 | | <describe action> |
| 8 | | <describe action> |
| 9 | | <describe action> |
| 10 | ${3} | Ends the session in ${2}. |
| Step | Condition | Steps |
|---|---|---|
| *a | ${2} system disconnects session | 1. <describe recovery or fallback> |
| 2 | ${3} <condition> | 1. <step> <br>2. <step> |
| Step | Definition |
|---|---|
| 2 | A <object-name> is defined by: <br>- Unique Id <br>- <other-properties> |
| Step | I/O Channel | Applies To |
|---|---|---|
| * | <channel-name> | <applies in all steps> |
| 1 | <channel-name> | <specific to this step> |
| # | Rule | Description |
|---|---|---|
| 1 | <rule-statement> | <rule-description> |
| 2 | ... | ... |
| # | Issue |
|---|---|
| 1 | <Issue description or question to be answered> |
| 2 | ... |
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.