[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B2GRY2PD95H5K94QBPTJDM":3,"skill-same:01M7B2GRY2PD95H5K94QBPTJDM":50},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7B2GRY2PD95H5K94QBPTJDM","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. Use when introducing or refactoring toward Ports and Adapters, or when domain logic has become entangled with I\u002FO.","lytong760-cell\u002Fcompiler_ko","lytong760-cell","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F289977458?v=4","01M7B1YD239K88PFQRD4PVC9DW","Nguyên Games","01M7B1YD2RM70TZ71QNQ0XTN4R",2,"MIT","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fhexagonal-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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. Use when introducing or refactoring toward Ports and Adapters, or when domain logic has become entangled with I\u002FO.\nmetadata:\n  origin: 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,"metadata":24,"description":7},{"origin":25},"ECC","main","c32dc0b68600587f78aff3310f3bbd4212173ab3",".kilo\u002Fskills\u002Fhexagonal-architecture",1,"https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko","https:\u002F\u002Fko-lang.ai.studio","https:\u002F\u002Fgithub.com\u002Flytong760-cell","hanaminikata.com","hello ","2026-11-05 18:26:32",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lytong760-cell\u002Fcompiler_ko --skill hexagonal-architecture",{"tool":42,"command":43},"bunx","bunx skills add lytong760-cell\u002Fcompiler_ko --skill hexagonal-architecture",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lytong760-cell\u002Fcompiler_ko --skill hexagonal-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fhexagonal-architecture\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7B36K22Z7155PTGEGTSDNJ4","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fx-api\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7B36HCAE9ESGBVS6J0FR52F","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7B36DYH4ZFJ3GZHPAEMVQAY","workspace-surface-audit","Audit the active repo, MCP servers, plugins, connectors, env surfaces, and harness setup, then recommend the highest-value ECC-native skills, hooks, agents, and operator workflows. Use when the user wants help setting up Claude Code or understanding what capabilities are actually available in their environment.","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fworkspace-surface-audit\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7B36A1QXMEZT8VZMFVQNR5E","wizard","Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fwizard\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7B364EK3N88VQQJ6HFATJQE","windows-desktop-e2e","E2E testing for Windows native desktop apps (WPF, WinForms, Win32\u002FMFC, Qt) using pywinauto and Windows UI Automation. Use when writing E2E tests for a Windows native desktop app with pywinauto or UI Automation.","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fwindows-desktop-e2e\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7B360YF7GGNAF21KT4QB5PG","wayfinder","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Flytong760-cell\u002Fcompiler_ko\u002Fblob\u002Fmain\u002F.kilo\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[]]