Agent skill · software engineering · affaan-m

hexagonal-architecture

ヘキサゴナルアーキテクチャ(ポート・アダプタパターン)、境界の分離、および外部依存関係の管理。

Why this skill is useful

Provides specific architectural patterns and practices for implementing hexagonal architecture that the AI wouldn't reliably generate on its own.

What it needs

About 5k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.

What this skill does

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 Domain model: Business rules and entities/value objects. No framework imports. Use cases (application layer): Orchestrate domain behavior and workflow steps. Inbound ports: Contracts describing what the application can do (commands/queries/use-case interfaces). Outbound ports: Contracts for dependencies the application needs (repositories, gateways, event publishers, clock, UUID, etc.). Adapters: Infrastructure and delivery implementations of ports (HTTP controllers, DB repositories, queue consumers, SDK wrappers). Composition root: Single wiring location where concrete adapters are bound to use cases. Outbound port interfaces usually live in the application layer (or in domain only when the abstraction is truly domain-level), while infrastructure adapters implement them. Dependency direction is always inward: Adapters -> application/domain Application -> port interfaces (inbound/outbound contracts) Domain -> domain-only abstractions (no framework or infrastructure dependencies) Domain -> nothing external How It Works Step 1: Model a use case boundary Define a single use case with a clear input and output DTO. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills affaan-m/hexagonal-architecture--878d6e

View the source on GitHub

Browse the @skills marketplace