adapter-expert

Community

Implement robust persistence adapters with CQRS and 1:1 mapping.

Authorryu-qqq
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill standardizes the implementation of persistence adapters (Port-Out) by enforcing strict CQRS separation and a 1:1 mapping between adapters and repositories. It prevents tight coupling, ensures clean infrastructure integration, and makes your persistence layer highly modular and testable.

Core Features & Use Cases

  • CQRS Adapter Separation: Defines distinct CommandAdapter (for persist operations), QueryAdapter (for 4 fixed query methods), AdminQueryAdapter (for complex admin queries with DTO projection), and LockQueryAdapter (for concurrency control).
  • 1:1 Repository Mapping: Ensures each adapter depends on exactly one corresponding repository, simplifying dependencies and responsibilities, and making it easy to swap out persistence technologies.
  • Minimalist Design: Enforces a maximum of two fields per adapter (Repository + Mapper), preventing bloated components and promoting single responsibility.
  • Zero-Tolerance Rules: Prohibits @Transactional (delegates to Application Layer), business logic within adapters, and direct JPAQueryFactory usage, ensuring clean architecture.
  • Use Case: When integrating a new persistence mechanism or standardizing existing ones, use this skill to generate the correct adapter types. This ensures they adhere to architectural principles and maintain a clean separation from the Application Layer, saving development time and reducing errors.

Quick Start

Generate persistence adapters for an 'Order' domain, including Command, Query, and Lock adapters, following 1:1 mapping rules.

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: adapter-expert
Download link: https://github.com/ryu-qqq/AuthHub/archive/main.zip#adapter-expert

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