shep: Agent for Claude Code

.claude/agents/shep-use-case-creator.md

shep-use-case-creator is an agent for Claude Code from shep-ai/shep. It costs 92 tokens per session (1,551 once invoked), scanned A, original, MIT.

A scaffold for creating one application-layer use case with TDD, or test-driven development: write a failing test first, then add the smallest implementation that passes it. It follows the project's dependency-injection and layer-boundary conventions.

In plain words
What is it for?
Use it to create a use case with defined inputs, outputs, injected interfaces, step-by-step behavior, and specified error conditions, then connect it to the dependency-injection container.
Why use it?
It gives a new use case a tested starting point and prevents application code from depending directly on infrastructure details. Missing required inputs produce an error instead of guesses.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is shep-ai/shep's own configuration. It tells Claude Code how to work on shep itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything shep configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shep-ai/shep. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shep-ai/shep/main/.claude/agents/shep-use-case-creator.md
Clone the repo
git clone --depth 1 https://github.com/shep-ai/shep

Made for: Claude Code.

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 shep-use-case-creator

README.md
[![agentmods](https://agentmods.dev/badge/agents/shep-ai/shep/shep-use-case-creator.svg)](https://agentmods.dev/agents/shep-ai/shep/shep-use-case-creator)
Your own site
<a href="https://agentmods.dev/agents/shep-ai/shep/shep-use-case-creator"><img src="https://agentmods.dev/badge/agents/shep-ai/shep/shep-use-case-creator.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 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,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00092 $0.01551
Opus 5 $0.00046 $0.00776
Sonnet 5 $0.00018 $0.00310
Haiku 4.5 $0.00009 $0.00155

Measured 8d ago against content hash 389ae3bf7882, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

shep-use-case-creator scanned grade A with 1 finding 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 8d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Never create side-effects outside injected ports.** No `fs`, `child_process`, `fetch`, or `Date.now()` at module scope.
.claude/agents/shep-use-case-creator.md · 130 lines

How it starts

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

You create ONE new use case following shep's exact conventions and mandatory TDD discipline.

Inputs (required)

  1. use_case_name — PascalCase class name ending in UseCase (e.g., InitiateCloudDeploymentUseCase).
  2. subfolder — subdirectory under packages/core/src/application/use-cases/ (e.g., cloud-deploy, applications, deployments).
  3. input_shape — TypeScript object shape of the execute() input. Can be a sentence like { applicationId: string; provider?: CloudDeploymentProvider }.
  4. output_shape — TypeScript return type of execute(). Can be a concrete type or void.
  5. dependencies — list of { token: string, interface: string, field: string } objects the use case needs (ports to inject).
  6. behaviour — plain-English description of what the use case does, step-by-step, in the order the implementation should run.
  7. error_cases — list of { class: string, when: string } objects describing the error types the use case throws and the preconditions that cause them. The class names should follow the shep convention (e.g., ApplicationNotFoundError, BuildOutputNotFoundError).

If any input is missing, return an error.

Process

Step 1 — Mirror an existing use case

Read one similar use case from packages/core/src/application/use-cases/<subfolder>/ if it exists, otherwise read packages/core/src/application/use-cases/applications/create-application.use-case.ts. Copy its structural style (imports, JSDoc format, constructor layout, error class placement).

Step 2 — Write the RED test FIRST

Create tests/unit/application/use-cases/<subfolder>/<kebab-use-case-name>.test.ts with:

  • import 'reflect-metadata'; as the first line.
  • Minimal fakes for every port in dependencies. Each fake implements the interface with the smallest possible stub.
  • One test per error_cases[i] — arrange the fake to trigger the precondition, then expect(...).rejects.toBeInstanceOf(ErrorClass).
  • One happy-path test that exercises the full behaviour.
  • The tests MUST fail at this point (the implementation does not exist yet). That is RED.

Read the full file on GitHub · 130 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. 8d ago First seen · 130 lines · 92 tokens per session scan A 389ae3bf7882

Subscribe to this mod's changes

shep-use-case-creator is an agent published in the GitHub repository shep-ai/shep (248 stars, last pushed 4d ago), licensed MIT. It adds 92 tokens to every session and 1,551 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

backend-development-tdd-orchestrator

Master TDD orchestrator specializing in red-green-refactor discipline, multi-agent workflow coordination, and comprehensive test-driven development practices. Enforces TDD best practices across teams with AI-assisted testing and modern frameworks. Use PROACTIVELY for TDD implementation and governance.

wshobson/agents · 61 tokens

backend-api-security-backend-security-coder

Expert in secure backend coding practices specializing in input validation, authentication, and API security. Use PROACTIVELY for backend security implementations or security code reviews.

wshobson/agents · 40 tokens

temporal-python-pro

Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment. Use PROACTIVELY for workflow design, microservice orchestration, or long-running processes.

wshobson/agents · 56 tokens

business-analyst

Master modern business analysis with AI-powered analytics, real-time dashboards, and data-driven insights. Build comprehensive KPI frameworks, predictive models, and strategic recommendations. Use PROACTIVELY for business intelligence or strategic analysis.

wshobson/agents · 47 tokens

service-mesh-expert

Expert service mesh architect specializing in Istio, Linkerd, and cloud-native networking patterns. Masters traffic management, security policies, observability integration, and multi-cluster mesh configurations. Use PROACTIVELY for service mesh architecture, zero-trust networking, or microservices communication…

wshobson/agents · 63 tokens

nw-acceptance-designer

Use for DISTILL wave — designs E2E acceptance tests from user stories and architecture using Given-When-Then format. EXPANDED scope (plan v3 §3.A, 2026-05-19) — exclusive test-expertise owner; authors ATs with maximum PBT + parametrize density, runs self-completeness audit (7-category taxonomy + 15-item checklist)…

nWave-ai/nWave · 138 tokens