hexagonal-architecture

Define Domain, Application, and Adapter boundaries with ports and adapters.

225|62|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/lexler/skill-factory --skill hexagonal-architecture-lexler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-architecture
Source: https://github.com/lexler/skill-factory/tree/main/output_skills/design/hexagonal-architecture
Command: npx skills add https://github.com/lexler/skill-factory --skill hexagonal-architecture-lexler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a principled pattern for structuring software so that domain logic remains independent from infrastructure, improving testability, maintainability, and adaptability.

Core Features & Use Cases

  • Clear separation between Domain, Application, and Adapters layers.
  • Emphasizes the Ports & Adapters boundary to simplify testing and replacement of external systems.
  • Suitable for designing new apps, refactoring legacy architectures, or explaining architecture decisions to teams.

Quick Start

Ask Claude to outline a hexagonal architecture for your domain, then request a ports-and-adapters diagram and boundary definitions.

Frequently Asked Questions about hexagonal-architecture

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

FAQPage Schema
What is hexagonal architecture and how does it separate domain logic from infrastructure?

Hexagonal architecture defines a clean boundary between core domain logic and external systems using ports and adapters. This separation reduces coupling, ensuring your domain remains independent of infrastructure to improve testability and maintainability.

How do I structure a new application using ports and adapters?

Structure your application by separating it into Domain, Application, and Adapters layers. Define ports as interfaces at the domain boundary, then implement adapters to connect external systems, ensuring dependencies always point inward toward the core.

When should I use hexagonal architecture for my software design?

Use hexagonal architecture when you need stable boundaries for easier testing and replacement of external systems. It is applicable for designing new apps, refactoring legacy architectures, or explaining architecture decisions to teams.

What is the best way to decouple core domain logic from external systems during refactoring?

The best way to decouple core domain logic during refactoring is applying the ports and adapters pattern. It enforces dependency rules that isolate the domain and application layers from infrastructure, enabling easier testing and adaptability.

Can I use hexagonal architecture to explain architecture decisions to my team?

Yes, you can use hexagonal architecture to explain design decisions to teams. It specifies a clear separation of Domain, Application, and Adapters layers, making it easier to communicate boundary definitions and dependency rules.