hexagonal-architecture

Apply hexagonal architecture to isolate domain logic from infrastructure concerns.

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/nassimbf/ftitos-claude-code --skill hexagonal-architecture-nassimbf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-architecture
Source: https://github.com/nassimbf/ftitos-claude-code/tree/main/skills/hexagonal-architecture
Command: npx skills add https://github.com/nassimbf/ftitos-claude-code --skill hexagonal-architecture-nassimbf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hexagonal architecture (Ports & Adapters) keeps business logic independent from frameworks, transport, and persistence details, enabling long-term maintainability and testability.

Core Features & Use Cases

  • Domain-centric design with explicit domain models and use cases.
  • Inbound and outbound ports that decouple the core from adapters (HTTP, CLI, DB, etc.).
  • Guidance for structured testing, migration playbooks, and incremental refactors.

Quick Start

Sketch your domain boundaries and map inbound and outbound ports to implement the feature with adapters.

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 isolate domain logic?

Hexagonal architecture (Ports & Adapters) isolates core domain logic from infrastructure concerns by defining explicit domain models, use cases, and inbound/outbound ports, ensuring business logic remains independent from frameworks and persistence details.

How do I structure ports and adapters for a domain-centric application?

Structure ports and adapters by sketching domain boundaries first, then mapping inbound and outbound ports to decouple the core, implementing features with adapters for HTTP, CLI, or DB transport layers within a modular layout.

When should I use hexagonal architecture for software design?

Use hexagonal architecture when long-term maintainability and testability are priorities, requiring business logic to stay decoupled from transport, frameworks, and persistence layers through explicit domain boundaries.

Can I incrementally refactor an existing application to use ports and adapters?

Yes, the approach provides migration playbooks and guidance for incremental refactors, allowing existing applications to transition toward a domain-focused architecture with a composition root without requiring a full rewrite.

How does hexagonal architecture improve testing strategy?

Hexagonal architecture improves testing by decoupling the core domain from adapters, enabling structured testing of use cases and domain models in isolation without relying on infrastructure components like databases or HTTP endpoints.

What are the limitations of applying ports and adapters in software design?

Applying ports and adapters introduces structural overhead through explicit ports and adapter layers, which may be excessive for simple CRUD applications where domain logic complexity does not warrant full architectural isolation.