Skip to content
affaan-m avatar

Hexagonal Architecture

Design, implement, and refactor Ports and Adapters systems with dependency inversion across four languages.

CCM score
73 of 100
skills.sh installs
11.9K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers domain modeling, use-case orchestration, outbound and inbound ports, adapters, and composition roots for each feature boundary
  • Includes a six-step workflow, a Mermaid dependency diagram, a feature-first module layout, and a complete TypeScript example
  • Enforces inward-only dependencies: adapters point to application code, and domain code imports no framework or infrastructure
  • Provides per-language mapping for TypeScript, Java, Kotlin, and Go, for refactoring framework-heavy code or supporting several delivery interfaces

Install

$ npx -y skills add affaan-m/ecc --skill hexagonal-architecture -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Hexagonal Architecture

Hexagonal architecture (Ports and Adapters) keeps business logic independent from frameworks, transport, and persistence details. The core app depends on abstract ports, and adapters implement those ports at the edges.

When to Use

  • Building new features where long-term maintainability and testability matter.
  • Refactoring layered or framework-heavy code where domain logic is mixed with I/O concerns.
  • Supporting multiple interfaces for the same use case (HTTP, CLI, queue workers, cron jobs).
  • Replacing infrastructure (database, external APIs, message bus) without rewriting business rules.

Use this skill when the request involves boundaries, domain-centric design, refactoring tightly coupled services, or decoupling application logic from specific libraries.

Core Concepts

Details

Repository
github.com/affaan-m/ecc
Category
Backend & APIs
First seen
Jul 14, 2026

Questions

What does the hexagonal-architecture skill do?

It designs, implements, and refactors Ports and Adapters systems, keeping domain logic independent from frameworks, transport, and persistence. It covers TypeScript, Java, Kotlin, and Go services and helps make use cases testable through dependency inversion.

When should I use the hexagonal-architecture skill?

Use it when building new features where long-term maintainability and testability matter, or when refactoring code where domain logic has become entangled with I/O. It also fits cases where one use case must serve several interfaces, such as HTTP, CLI, queue workers, or cron jobs.

How do I install the hexagonal-architecture skill?

Run npx -y skills add affaan-m/ecc --skill hexagonal-architecture -y in your project. After that, the agent can design ports, use cases, and adapters with a clear boundary between business rules and infrastructure.

Where does hexagonal-architecture stand in the Backend & APIs category?

It ranks in the top 100 of the Backend & APIs category on Claude Marketplaces, alongside skills such as neon and firebase-basics. It sets itself apart by focusing on Ports and Adapters boundaries and dependency inversion across several languages.

More from affaan-m/ecc

All 257

Similar to Hexagonal Architecture

More Backend & APIs