Borrowing it
Nothing to install: this file belongs to PackmindHub/skillsight. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/PackmindHub/skillsight/main/.claude/commands/create-use-case.mdgit clone --depth 1 https://github.com/PackmindHub/skillsightWrote 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.
[](https://agentmods.dev/commands/packmindhub/skillsight/create-use-case)<a href="https://agentmods.dev/commands/packmindhub/skillsight/create-use-case"><img src="https://agentmods.dev/badge/commands/packmindhub/skillsight/create-use-case/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.
<a href="https://agentmods.dev/commands/packmindhub/skillsight/create-use-case"><img src="https://agentmods.dev/badge/commands/packmindhub/skillsight/create-use-case.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.00517 |
| Opus 5.5 | $0.00021 | $0.00207 |
| Sonnet 5.5 | $0.00010 | $0.00103 |
| Haiku 4.5 | $0.00005 | $0.00052 |
Grade A, and why
create-use-case 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 1mo 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.
What it actually says
Create a Use Case
Scaffold a new application use case following the repository's hexagonal convention: a pure function that takes deps (ports) and input, plus a matching bun:test test built with a local makeDeps. Use this whenever you add a business operation to the backend so it stays framework-agnostic and testable.
When to Use
- Adding a new business operation to
backend/src/application/. - Implementing the logic behind a new HTTP route before wiring the handler.
- Refactoring logic out of an HTTP handler into the application layer.
Checkpoints
- What is the feature folder (e.g.
skills,plugins,integrations) the use case belongs to? - Which domain ports does it need (repositories, gateways)?
- What are the expected failure cases that should be returned as
{ error: ... }instead of thrown?
Steps
1. Create the use-case file
Add backend/src/application/<feature>/<verb-noun>.ts. Export an async function taking deps (an object of domain/ports interfaces) and input (a typed params object). Return the domain entity on success and a discriminated { error: "..." } union for expected failures. Import only from domain/ — no Hono, no Drizzle.
2. Write the test alongside it
Add <verb-noun>.test.ts in the same folder. Define a local makeDeps(...) that returns fully-stubbed ports typed against their I*Repository interfaces, capturing call side-effects in closure variables. Use describe/it/expect from bun:test. Cover the success path and each { error } branch.
3. Wire it into the HTTP layer
In the relevant backend/src/http/ handler, instantiate dependencies from the DI container (bootstrap/compose.ts) and call the use case, mapping { error } results to the correct HTTP status. Keep the handler thin.
4. Verify
Run bun test backend/src/application/<feature>/<verb-noun>.test.ts, then bun run lint and bun run typecheck.
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.
- 1mo ago First seen · 38 lines · 52 tokens per session scan A c9ca11199d4a
create-use-case is a command published in the GitHub repository PackmindHub/skillsight (9 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 517 once invoked, about $0.0002 per session on Opus 5.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.
Other commands, from other repositories
dare-laravel-api
Padrões DARE para APIs REST em Laravel 11 + PHP 8.3. Strict Types, FormRequests, Services, Resources, Repositories, Eloquent + casts, tratamento global de exceções, testes Pest, PHPStan/Larastan nível 8.
test-suite
Run comprehensive test suite with coverage analysis.
create-component
Create a frontend component with proper structure, types, and accessibility.
pm-tests
List missing unit-test companions for core/changed sources. Do not write tests into the business tree unless the user confirms.
generate-ddd
Generate DDD components. Creates entities, value objects, aggregates, commands, queries, repositories, domain services, factories, specifications, DTOs, ACL, event stores, snapshots, and use cases for PHP 8.4.
implementar
Ejecutar tareas TDD fase por fase dentro de Docker hasta que todos los tests pasen.