ワンクリックで
creating-usecase
Scaffolds a UseCase protocol and implementation following Clean Architecture. Use when creating a new UseCase.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Scaffolds a UseCase protocol and implementation following Clean Architecture. Use when creating a new UseCase.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Standard editorial template for any standalone HTML output (reports, RCAs, dashboards, diagrams, slides, recaps). Use EVERY time you generate an HTML file so output follows one consistent house style instead of ad-hoc theming.
Findings-first review agent for code changes. Use when the user asks to review a branch, PR, diff, commit range, or recent changes and wants prioritized, actionable issues instead of implementation work.
Scan and clean stale Claude Code sessions from the shared store at ~/.local/share/claude/projects (used by all .claude / .claude-accountN dirs via symlink). Removes session JSONLs older than N days, orphan subagent dirs, and reports reclaimable space.
Triage ShopHelp XCTest/Swift Testing failures before proposing fixes.
Manage Jira issues through jhelp shell functions (jv, jm, jd, jc, jforward, etc.). Use when the user wants to view, transition, assign, comment on, edit, search, or create Jira work items; when they provide a bare issue number, Jira issue key, or Jira URL; or when the task involves the current git branch ticket.
Create git commits. Use when user says "commit", "commit this", "commit changes", "split commit", "split commit change", "split the changes".
| name | creating-usecase |
| description | Scaffolds a UseCase protocol and implementation following Clean Architecture. Use when creating a new UseCase. |
Scaffolds a UseCase protocol and implementation following docs/PATTERNS.md.
{Action}{Entity}UseCase.swift → placed in {App}/Domain/UseCases/{Feature}/
Examples:
GetProductListUseCase.swiftAddToCartUseCase.swiftRecordProductInteractionUseCase.swift//
// {Action}{Entity}UseCase.swift
// {App}
//
// Created by Man Tran on DD/MM/YY.
//
protocol {Action}{Entity}UseCaseProtocol {
func execute(input: InputType) async throws -> OutputType
}
final class {Action}{Entity}UseCase: {Action}{Entity}UseCaseProtocol {
private let repository: {Entity}RepositoryProtocol
init(repository: {Entity}RepositoryProtocol) {
self.repository = repository
}
func execute(input: InputType) async throws -> OutputType {
return try await repository.fetchSomething(input: input)
}
}
Each UseCase does exactly one thing. Name it as {Verb}{Noun}UseCase:
GetProductDetail — fetches product detailAddToCart — adds item to cartTrackCheckoutEvents — sends checkout analytics{Name}UseCaseProtocol) for testability.final class.execute() by convention.init.async throws for operations that can fail.async for operations that cannot fail.// Simple: no input
func execute() async throws -> [Product]
// With input
func execute(productId: String) async throws -> ProductDetail
// No return (side effect only)
func execute(event: TrackingEvent) async
// Multiple inputs: use a struct
func execute(input: CheckoutInput) async throws -> OrderConfirmation
Register in the appropriate assembly file (typically AppUsecasesAssembly.swift):
container.register({Action}{Entity}UseCaseProtocol.self) { resolver in
let repository = resolver.resolve({Entity}RepositoryProtocol.self)!
return {Action}{Entity}UseCase(repository: repository)
}
execute() methodfinal class implementationSee docs/PATTERNS.md for the canonical UseCase pattern.
See {App}/Domain/UseCases/ for existing implementations.