hexagonal-arch

Defines domain-owned ports and implements adapters to enforce inward dependency flow in hexagonal architecture.

3|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/ralvarezdev/ralvaskills --skill hexagonal-arch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-arch
Source: https://github.com/ralvarezdev/ralvaskills/tree/main/skills/design/hexagonal-arch
Command: npx skills add https://github.com/ralvarezdev/ralvaskills --skill hexagonal-arch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hexagonal architecture isolates the domain core from external systems by enforcing inward dependencies and explicit ports and adapters, reducing tension between business rules and implementation details.

Core Features & Use Cases

  • Defines the Domain Core, Ports (domain-owned interfaces), and Adapters (concrete implementations) to structure software with clear boundaries.
  • Enforces dependency direction: domain imports nothing outward; adapters import the domain and implement its ports.
  • Use Case: A team designs a service with swappable persistence or integration adapters while keeping business logic in the domain stable and independent.

Quick Start

Define domain ports, implement adapters in dedicated packages, and wire them with application services.

Frequently Asked Questions about hexagonal-arch

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

FAQPage Schema
What is hexagonal architecture and how does it keep domain logic clean?

Hexagonal architecture isolates the domain core from infrastructure by enforcing inward dependencies and explicit ports and adapters, keeping business logic stable and independent from external systems.

How do I structure ports and adapters when applying hexagonal architecture?

To structure hexagonal architecture, define domain-owned ports as interfaces within the domain core, then implement concrete adapters in dedicated packages outside the domain to handle persistence or integration.

When do I need ports and adapters in software design?

You need ports and adapters when designing a service with swappable persistence or integration components, ensuring business rules remain decoupled from implementation details and infrastructure changes.

Does hexagonal architecture work with domain-driven design?

Yes, hexagonal architecture complements domain-driven design by isolating the domain core, placing interfaces in the domain, and ensuring adapters implement those interfaces without violating inward dependency flow.

What is the best way to enforce inward dependencies in a hexagonal architecture review?

The best way to enforce inward dependencies during an architecture review is to verify that the domain imports nothing outward, while all adapters import the domain and implement its defined ports.

Why does isolating the domain core reduce tension between business rules and infrastructure?

Isolating the domain core reduces tension by decoupling business rules from implementation details, allowing infrastructure adapters to vary independently without modifying the stable domain logic.