kmp-cmp-architecturelisted
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