ericrisco/rsc-harness / skills/compose-multiplatform
compose-multiplatform
VerifiedUse when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform ViewModel/navigation/Koin. NOT a single-platform native build (that is kotlin-android / swift-ios), and NOT Dart/Flutter cross-platform UI (that is flutter).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.5 KB |
| evals/README.md | markdown | 686 B |
| evals/cases.yaml | config | 3.0 KB |
| references/ios-interop.md | markdown | 3.2 KB |
| references/project-setup.md | markdown | 3.9 KB |
| scripts/verify.shexecutable | script | 4.4 KB |
evals/cases.yaml
View on GitHubskill: compose-multiplatform
should_trigger:
- prompt: "Set up a Kotlin Multiplatform project that shares one Compose UI across Android and iOS."
why: Core use — shared commonMain @Composables across platforms, the center of the skill.
- prompt: "My `expect fun` compiles fine but the iOS build complains there's no `actual` — how do I fix it?"
why: Non-obvious — orphaned expect/actual is a CMP build trap surfacing only on the iOS target.
- prompt: "How do I embed a native MapKit/SwiftUI view inside my shared Compose screen using UIKitView?"
why: Non-obvious native interop — the iOS UIKitView factory / injected-interface pattern.
- prompt: "Compartir la UI entre Android i iOS amb Kotlin, una sola base de codi."
why: Catalan phrasing for sharing UI across Android/iOS with Kotlin — the core CMP use.
- prompt: "Where should the platform-specific date formatter live — commonMain or androidMain/iosMain?"
why: Source-set placement decision — the 'where does this code go' table is the skill's daily question.
- prompt: "Add a desktop target to my Compose Multiplatform app and package it with jpackage."
why: Desktop breadth — application {} window + packageDistributionForCurrentOS, JDK 17+ floor.
should_not_trigger:
- prompt: "Build a native Android-only app with Jetpack Compose and publish it to the Play Store."
route_to: kotlin-android
why: Single-platform native Android — no shared multiplatform module, Play Store specifics.
- prompt: "I'm writing a SwiftUI app in Xcode and need help with App Store code signing."
route_to: swift-ios
why: Single-platform native iOS — SwiftUI/Xcode/signing, not shared Kotlin Compose.
- prompt: "Build a cross-platform mobile UI with Flutter widgets and the flutter CLI."
route_to: flutter
why: Dart/Flutter cross-platform, not Kotlin/Compose Multiplatform.
- prompt: "Create a cross-platform desktop app with a Rust core and a web-tech UI."
route_to: tauri
why: Rust desktop shell with web UI, not a Kotlin/CMP shared tree.
capability:
- scenario: "Scaffold a shared-UI KMP project (a `shared` module plus Android and iOS app hosts), add an `expect`/`actual` `platformName()`, share one @Composable greeting screen across platforms, and embed a native map via `UIKitView` injected through a common interface."
must_include:
- "shared module whose commonMain holds the shared @Composable greeting screen"
- "Compose Multiplatform plugin (org.jetbrains.compose) and Kotlin 2.1.0+ in the build (2.2.x recommended; K2 floor)"
- "expect fun platformName() in commonMain with an actual in BOTH androidMain and iosMain"
- "no platform import (android.*, platform.UIKit) leaking into commonMain"
- "native view embedded via UIKitView fed by an injected common interface, not a raw expect @Composable"
- "host wiring named: ComposeUIViewController for iOS and setContent for Android"
- "notes iOS is Stable since CMP 1.8.0 and Web is only Beta (1.9), not production"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |