hexagonal-architecture

Enforce hexagonal architecture rules across Kotlin bounded context modules.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/VladlenFilimonov/hex-kotlin-monolith-template --skill hexagonal-architecture-vladlenfilimonov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-architecture
Source: https://github.com/VladlenFilimonov/hex-kotlin-monolith-template/tree/main/.claude/skills/hexagonal-architecture
Command: npx skills add https://github.com/VladlenFilimonov/hex-kotlin-monolith-template --skill hexagonal-architecture-vladlenfilimonov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hexagonal module architecture rules help teams enforce clean boundaries for Kotlin bounded contexts, ensuring ports, adapters, and cross-context wiring remain well-structured and aligned with architectural best practices.

Core Features & Use Cases

  • Defines module structure for each entity (core, in, out, persistence, itest) with clear dependency direction on the core.
  • Enforces core purity, outbound/inbound port contracts, and strict transaction boundary ownership to keep business logic framework-free.
  • Provides guidance for application composition, gateway patterns, orchestrators, and test architecture to support end-to-end flows.

Quick Start

Apply these rules to structure new bounded-context modules and check existing code for hexagonal architecture compliance.

Frequently Asked Questions about hexagonal-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce hexagonal architecture rules in Kotlin bounded contexts?

To enforce hexagonal architecture in Kotlin bounded contexts, apply rules that audit core purity, port patterns, adapter boundaries, and transaction boundaries. This ensures strict dependency direction on the core and keeps business logic framework-free.

What module structure should I use for hexagonal architecture in Kotlin?

The recommended module structure for hexagonal architecture in Kotlin assigns each entity clear modules: core, in, out, persistence, and itest. This organization enforces strict dependency direction on the core and separates outbound and inbound port contracts.

Can I use this to review PRs for ports and adapters architectural compliance?

Yes, you can review PRs for ports and adapters architectural compliance. The rules audit core purity, port patterns, and persistence organization to ensure cross-context wiring and application composition align with hexagonal architecture best practices.

When do I need to apply hexagonal architecture rules to my Kotlin modules?

You need to apply hexagonal architecture rules when creating new bounded contexts or wiring cross-context dependencies. It is also applicable when defining gateway patterns, orchestrators, and test architecture to support end-to-end flows.

What is the best way to keep Kotlin business logic framework-free using ports and adapters?

The best way to keep Kotlin business logic framework-free using ports and adapters is enforcing strict transaction boundary ownership. Defining clear outbound and inbound port contracts ensures the core domain remains isolated from external dependencies.

Does hexagonal architecture auditing check transaction boundaries and persistence organization?

Yes, hexagonal architecture auditing checks transaction boundaries and persistence organization. It validates that transaction boundary ownership is strictly maintained and that persistence modules align with the defined dependency direction on the core.