hexagonal

Implement Hexagonal Architecture to isolate domain logic from infrastructure layers.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/hung-phan/system-skills --skill hexagonal-hung-phan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal
Source: https://github.com/hung-phan/system-skills/tree/main/skills/system-review/references/architecture-patterns/hexagonal
Command: npx skills add https://github.com/hung-phan/system-skills --skill hexagonal-hung-phan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you implement Hexagonal Architecture, which isolates domain logic from infrastructure, allowing for easier testing, swapping, and scaling.

Core Features & Use Cases

  • Domain Isolation: Keep business logic separate from infrastructure, such as databases, message brokers, and HTTP frameworks.
  • Flexible Adapters: Use adapters to connect your domain to different infrastructure layers without changing the domain code.
  • Use Case: Implement a payment processing system where the domain handles business rules, while different adapters handle integration with payment gateways and databases.

Quick Start

Use the hexagonal skill to design a payment processing system that separates domain logic from infrastructure layers.

Frequently Asked Questions about hexagonal

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

FAQPage Schema
What is hexagonal architecture in domain-driven design?

Hexagonal architecture isolates domain logic from infrastructure components like databases and message brokers, enabling flexible and testable applications through clear separation of concerns between domain, application, and infrastructure layers.

How do I separate business logic from infrastructure code in a payment processing system?

You separate business logic by using adapters to connect your domain to external payment gateways and databases without changing the core domain code, ensuring business rules remain infrastructure-agnostic.

Do I need to know domain-driven design concepts to implement hexagonal architecture?

Yes, implementing hexagonal architecture requires prior knowledge of domain-driven design concepts and software architecture patterns to properly structure the domain, application, and infrastructure layers.

What's the best way to make software architecture infrastructure-agnostic for easier testing?

The best way to make software architecture infrastructure-agnostic is to isolate domain logic using flexible adapters, allowing you to swap infrastructure layers like databases and message brokers without altering domain code.

When should I use flexible adapters in software architecture?

You should use flexible adapters when you need to connect your isolated domain logic to different infrastructure layers, such as swapping payment gateways or message brokers, without modifying the underlying business rules.

Why isolate domain logic from HTTP frameworks and databases?

Isolating domain logic from HTTP frameworks and databases allows for easier testing, swapping, and scaling of applications by ensuring infrastructure changes do not impact core business rules.