Архитектура KMP-проектов для Android и Desktop

★ 7.1 · engineering

Kotlin Multiplatform Architecture is a Claude Code skill that enforces source-set boundaries, platform abstraction patterns, networking, database setup, and dependency injection rules for KMP projects targeting Android and Desktop. Reach for it when business logic keeps leaking into platform-specific code, when you're unsure whether to use expect/actual or an interface with DI, or when androidMain and jvmMain accumulate duplicated pure-Kotlin helpers that should live in commonMain. The skill covers concrete rules: commonMain imports no java.* or android.* APIs; networking is pure Ktor with no OkHttp; I/O goes through Okio BufferedSource/BufferedSink; concurrency uses kotlinx.coroutines with an injected ioDispatcher from core:di instead of Dispatchers.IO directly; BLE routes through Kable; Room KMP is initialized via MeshtasticDatabaseConstructor factory. expect/actual is restricted to low-level primitives where an interface boundary is genuinely impossible — Interface + Koin DI is the preferred bridging strategy. Compose Multiplatform dependencies use compose-multiplatform-* catalog aliases, never plain androidx.compose in commonMain. Direction is architectural decision-making inside an existing KMP monorepo, not Gradle bootstrapping or UI implementation.