compose-multiplatform

compose-multiplatform is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 80 tokens per session (2,776 once invoked), scanned A, original, MIT.

A guide for building one shared Kotlin user interface that runs on Android, iOS, and desktop with Compose Multiplatform. Platform-specific code is used only where the operating systems require it.

In plain words
What is it for?
Use it for shared UI in commonMain, platform-specific integrations with expect/actual, and multiplatform view models, navigation, or dependency injection.
Why use it?
It helps keep the interface consistent across platforms while handling differences in navigation, native APIs, and platform setup explicitly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/compose-multiplatform
Any agent
npx skills add ericrisco/rsc-harness --skill compose-multiplatform
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compose-multiplatform

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/compose-multiplatform.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/compose-multiplatform)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/compose-multiplatform"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/compose-multiplatform.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00080 $0.02776
Opus 5 $0.00040 $0.01388
Sonnet 5 $0.00016 $0.00555
Haiku 4.5 $0.00008 $0.00278

Measured 4d ago against content hash d801b9003297, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compose-multiplatform scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/compose-multiplatform/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Compose Multiplatform

You write one Compose UI tree in commonMain and let each platform be a thin host. The whole discipline is one sentence: common by default, platform by exception. Every line you put in commonMain ships to Android, iOS, and desktop unchanged; every line you put in a platform source set is a deliberate exception you should be able to justify.

Versions floor (2026)

Pin these or the K2 compiler bites you. Verify against current docs before locking a project — these are the floors, not opinions.

  • Compose Multiplatform 1.11.0, bundling Jetpack Compose 1.11.1.
  • Kotlin 2.1.0+ required (2.2.20 recommended for evolving iOS/Web targets). Since CMP 1.8.0 the K2 compiler is mandatory, so every dependency must compile against Kotlin 2.1.0+.
  • iOS is Stable (production-ready since CMP 1.8.0, May 2025): feature parity for popular cases, type-safe navigation with deep linking, accessibility (VoiceOver, Full Keyboard Access).
  • Web is Beta (CMP 1.9.0, Sept 2025), runs on WasmGC browsers. Do not promise Web parity — ship Android/iOS/desktop, pilot Web.
  • Platform minimums: Android API 21, iOS 14+, macOS 13 arm64, Windows 10+, Ubuntu 20.04+, desktop JDK 11+ (17+ for jpackage packaging).

Where does this code go?

This is the question you answer dozens of times a day. Default to the leftmost column that compiles.

Source set Put here Concrete example Never here
commonMain Shared @Composables, ViewModels, business logic, common interfaces, expect declarations @Composable fun GreetingScreen(), expect fun platformName(): String android.*, platform.UIKit, java.awt, androidx.activity
androidMain Activity, actual using Android Context/Build class MainActivity : ComponentActivity iOS/desktop-only APIs
iosMain ComposeUIViewController factory, actual via cinterop/platform.* fun MainViewController() = ComposeUIViewController { App() } android.*
desktopMain application {} window, Swing interop application { Window(::exitApplication) { App() } } mobile-only APIs
wasmJsMain (Beta) Web entry point ComposeViewport(document.body!!) { App() } anything you can't ship as Beta

Read the full file on GitHub · 199 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 199 lines · 80 tokens per session scan A d801b9003297

Subscribe to this mod's changes

compose-multiplatform is a skill published in the GitHub repository ericrisco/rsc-harness (60 stars, last pushed yesterday), licensed MIT. It adds 80 tokens to every session and 2,776 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

m3-expressive

Material 3 Expressive design patterns for Jetpack Compose - expressive theming, motion physics, shape morphing, typography emphasis, color emphasis, and all 28 expressive components.

TalissonVitorino/kmp-ios-skills · 41 tokens

android-device-integrity

Android app/device integrity and anti-fraud for a fintech app — the Play Integrity API (com.google.android.play:integrity): Standard requests (StandardIntegrityManager.prepareIntegrityToken → StandardIntegrityTokenProvider.request with a requestHash → StandardIntegrityToken) vs Classic requests…

TalissonVitorino/kmp-ios-skills · 260 tokens

mobile-session-security

KMP + iOS/Android session hardening for a fintech app — inactivity auto-lock (track last-interaction, idle timeout, biometric/passcode re-auth), biometric re-lock on background/foreground with a grace period, and screen-capture/snapshot protection. Android: WindowManager FLAGSECURE (blocks screenshots + recents…

TalissonVitorino/kmp-ios-skills · 209 tokens

push-notifications

Push notification patterns - FCM setup for Android, APNs for iOS, notification channels, payload handling, foreground/background behavior, and rich notifications.

TalissonVitorino/kmp-ios-skills · 34 tokens

app-clips

Build iOS App Clips for a fintech app — App Clip target + entitlements (com.apple.developer.on-demand-install-capable, parent-application-identifiers, associated-appclip-app-identifiers, associated-domains appclips:), invocation URLs, App Clip Codes / NFC / QR / Safari App Clip banner + Smart App Banner…

TalissonVitorino/kmp-ios-skills · 246 tokens

app-intents

Expose a fintech iOS app's actions and data to Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence with the App Intents framework — AppIntent.perform + IntentResult, @Parameter (options/defaults/dependencies), AppEntity + EntityQuery/EntityStringQuery, AppShortcutsProvider phrases…

TalissonVitorino/kmp-ios-skills · 186 tokens