compose-multiplatform

Solid

Compose Multiplatform / KMP patterns - expect/actual composables, platform-specific code, density and font handling cross-target, iOS/Android/Desktop interop.

Web & Frontend 115 stars 14 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
69
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Compose Multiplatform > Compose Multiplatform (CMP) and Kotlin Multiplatform (KMP) patterns for cross-platform UI. > Loaded for projects with `org.jetbrains.compose` plugin. > Foundation: `../compose-motion/SKILL.md` for animation API; this file covers what's specific to writing one Compose codebase for Android + iOS + Desktop + Web. --- ## KMP vs CMP - quick clarification **KMP** (Kotlin Multiplatform) is the language and build infrastructure: shared Kotlin code compiled to JVM, Native (iOS, macOS, Linux, Windows), and Wasm. **CMP** (Compose Multiplatform) is the UI framework on top of KMP, built by JetBrains as a port of Jetpack Compose. You write a single Compose codebase in `commonMain` that runs on Android, iOS, Desktop (JVM), and Web (Wasm). Platform-specific code lives in `androidMain`, `iosMain`, `desktopMain`, `wasmJsMain` and is wired in via `expect`/`actual` declarations. --- ## Project structure ``` composeApp/ ├── src/ │ ├── commonMain/ ← shared Compose code (most of the app) │ │ └── kotlin/ │ ├── androidMain/ ← Android-specific (uses Activity, Context) │ ├── iosMain/ ← iOS-specific (uses UIKit/UIView interop) │ ├── desktopMain/ ← JVM desktop (uses java.awt/swing if needed) │ └── wasmJsMain/ ← Wasm web target ├── build.gradle.kts iosApp/ ← Xcode project consuming the generated framework androidApp/ ← Android Application module (often merged into composeApp) ``` The `comm...

Details

Author
AThevon
Repository
AThevon/genjutsu
Created
4 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

compose-expert

Compose and Compose Multiplatform expert for UI development across Android, Desktop, iOS, and Web. Use whenever the user mentions Compose APIs (@Composable, remember, LaunchedEffect, NavHost, MaterialTheme, LazyColumn, Modifier, recomposition), Compose Multiplatform (commonMain, expect/actual, Res.*, ComposeUIViewController, UIKitView, ComposeViewport), Android TV (tv-material, D-pad, focus, Carousel), Material 3 motion, atomic design systems, design-to-code workflows, Paging 3, or navigation. Activates Review Mode on GitHub PR URLs and review phrases ("review this PR", "what's wrong with this"). Auto-detects Compose projects on session_start. Backed by actual androidx/androidx and JetBrains/compose-multiplatform-core source receipts. See "## When this skill applies" in SKILL.md for the full trigger surface.

546 Updated 4 days ago
aldefy
API & Backend Listed

kmp-cmp-architecture

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.

0 Updated 1 weeks ago
depezo
AI & Automation Solid

kmp-project-structure

Reference skill for the new recommended KMP project structure (2026+). Covers the shift from the old single-module composeApp layout to the new multi-module shared/ + androidApp/ + desktopApp/ structure required for AGP 9.0+. Includes full file and Gradle configuration for both old and new layouts.

4 Updated yesterday
iammohdzaki