From kotlin-architecture
Apply when creating or moving, files or packages (also plan mode) and project is using hexagonal architecture.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kotlin-architecture:applying-pragmatic-hexagonalThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Organise code with hexagonal architecture so business is protected from the rippling effects of infrastructure changes.
Organise code with hexagonal architecture so business is protected from the rippling effects of infrastructure changes. The following guidelines provide a pragmatic approach to hexagonal architecture that avoids unnecessary abstractions and boilerplate.
inbound infra adapters → application → domain ← outbound infra adapters
src/main/kotlin/<company-package>/
├── domain/model/ # Core business logic (pure, no framework dependencies), Aggregates, entities, value objects, domain events, ports
├── application/ # Use cases - orchestration of infrastructure and domain to provide business services
│ ├── services/ # Command services (write operations)
│ └── queries/ # Query handlers (read operations)
└── infra/ # Infrastructure adapters, thin translation layer
├── inbound/ # HTTP controllers, message consumers, schedulers
├── outbound/ # Repositories, HTTP clients, message producers
└── config/ # Spring configuration
src/main/kotlin/<company-package>/
├── domain/
│ ├── model/ # Core business logic (pure, no framework dependencies), Aggregates, entities, value objects, domain events, ports
│ ├── ports/ # Interfaces for outbound dependencies (repositories, external services)
│ └── usecases/ # Use cases - orchestration of infrastructure and domain to provide business services
└── infrastructure/ # Infrastructure adapters, thin translation layer
├── inbound/ # HTTP controllers, message consumers, schedulers
├── outbound/ # Repositories, HTTP clients, message producers
└── config/ # Spring configuration
Allow any other structure as long as it is consistent and logical to hexagonal architecture.
This approach intentionally simplifies classical hexagonal architecture:
@Transactional, @Service)npx claudepluginhub allousas/claude-code-plugins --plugin kotlin-architectureDesign, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.
Designs, implements, and refactors hexagonal architecture (ports & adapters) with clear domain boundaries, dependency inversion, and testable use cases across TypeScript, Java, Kotlin, and Go.
Reviews Java code for Clean/Hexagonal Architecture violations and DDD patterns; scaffolds hexagonal structure with ports, adapters, and value objects.