What problem does it solve? Kotlin Multiplatform projects grow into tangled module graphs where UI code reaches into repositories, DTOs leak into domain logic, and nothing mechanically stops layer violations. This Skill defines a strict 6-layer contract (:model / :api / :domain / :data / :presenter / :ui) and shows how to enforce it with Gradle dependency declarations, internal visibility, and Detekt rules so violations fail the build instead of slipping through review. ## Core Features & Use Cases - Layer dependency contract: Unidirectional flow :model → :api → :domain → :presenter → :ui, with :data as a sibling of :presenter, plus rules for what belongs in each layer and when a thin feature can skip layers. - Mechanical enforcement: Gradle api()/implementation() boundary rules to prevent ABI/type leakage, internal visibility tables per layer, Detekt architecture fitness functions, and audit-script checks for wrong-direction dependencies and dependency cycles. - Concrete patterns: Use case pattern, DTO mapper pattern, typed domain errors and typed domain IDs with @JvmInline value classes, cross-feature navigation via AppNavigator, and composition-over-inheritance guidance for commonMain. - Use Case: When reviewing a pull request that adds Compose imports to a :presenter module or lets :ui depend on :data directly, use this Skill to identify the violated layer rule, place the code correctly, and add the Gradle or Detekt check that prevents recurrence. ## Quick Start Ask the agent to review your KMP feature module structure against the 6-layer clean architecture contract and fix any layer dependency violations it finds.