hexagonal-architecture

Guide implementation of Hexagonal Architecture and Domain-Driven Design principles.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/Devattom/.claude --skill hexagonal-architecture-devattom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-architecture
Source: https://github.com/Devattom/.claude/tree/main/skills/hexagonal-architecture
Command: npx skills add https://github.com/Devattom/.claude --skill hexagonal-architecture-devattom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and best practices for implementing the Hexagonal Architecture (Ports and Adapters) combined with Domain-Driven Design principles, ensuring clean separation of concerns and high testability.

Core Features & Use Cases

  • Architectural Guidance: Understand the layered model (Domain, Application, Infrastructure) and the dependency rule.
  • DDD Implementation: Learn how to structure Entities, Value Objects, Repository Interfaces (Ports), Domain Services, and Domain Events.
  • Application Layer: Implement Use Cases, Commands, Queries, and external service ports.
  • Infrastructure Layer: Develop Repository Adapters, Controllers, and external service adapters.
  • Use Case: When designing a new feature that involves core business logic, user interactions, and data persistence, use this Skill to ensure a clean, scalable, and testable architecture.

Quick Start

Use the hexagonal-architecture skill to structure a new domain entity for a user profile.

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, or ports and adapters, isolates core domain logic by defining application use cases and ports, orchestrating infrastructure adapters externally to ensure strict separation of concerns and high testability across software layers.

How do I implement domain-driven design entities and value objects for a new feature?

To implement domain-driven design, structure your core layer using entities and value objects, define repository interfaces as ports, and orchestrate data persistence through external infrastructure adapters to ensure modular software design.

When should I use ports and adapters instead of a standard layered software design?

Use ports and adapters when designing features involving core business logic and data persistence, requiring strict dependency rules and high testability, to ensure a clean, scalable, and maintainable software architecture.

How do I structure application use cases and commands in clean architecture?

Structure application use cases in clean architecture by implementing commands, queries, and external service ports within the application layer, orchestrating infrastructure adapters to handle user interactions and data persistence.

Does hexagonal architecture require specific frameworks to implement domain services and events?

Hexagonal architecture does not require specific frameworks, as it provides structural guidance for defining domain services, domain events, and repository interfaces using plain code to maintain framework independence.