usecase-expert

Community

Design clean UseCase interfaces and services, effortlessly.

Authorryu-qqq
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guides the design and implementation of the Application Layer's UseCase interfaces (Port-In) and Service implementations. It ensures a clean separation of concerns, adheres to CQRS principles, and manages transaction boundaries properly, leading to highly maintainable and testable business logic.

Core Features & Use Cases

  • UseCase Interface Definition: Creates clear, single-responsibility UseCase interfaces (e.g., PlaceOrderUseCase, GetOrderUseCase) as inbound ports, defining the application's capabilities.
  • CQRS Service Implementation: Generates distinct Command Services (for state changes) and Query Services (for data retrieval), adhering to the "execute()" single-method pattern for consistency.
  • DTO Management: Defines Command, Query, and Response DTOs as immutable records, ensuring data integrity and clear communication between layers.
  • Transaction Boundary Delegation: Enforces that @Transactional annotations are managed by Facade/Manager components, not directly within Services, for better control and testability.
  • Use Case: When developing a new business capability, use this skill to define the UseCase interface, implement its service, and create the necessary DTOs. This ensures it aligns with the hexagonal architecture and CQRS, accelerating development and reducing architectural debt.

Quick Start

Create a 'Place Order' UseCase, including its interface, command DTO, response DTO, and service implementation.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: usecase-expert
Download link: https://github.com/ryu-qqq/AuthHub/archive/main.zip#usecase-expert

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository