← ClaudeAtlas

kmp-cmp-architecturelisted

Guidance for architecting, structuring, and building Kotlin Multiplatform (KMP) and Compose Multiplatform (CMP) projects — module/source-set layout, Clean Architecture + MVI, dependency injection (Koin vs Hilt), local persistence (SQLDelight vs Room), Gradle version catalogs, and Android Gradle Plugin (AGP) 9.x migration for KMP modules. Use this skill whenever the user is setting up a new KMP or CMP project, structuring a shared module, choosing between Koin/Hilt or SQLDelight/Room, writing expect/actual code, debugging Gradle/AGP/KSP build errors in a multiplatform project, or upgrading AGP versions in a project that uses the Kotlin Multiplatform plugin — even if they don't say "Kotlin Multiplatform" explicitly and just mention "shared module", "commonMain", "iOS + Android app", or paste a KMP-related Gradle error.
depezo/kmp-cmp-architecture · ★ 0 · API & Backend · score 70
Install: claude install-skill depezo/kmp-cmp-architecture
# KMP / Compose Multiplatform Architecture ## Why this skill exists KMP/CMP tooling changes fast (AGP, KSP, Compose compiler versions move independently of Kotlin releases), and there is no single "correct" stack — the right DI or persistence library depends on team background and target platforms. This skill gives one **opinionated default** (fast to apply, known to work well together) plus the **decision criteria** to deviate from it, so advice stays useful whether the user wants "just tell me what to do" or "I already have a stack, help me use it well." Default the answer to the recommended stack below unless the user's project clearly uses something else — in that case, follow their existing choice rather than pushing a migration. ## Recommended default stack | Concern | Default | Why | |---|---|---| | DI | **Koin** | Pure Kotlin, no code generation, works natively in `commonMain`. Hilt/Dagger only work in `androidMain`. | | Persistence | **SQLDelight** | Mature on all KMP targets, typesafe SQL, auto-generated migrations from `.sq` diffs. Use **Room** instead if the team already knows Room from Android — Room 3.0+ has full KMP support and the DAO-style API has a near-zero learning curve for Android-first teams. | | Networking | Ktor client | Not this skill's focus, but assume it unless told otherwise. | | Architecture | Clean Architecture (data/domain/presentation) + MVI | See below. | | Async/reactive | Coroutines + `StateFlow`/`SharedFlow` | Observed natively from