compose-multiplatform

Implement cross-platform Compose Multiplatform UIs with expect/actual patterns and platform interop.

1|Updated Jul 19, 2026
One-click install
npx skills add https://github.com/leobbaroni/maestro --skill compose-multiplatform-leobbaroni
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: compose-multiplatform
Source: https://github.com/leobbaroni/maestro/tree/main/skills/maestro/library/genjutsu/_jutsu/compose-multiplatform
Command: npx skills add https://github.com/leobbaroni/maestro --skill compose-multiplatform-leobbaroni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing one Compose codebase that runs correctly on Android, iOS, Desktop, and Web requires navigating expect/actual declarations, density differences, resource packaging, and native interop, and mistakes surface as platform-specific bugs late in QA. ## Core Features & Use Cases - KMP/CMP Architecture Guidance: Project structure conventions, expect/actual patterns for functions and composables, and rules for keeping 80-95% of code in commonMain. - Cross-Platform Resources and Interop: Compose Resources setup for fonts, strings, and drawables, plus recipes for embedding SwiftUI/UIKit in Compose and hosting Compose inside SwiftUI or legacy Android views. - Platform Quirks Catalog: Documented gotchas for iOS safe areas, keyboard handling, RTL, Wasm performance, AGSL shader limits, and build/packaging commands per target. - Use Case: You are porting an Android Jetpack Compose app to iOS. Use this Skill to structure the shared module, bridge a native MapKit view via UIKitViewController, and avoid the iOS edge-swipe drawer conflict. ## Quick Start Help me structure a Compose Multiplatform app that shares UI between Android and iOS, including an expect/actual composable for a native map view.

Frequently Asked Questions about compose-multiplatform

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share Compose UI code between Android and iOS?▼

Compose Multiplatform lets you write one Compose codebase in commonMain that runs on Android, iOS, Desktop, and Web. Platform-specific code goes in androidMain, iosMain, desktopMain, or wasmJsMain and is wired in via expect/actual declarations.

How do I use expect/actual for composables in Compose Multiplatform?▼

Declare an @Composable expect fun in commonMain and provide an actual implementation per target, such as RuntimeShader on Android or UIKitView on iOS. Signatures must match exactly, and expect composables should be the exception since most differences can be handled with shared design tokens.

Can I embed SwiftUI views inside a Compose Multiplatform screen?▼

Yes, use UIKitViewController with a factory that returns a UIHostingController wrapping your SwiftUI view, exposed through an @objc Swift bridge class. The reverse direction works too: SwiftUI can host Compose via UIViewControllerRepresentable wrapping MainViewController().

Does LocalConfiguration work in Compose Multiplatform commonMain?▼

No, LocalConfiguration is Android-only. In commonMain use LocalWindowInfo.current.containerSize for window size, LocalDensity.current for density, LocalLayoutDirection.current for RTL, or BoxWithConstraints to read maxWidth and maxHeight.

Why does my Compose Multiplatform app fail to link on iOS?▼

Common causes are JVM-only APIs like java.util.UUID or java.io.File used in commonMain, or a misconfigured cinterop for a Swift bridge. Replace JVM APIs with kotlinx.uuid or okio multiplatform, and verify the .def file paths and generated framework headers.

What are the limitations of Compose Multiplatform on iOS and Web?▼

iOS has slower first-frame rendering from Skia bootstrap, edge-swipe conflicts with drawers, and keyboard handling that needs setup. Wasm targets face larger bundle sizes and first-frame stutter, so tree-shake dependencies and lazy-load secondary screens.