hexagonal-architecture

Implement Hexagonal Architecture with Ports and Adapters in TypeScript, Java, Kotlin, and Go.

Updated Jul 4, 2026
One-click install
npx skills add https://github.com/Long-NguyenHai/warehouse-ai --skill hexagonal-architecture-long-nguyenhai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-architecture
Source: https://github.com/Long-NguyenHai/warehouse-ai/tree/main/.agents/skills/hexagonal-architecture
Command: npx skills add https://github.com/Long-NguyenHai/warehouse-ai --skill hexagonal-architecture-long-nguyenhai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of maintaining long-term code quality and testability in software systems by introducing Hexagonal Architecture principles, which promote decoupling and dependency management.

Core Features & Use Cases

  • Design & Refactoring: Provides guidance for designing and refactoring systems using Ports and Adapters, which separate business logic from external concerns.
  • Language Support: Offers guidelines applicable to TypeScript, Java, Kotlin, and Go, ensuring a broad range of applications.
  • Use Case: Refactoring a legacy monolithic application into a more maintainable and testable system with clear domain boundaries.

Quick Start

To start using this skill, refer to the 'Suggested Module Layout' section in the SKILL.md file for a guide on structuring your project.

Frequently Asked Questions about hexagonal-architecture

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

FAQPage Schema
How do I refactor a legacy monolith to use hexagonal architecture?

To refactor a legacy monolith using hexagonal architecture, you separate business logic from external concerns by defining ports and adapters, creating clear domain boundaries and enabling dependency inversion for better maintainability.

What is the best way to separate domain logic from external concerns in software architecture?

The best way to separate domain logic from external concerns is applying hexagonal architecture, which uses ports and adapters to isolate business rules, ensuring long-term code quality and making use-case orchestration highly testable.

Does hexagonal architecture work with TypeScript, Java, Kotlin, and Go?

Yes, hexagonal architecture works with TypeScript, Java, Kotlin, and Go. Implementation guidelines are provided for these languages, allowing you to establish clear domain boundaries and dependency inversion across various technology stacks.

How do I structure a project for ports and adapters implementation?

To structure a project for ports and adapters implementation, refer to the suggested module layout guidelines, which provide directions on organizing your system to separate business logic from external dependencies effectively.

When do I need hexagonal architecture for my software system?

You need hexagonal architecture for complex systems requiring long-term maintainability and testability. It is particularly suitable when refactoring legacy monolithic applications into systems with clear domain boundaries and dependency inversion.

Why use domain-driven design to establish clear domain boundaries?

You use domain-driven design with hexagonal architecture to establish clear domain boundaries because it decouples business logic from external concerns, addressing the challenge of maintaining long-term code quality through effective dependency management.