[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JV3FABZ15N0ZB2YSA58ADE":3,"skill-same:01M6JV3FABZ15N0ZB2YSA58ADE":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6JV3FABZ15N0ZB2YSA58ADE","hexagonal-architecture",null,"Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1559,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FColin4k1024\u002Ftsp\u002Fskills\u002Fhexagonal-architecture\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"hexagonal","architecture","hexagonal architecture","kotlin","inversion","with","case","across","domain","dependency","use","design","ports","refactor","services","java","orchestration","implement","go","typescript","2026-11-10 10:12:30",false,"---\nname: hexagonal-architecture\ndescription: Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.\norigin: ECC\n---\n\n# Hexagonal Architecture\n\nHexagonal 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.\n\n## When to Use\n\n- Building new features where long-term maintainability and testability matter.\n- Refactoring layered or framework-heavy code where domain logic is mixed with I\u002FO concerns.\n- Supporting multiple interfaces for the same use case (HTTP, CLI, queue workers, cron jobs).\n- Replacing infrastructure (database, external APIs, message bus) without rewriting business rules.\n\nUse this skill when the request involves boundaries, domain-centric design, refactoring tightly coupled services, or decoupling application logic from specific libraries.\n\n## Core Concepts\n\n- **Domain model**: Business rules and entities\u002Fvalue objects. No framework imports.\n- **Use cases (application layer)**: Orchestrate domain behavior and workflow steps.\n- **Inbound ports**: Contracts describing what the application can do (commands\u002Fqueries\u002Fuse-case interfaces).\n- **Outbound ports**: Contracts for dependencies the application needs (repositories, gateways, event publishers, clock, UUID, etc.).\n- **Adapters**: Infrastructure and delivery implementations of ports (HTTP controllers, DB repositories, queue consumers, SDK wrappers).\n- **Composition root**: Single wiring location where concrete adapters are bound to use cases.\n\nOutbound port interfaces usually live in the application layer (or in domain only when the abstraction is truly domain-level), while infrastructure adapters implement them.\n\nDependency direction is always inward:\n\n- Adapters -> application\u002Fdomain\n- Application -> port interfaces (inbound\u002Foutbound contracts)\n- Domain -> domain-only abstractions (no framework or infrastructure dependencies)\n- Domain -> nothing external\n\n## How It Works\n\n### Step 1: Model a use case boundary\n\nDefine a single use case with a clear input and output DTO. Keep transport details (Express `req`, GraphQL `context`, job payload wrappers) outside this boundary.\n\n### Step 2: Define outbound ports first\n\nIdentify every side effect as a port:\n\n- persistence (`UserRepositoryPort`)\n- external calls (`BillingGatewayPort`)\n- cross-cutting (`LoggerPort`, `ClockPort`)\n\nPorts should model capabilities, not technologies.\n\n### Step 3: Implement the use case with pure orchestration\n\nUse case class\u002Ffunction receives ports via constructor\u002Farguments. It validates application-level invariants, coordinates domain rules, and returns plain data structures.\n\n### Step 4: Build adapters at the edge\n\n- Inbound adapter converts protocol input to use-case input.\n- Outbound adapter maps app contracts to concrete APIs\u002FORM\u002Fquery builders.\n- Mapping stays in adapters, not inside use cases.\n\n### Step 5: Wire everything in a composition root\n\nInstantiate adapters, then inject them into use cases. Keep this wiring centralized to avoid hidden service-locator behavior.\n\n### Step 6: Test per boundary\n\n- Unit test use cases with fake ports.\n- Integration test adapters with real infra dependencies.\n- E2E test user-facing flows through inbound adapters.\n\n## Architecture Diagram\n\n```mermaid\nflowchart LR\n  Client[\"Client (HTTP\u002FCLI\u002FWorker)\"] --> InboundAdapter[\"Inbound Adapter\"]\n  InboundAdapter -->|\"calls\"| UseCase[\"UseCase (Application Layer)\"]\n  UseCase -->|\"uses\"| OutboundPort[\"OutboundPort (Interface)\"]\n  OutboundAdapter[\"Outbound Adapter\"] -->|\"implements\"| OutboundPort\n  OutboundAdapter --> ExternalSystem[\"DB\u002FAPI\u002FQueue\"]\n  UseCase --> DomainModel[\"DomainModel\"]\n```\n\n## Suggested Module Layout\n\nUse feature-first organization with explicit boundaries:\n\n```text\nsrc\u002F\n  features\u002F\n    orders\u002F\n      domain\u002F\n        Order.ts\n        OrderPolicy.ts\n      application\u002F\n        ports\u002F\n          inbound\u002F\n            CreateOrder.ts\n          outbound\u002F\n            OrderRepositoryPort.ts\n            PaymentGatewayPort.ts\n        use-cases\u002F\n          CreateOrderUseCase.ts\n      adapters\u002F\n        inbound\u002F\n          http\u002F\n            createOrderRoute.ts\n        outbound\u002F\n          postgres\u002F\n            PostgresOrderRepository.ts\n          stripe\u002F\n            StripePaymentGateway.ts\n      composition\u002F\n        ordersContainer.ts\n```\n\n## TypeScript Example\n\n### Port definitions\n\n```typescript\nexport interface OrderRepositoryPort {\n  save(order: Order): Promise\u003Cvoid>;\n  findById(orderId: string): Promise\u003COrder | null>;\n}\n\nexport interface PaymentGatewayPort {\n  authorize(input: { orderId: string; amountCents: number }): Promise\u003C{ authorizationId: string }>;\n}\n```\n\n### Use case\n\n```typescript\ntype CreateOrderInput = {\n  orderId: string;\n  amountCents: number;\n};\n\ntype CreateOrderOutput = {\n  orderId: string;\n  authorizationId: string;\n};\n\nexport class CreateOrderUseCase {\n  constructor(\n    private readonly orderRepository: OrderRepositoryPort,\n    private readonly paymentGateway: PaymentGatewayPort\n  ) {}\n\n  async execute(input: CreateOrderInput): Promise\u003CCreateOrderOutput> {\n    const order = Order.create({ id: input.orderId, amountCents: input.amountCents });\n\n    const auth = await this.paymentGateway.authorize({\n      orderId: order.id,\n      amountCents: order.amountCents,\n    });\n\n    \u002F\u002F markAuthorized returns a new Order instance; it does not mutate in place.\n    const authorizedOrder = order.markAuthorized(auth.authorizationId);\n    await this.orderRepository.save(authorizedOrder);\n\n    return {\n      orderId: order.id,\n      authorizationId: auth.authorizationId,\n    };\n  }\n}\n```\n\n### Outbound adapter\n\n```typescript\nexport class PostgresOrderRepository implements OrderRepositoryPort {\n  constructor(private readonly db: SqlClient) {}\n\n  async save(order: Order): Promise\u003Cvoid> {\n    await this.db.query(\n      \"insert into orders (id, amount_cents, status, authorization_id) values ($1, $2, $3, $4)\",\n      [order.id, order.amountCents, order.status, order.authorizationId]\n    );\n  }\n\n  async findById(orderId: string): Promise\u003COrder | null> {\n    const row = await this.db.oneOrNone(\"select * from orders where id = $1\", [orderId]);\n    return row ? Order.rehydrate(row) : null;\n  }\n}\n```\n\n### Composition root\n\n```typescript\nexport const buildCreateOrderUseCase = (deps: { db: SqlClient; stripe: StripeClient }) => {\n  const orderRepository = new PostgresOrderRepository(deps.db);\n  const paymentGateway = new StripePaymentGateway(deps.stripe);\n\n  return new CreateOrderUseCase(orderRepository, paymentGateway);\n};\n```\n\n## Multi-Language Mapping\n\nUse the same boundary rules across ecosystems; only syntax and wiring style change.\n\n- **TypeScript\u002FJavaScript**\n    - Ports: `application\u002Fports\u002F*` as interfaces\u002Ftypes.\n    - Use cases: classes\u002Ffunctions with constructor\u002Fargument injection.\n    - Adapters: `adapters\u002Finbound\u002F*`, `adapters\u002Foutbound\u002F*`.\n    - Composition: explicit factory\u002Fcontainer module (no hidden globals).\n- **Java**\n    - Packages: `domain`, `application.port.in`, `application.port.out`, `application.usecase`, `adapter.in`, `adapter.out`.\n    - Ports: interfaces in `application.port.*`.\n    - Use cases: plain classes (Spring `@Service` is optional, not required).\n    - Composition: Spring config or manual wiring class; keep wiring out of domain\u002Fuse-case classes.\n- **Kotlin**\n    - Modules\u002Fpackages mirror the Java split (`domain`, `application.port`, `application.usecase`, `adapter`).\n    - Ports: Kotlin interfaces.\n    - Use cases: classes with constructor injection (Koin\u002FDagger\u002FSpring\u002Fmanual).\n    - Composition: module definitions or dedicated composition functions; avoid service locator patterns.\n- **Go**\n    - Packages: `internal\u002F\u003Cfeature>\u002Fdomain`, `application`, `ports`, `adapters\u002Finbound`, `adapters\u002Foutbound`.\n    - Ports: small interfaces owned by the consuming application package.\n    - Use cases: structs with interface fields plus explicit `New...` constructors.\n    - Composition: wire in `cmd\u002F\u003Capp>\u002Fmain.go` (or dedicated wiring package), keep constructors explicit.\n\n## Anti-Patterns to Avoid\n\n- Domain entities importing ORM models, web framework types, or SDK clients.\n- Use cases reading directly from `req`, `res`, or queue metadata.\n- Returning database rows directly from use cases without domain\u002Fapplication mapping.\n- Letting adapters call each other directly instead of flowing through use-case ports.\n- Spreading dependency wiring across many files with hidden global singletons.\n\n## Migration Playbook\n\n1. Pick one vertical slice (single endpoint\u002Fjob) with frequent change pain.\n2. Extract a use-case boundary with explicit input\u002Foutput types.\n3. Introduce outbound ports around existing infrastructure calls.\n4. Move orchestration logic from controllers\u002Fservices into the use case.\n5. Keep old adapters, but make them delegate to the new use case.\n6. Add tests around the new boundary (unit + adapter integration).\n7. Repeat slice-by-slice; avoid full rewrites.\n\n### Refactoring Existing Systems\n\n- **Strangler approach**: keep current endpoints, route one use case at a time through new ports\u002Fadapters.\n- **No big-bang rewrites**: migrate per feature slice and preserve behavior with characterization tests.\n- **Facade first**: wrap legacy services behind outbound ports before replacing internals.\n- **Composition freeze**: centralize wiring early so new dependencies do not leak into domain\u002Fuse-case layers.\n- **Slice selection rule**: prioritize high-churn, low-blast-radius flows first.\n- **Rollback path**: keep a reversible toggle or route switch per migrated slice until production behavior is verified.\n\n## Testing Guidance (Same Hexagonal Boundaries)\n\n- **Domain tests**: test entities\u002Fvalue objects as pure business rules (no mocks, no framework setup).\n- **Use-case unit tests**: test orchestration with fakes\u002Fstubs for outbound ports; assert business outcomes and port interactions.\n- **Outbound adapter contract tests**: define shared contract suites at port level and run them against each adapter implementation.\n- **Inbound adapter tests**: verify protocol mapping (HTTP\u002FCLI\u002Fqueue payload to use-case input and output\u002Ferror mapping back to protocol).\n- **Adapter integration tests**: run against real infrastructure (DB\u002FAPI\u002Fqueue) for serialization, schema\u002Fquery behavior, retries, and timeouts.\n- **End-to-end tests**: cover critical user journeys through inbound adapter -> use case -> outbound adapter.\n- **Refactor safety**: add characterization tests before extraction; keep them until new boundary behavior is stable and equivalent.\n\n## Best Practices Checklist\n\n- Domain and use-case layers import only internal types and ports.\n- Every external dependency is represented by an outbound port.\n- Validation occurs at boundaries (inbound adapter + use-case invariants).\n- Use immutable transformations (return new values\u002Fentities instead of mutating shared state).\n- Errors are translated across boundaries (infra errors -> application\u002Fdomain errors).\n- Composition root is explicit and easy to audit.\n- Use cases are testable with simple in-memory fakes for ports.\n- Refactoring starts from one vertical slice with behavior-preserving tests.\n- Language\u002Fframework specifics stay in adapters, never in domain rules.\n","# Hexagonal Architecture\n\nHexagonal 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.\n\n## When to Use\n\n- Building new features where long-term maintainability and testability matter.\n- Refactoring layered or framework-heavy code where domain logic is mixed with I\u002FO concerns.\n- Supporting multiple interfaces for the same use case (HTTP, CLI, queue workers, cron jobs).\n- Replacing infrastructure (database, external APIs, message bus) without rewriting business rules.\n\nUse this skill when the request involves boundaries, domain-centric design, refactoring tightly coupled services, or decoupling application logic from specific libraries.\n\n## Core Concepts\n\n- **Domain model**: Business rules and entities\u002Fvalue objects. No framework imports.\n- **Use cases (application layer)**: Orchestrate domain behavior and workflow steps.\n- **Inbound ports**: Contracts describing what the application can do (commands\u002Fqueries\u002Fuse-case interfaces).\n- **Outbound ports**: Contracts for dependencies the application needs (repositories, gateways, event publishers, clock, UUID, etc.).\n- **Adapters**: Infrastructure and delivery implementations of ports (HTTP controllers, DB repositories, queue consumers, SDK wrappers).\n- **Composition root**: Single wiring location where concrete adapters are bound to use cases.\n\nOutbound port interfaces usually live in the application layer (or in domain only when the abstraction is truly domain-level), while infrastructure adapters implement them.\n\nDependency direction is always inward:\n\n- Adapters -> application\u002Fdomain\n- Application -> port interfaces (inbound\u002Foutbound contracts)\n- Domain -> domain-only abstractions (no framework or infrastructure dependencies)\n- Domain -> nothing external\n\n## How It Works\n\n### Step 1: Model a use case boundary\n\nDefine a single use case with a clear input and output DTO. Keep transport details (Express `req`, GraphQL `context`, job payload wrappers) outside this boundary.\n\n### Step 2: Define outbound ports first\n\nIdentify every side effect as a port:\n\n- persistence (`UserRepositoryPort`)\n- external calls (`BillingGatewayPort`)\n- cross-cutting (`LoggerPort`, `ClockPort`)\n\nPorts should model capabilities, not technologies.\n\n### Step 3: Implement the use case with pure orchestration\n\nUse case class\u002Ffunction receives ports via constructor\u002Farguments. It validates application-level invariants, coordinates domain rules, and returns plain data structures.\n\n### Step 4: Build adapters at the edge\n\n- Inbound adapter converts protocol input to use-case input.\n- Outbound adapter maps app contracts to concrete APIs\u002FORM\u002Fquery builders.\n- Mapping stays in adapters, not inside use cases.\n\n### Step 5: Wire everything in a composition root\n\nInstantiate adapters, then inject them into use cases. Keep this wiring centralized to avoid hidden service-locator behavior.\n\n### Step 6: Test per boundary\n\n- Unit test use cases with fake ports.\n- Integration test adapters with real infra dependencies.\n- E2E test user-facing flows through inbound adapters.\n\n## Architecture Diagram\n\n```mermaid\nflowchart LR\n  Client[\"Client (HTTP\u002FCLI\u002FWorker)\"] --> InboundAdapter[\"Inbound Adapter\"]\n  InboundAdapter -->|\"calls\"| UseCase[\"UseCase (Application Layer)\"]\n  UseCase -->|\"uses\"| OutboundPort[\"OutboundPort (Interface)\"]\n  OutboundAdapter[\"Outbound Adapter\"] -->|\"implements\"| OutboundPort\n  OutboundAdapter --> ExternalSystem[\"DB\u002FAPI\u002FQueue\"]\n  UseCase --> DomainModel[\"DomainModel\"]\n```\n\n## Suggested Module Layout\n\nUse feature-first organization with explicit boundaries:\n\n```text\nsrc\u002F\n  features\u002F\n    orders\u002F\n      domain\u002F\n        Order.ts\n        OrderPolicy.ts\n      application\u002F\n        ports\u002F\n          inbound\u002F\n            CreateOrder.ts\n          outbound\u002F\n            OrderRepositoryPort.ts\n            PaymentGatewayPort.ts\n        use-cases\u002F\n          CreateOrderUseCase.ts\n      adapters\u002F\n        inbound\u002F\n          http\u002F\n            createOrderRoute.ts\n        outbound\u002F\n          postgres\u002F\n            PostgresOrderRepository.ts\n          stripe\u002F\n            StripePaymentGateway.ts\n      composition\u002F\n        ordersContainer.ts\n```\n\n## TypeScript Example\n\n### Port definitions\n\n```typescript\nexport interface OrderRepositoryPort {\n  save(order: Order): Promise\u003Cvoid>;\n  findById(orderId: string): Promise\u003COrder | null>;\n}\n\nexport interface PaymentGatewayPort {\n  authorize(input: { orderId: string; amountCents: number }): Promise\u003C{ authorizationId: string }>;\n}\n```\n\n### Use case\n\n```typescript\ntype CreateOrderInput = {\n  orderId: string;\n  amountCents: number;\n};\n\ntype CreateOrderOutput = {\n  orderId: string;\n  authorizationId: string;\n};\n\nexport class CreateOrderUseCase {\n  constructor(\n    private readonly orderRepository: OrderRepositoryPort,\n    private readonly paymentGateway: PaymentGatewayPort\n  ) {}\n\n  async execute(input: CreateOrderInput): Promise\u003CCreateOrderOutput> {\n    const order = Order.create({ id: input.orderId, amountCents: input.amountCents });\n\n    const auth = await this.paymentGateway.authorize({\n      orderId: order.id,\n      amountCents: order.amountCents,\n    });\n\n    \u002F\u002F markAuthorized returns a new Order instance; it does not mutate in place.\n    const authorizedOrder = order.markAuthorized(auth.authorizationId);\n    await this.orderRepository.save(authorizedOrder);\n\n    return {\n      orderId: order.id,\n      authorizationId: auth.authorizationId,\n    };\n  }\n}\n```\n\n### Outbound adapter\n\n```typescript\nexport class PostgresOrderRepository implements OrderRepositoryPort {\n  constructor(private readonly db: SqlClient) {}\n\n  async save(order: Order): Promise\u003Cvoid> {\n    await this.db.query(\n      \"insert into orders (id, amount_cents, status, authorization_id) values ($1, $2, $3, $4)\",\n      [order.id, order.amountCents, order.status, order.authorizationId]\n    );\n  }\n\n  async findById(orderId: string): Promise\u003COrder | null> {\n    const row = await this.db.oneOrNone(\"select * from orders where id = $1\", [orderId]);\n    return row ? Order.rehydrate(row) : null;\n  }\n}\n```\n\n### Composition root\n\n```typescript\nexport const buildCreateOrderUseCase = (deps: { db: SqlClient; stripe: StripeClient }) => {\n  const orderRepository = new PostgresOrderRepository(deps.db);\n  const paymentGateway = new StripePaymentGateway(deps.stripe);\n\n  return new CreateOrderUseCase(orderRepository, paymentGateway);\n};\n```\n\n## Multi-Language Mapping\n\nUse the same boundary rules across ecosystems; only syntax and wiring style change.\n\n- **TypeScript\u002FJavaScript**\n    - Ports: `application\u002Fports\u002F*` as interfaces\u002Ftypes.\n    - Use cases: classes\u002Ffunctions with constructor\u002Fargument injection.\n    - Adapters: `adapters\u002Finbound\u002F*`, `adapters\u002Foutbound\u002F*`.\n    - Composition: explicit factory\u002Fcontainer module (no hidden globals).\n- **Java**\n    - Packages: `domain`, `application.port.in`, `application.port.out`, `application.usecase`, `adapter.in`, `adapter.out`.\n    - Ports: interfaces in `application.port.*`.\n    - Use cases: plain classes (Spring `@Service` is optional, not required).\n    - Composition: Spring config or manual wiring class; keep wiring out of domain\u002Fuse-case classes.\n- **Kotlin**\n    - Modules\u002Fpackages mirror the Java split (`domain`, `application.port`, `application.usecase`, `adapter`).\n    - Ports: Kotlin interfaces.\n    - Use cases: classes with constructor injection (Koin\u002FDagger\u002FSpring\u002Fmanual).\n    - Composition: module definitions or dedicated composition functions; avoid service locator patterns.\n- **Go**\n    - Packages: `internal\u002F\u003Cfeature>\u002Fdomain`, `application`, `ports`, `adapters\u002Finbound`, `adapters\u002Foutbound`.\n    - Ports: small interfaces owned by the consuming application package.\n    - Use cases: structs with interface fields plus explicit `New...` constructors.\n    - Composition: wire in `cmd\u002F\u003Capp>\u002Fmain.go` (or dedicated wiring package), keep constructors explicit.\n\n## Anti-Patterns to Avoid\n\n- Domain entities importing ORM models, web framework types, or SDK clients.\n- Use cases reading directly from `req`, `res`, or queue metadata.\n- Returning database rows directly from use cases without domain\u002Fapplication mapping.\n- Letting adapters call each other directly instead of flowing through use-case ports.\n- Spreading dependency wiring across many files with hidden global singletons.\n\n## Migration Playbook\n\n1. Pick one vertical slice (single endpoint\u002Fjob) with frequent change pain.\n2. Extract a use-case boundary with explicit input\u002Foutput types.\n3. Introduce outbound ports around existing infrastructure calls.\n4. Move orchestration logic from controllers\u002Fservices into the use case.\n5. Keep old adapters, but make them delegate to the new use case.\n6. Add tests around the new boundary (unit + adapter integration).\n7. Repeat slice-by-slice; avoid full rewrites.\n\n### Refactoring Existing Systems\n\n- **Strangler approach**: keep current endpoints, route one use case at a time through new ports\u002Fadapters.\n- **No big-bang rewrites**: migrate per feature slice and preserve behavior with characterization tests.\n- **Facade first**: wrap legacy services behind outbound ports before replacing internals.\n- **Composition freeze**: centralize wiring early so new dependencies do not leak into domain\u002Fuse-case layers.\n- **Slice selection rule**: prioritize high-churn, low-blast-radius flows first.\n- **Rollback path**: keep a reversible toggle or route switch per migrated slice until production behavior is verified.\n\n## Testing Guidance (Same Hexagonal Boundaries)\n\n- **Domain tests**: test entities\u002Fvalue objects as pure business rules (no mocks, no framework setup).\n- **Use-case unit tests**: test orchestration with fakes\u002Fstubs for outbound ports; assert business outcomes and port interactions.\n- **Outbound adapter contract tests**: define shared contract suites at port level and run them against each adapter implementation.\n- **Inbound adapter tests**: verify protocol mapping (HTTP\u002FCLI\u002Fqueue payload to use-case input and output\u002Ferror mapping back to protocol).\n- **Adapter integration tests**: run against real infrastructure (DB\u002FAPI\u002Fqueue) for serialization, schema\u002Fquery behavior, retries, and timeouts.\n- **End-to-end tests**: cover critical user journeys through inbound adapter -> use case -> outbound adapter.\n- **Refactor safety**: add characterization tests before extraction; keep them until new boundary behavior is stable and equivalent.\n\n## Best Practices Checklist\n\n- Domain and use-case layers import only internal types and ports.\n- Every external dependency is represented by an outbound port.\n- Validation occurs at boundaries (inbound adapter + use-case invariants).\n- Use immutable transformations (return new values\u002Fentities instead of mutating shared state).\n- Errors are translated across boundaries (infra errors -> application\u002Fdomain errors).\n- Composition root is explicit and easy to audit.\n- Use cases are testable with simple in-memory fakes for ports.\n- Refactoring starts from one vertical slice with behavior-preserving tests.\n- Language\u002Fframework specifics stay in adapters, never in domain rules.\n",{"name":5,"origin":44,"description":7},"ECC","main","b0f0a87593c578a7898eccaf1b363f7f87c1f99b","plugins\u002FColin4k1024\u002Ftsp\u002Fskills\u002Fhexagonal-architecture",474,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-11 14:40:14",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill hexagonal-architecture",{"tool":61,"command":62},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill hexagonal-architecture",{"tool":64,"command":65},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill hexagonal-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FColin4k1024\u002Ftsp\u002Fskills\u002Fhexagonal-architecture\u002FSKILL.md",true,[],[70,78,85,92,118,142],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"01M746ZWACVKMZ1BJXJZHYJSSX","migrate-to-e2e","Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for \u002Fmigrate-to-e2e, \"migrate our tests to e2e\", \"port these Maestro flows\", \"move our TesterArmy tests\", or when a project has an e2e config and an older suite still running.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftester-army\u002Fe2e\u002Fskills\u002Fmigrate-to-e2e\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":77},"01M746ZPTAX1Q0FBKAB1CYND7E","e2e","Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftester-army\u002Fe2e\u002Fskills\u002Fe2e\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":77},"01M746ZJN784HVHMDP9MQGCSGG","create-verification-skill","Generate a project-local verify-\u003Capp> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for \u002Fcreate-verification-skill, \"make a verification skill for this repo\", or when a project has no scripted way to prove UI behavior.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftester-army\u002Fe2e\u002Fskills\u002Fcreate-verification-skill\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":39},"01M716A6ETNB9B1SQ3GXZC75VR","deja-search","deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fvshulcz\u002Fdeja-vu\u002Fskills\u002Fdeja-search\u002FSKILL.md",[],[99,100,101,102,103,104,105,106,107,30,108,109,110,111,112,113,114,115,116,117],"search","deja search","never","error","ready","memory","re","decide","fix","debugging","when","you","done","reviewer","io","change","cli","merge","past",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":39},"01M716A3J2W5SENSE9VGMXB375","deja-reflect","End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fvshulcz\u002Fdeja-vu\u002Fskills\u002Fdeja-reflect\u002FSKILL.md",[],[125,126,127,113,24,128,129,130,131,132,133,134,135,136,104,137,138,139,140,141],"deja reflect","reflect","review","record","github","next","https","node","Rules","decisions","brew","remember","project rules","project","session","end","reflection",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":159,"publishedAt":39},"01M715T3RR4BAYSR57HPPTJ0PF","revid","Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftmakersas\u002Frevid-skills\u002Fskills\u002Frevid\u002FSKILL.md",[148,153,156],{"categoryNo":149,"categoryName":150,"taxonomyType":151,"taxonomyTypeDesc":152},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",{"categoryNo":154,"categoryName":155,"taxonomyType":151,"taxonomyTypeDesc":152},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":157,"categoryName":158,"taxonomyType":151,"taxonomyTypeDesc":152},"01JBSEEDCAT000000000000010","后端与接口",[144,160,161,162,163,164,165,138,166,105,167,168,169,170,109,171,172,173,174,175],"URL","Video","short-form","standalone","PDF","viral","tiktok","short","social","MCP","song","image","mcp server","schedule","api","publish"]