clean-architecture

Installation
SKILL.md

Clean Architecture

Protect stable policy from volatile details. Apply the dependency rule at meaningful component/module boundaries; do not reproduce a fixed four-layer folder tree in every application.

Workflow

  1. Identify business policy, use cases, inputs/outputs, and volatile details.
  2. Inspect source-code dependencies, runtime calls, data shapes, and ownership.
  3. Choose boundaries where independent testing or replacement has real value.
  4. Define inward-owned ports using domain/use-case language.
  5. Implement outward adapters for web, database, messaging, UI, and vendors.
  6. Translate boundary DTOs rather than leaking framework or persistence types inward.
  7. Wire dependencies at a composition root.
  8. Test policy through ports and add adapter contract/integration tests.
  9. Measure whether the boundary reduces change cost; remove abstractions that only forward calls.

Runtime control may flow outward while source dependencies point inward.

Boundary Rules

Installs
6
Repository
kinhluan/skills
GitHub Stars
6
First Seen
Jun 10, 2026