# Compose multiplatform patterns

> Compose multiplatform patterns is an open-source agent skill for developer tools. Guides agents through Compose Multiplatform and Jetpack Compose UI state, navigation. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/smartworldarafath/REA_Skill/tree/main/.agents/skills/compose-multiplatform-patterns
- **Repository:** https://github.com/smartworldarafath/rea_skill
- **GitHub stars:** 66
- **License:** MIT
- **Skill name:** compose-multiplatform-patterns
- **Collection:** https://github.com/smartworldarafath/REA_Skill
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill gives an AI coding agent a reference set of patterns for building shared UI in Kotlin Multiplatform projects with Compose Multiplatform and Jetpack Compose. It covers a single immutable state object exposed from a ViewModel as a StateFlow, an event sink option for complex screens, type-safe navigation with serializable route objects, dialog destinations, slot-based composable APIs, and modifier ordering.

The guide also addresses performance and platform code. It explains marking stable types for skippable recomposition, using stable keys in lazy lists, deferring reads with derivedStateOf, and avoiding allocations during recomposition. For platform differences it shows expect/actual composables, and for theming it includes a Material 3 setup with dynamic color. A list of anti-patterns sits at the end.

The skill is written as instructions with Kotlin code samples and expects a Kotlin project using Compose. It refers to two companion skills, android-clean-architecture for module layering and kotlin-coroutines-flows for coroutine and Flow patterns. It has no scripts.

## When your agent uses it

> Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI. Use when building Compose or Jetpack Compose UI, state, navigation, or theming in a KMP project.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/compose-multiplatform-patterns)
- [License: MIT](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/compose-multiplatform-patterns)

## Features

- **Single state object:** Screen state is modeled as one data class exposed through a StateFlow and collected in Compose.
- **Type-safe navigation:** Routes are defined as serializable objects for Compose Navigation 2.8 and later, including dialog destinations.
- **Slot-based composables:** Guidance for designing reusable components with header, content and actions slots.
- **Recomposition performance:** Covers stable types, lazy list keys, derivedStateOf and avoiding allocations during recomposition.
- **Platform-specific UI:** Shows expect/actual composables for code that differs between Android, iOS and other targets.
- **Material 3 theming:** A theme setup with dark mode support and dynamic color on Android 12 and later.

## Good for

- Structure a shared screen's state and ViewModel in a KMP app
- Set up type-safe navigation between screens in Compose Multiplatform
- Write a reusable card composable with flexible slots
- Find and fix unnecessary recomposition in a Compose list
- Add a platform-specific status bar composable with expect/actual
- Configure Material 3 theming with dynamic colors

## Install

### Claude Code

This skill ships in the `rea-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath
```

Or copy only this skill to `~/.claude/skills/compose-multiplatform-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/compose-multiplatform-patterns &&
cp -R "$tmp/.agents/skills/compose-multiplatform-patterns" ~/.claude/skills/compose-multiplatform-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/compose-multiplatform-patterns` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/compose-multiplatform-patterns` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/compose-multiplatform-patterns &&
cp -R "$tmp/.agents/skills/compose-multiplatform-patterns" ~/.agents/skills/compose-multiplatform-patterns &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/compose-multiplatform-patterns` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/compose-multiplatform-patterns` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/compose-multiplatform-patterns &&
cp -R "$tmp/.agents/skills/compose-multiplatform-patterns" ~/.cursor/skills/compose-multiplatform-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/compose-multiplatform-patterns` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/compose-multiplatform-patterns
```

Or copy the folder to `~/.gemini/skills/compose-multiplatform-patterns` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/compose-multiplatform-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/compose-multiplatform-patterns &&
cp -R "$tmp/.agents/skills/compose-multiplatform-patterns" ~/.copilot/skills/compose-multiplatform-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/compose-multiplatform-patterns` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git
```

Then copy `REA_Skill/.agents/skills/compose-multiplatform-patterns` into your agent's skills folder as `compose-multiplatform-patterns`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It is a set of written instructions and code samples with no scripts, so it needs an agent that loads SKILL.md and a Kotlin project that uses Compose.

### Which navigation version does Compose multiplatform patterns target?

The type-safe navigation examples use Compose Navigation 2.8 or later with serializable route classes.

### Does Compose multiplatform patterns include executable scripts or tools?

No. The skill contains only the SKILL.md guide and one reference file, with no scripts.

### What related skills does Compose multiplatform patterns point to?

It references android-clean-architecture for module structure and layering, and kotlin-coroutines-flows for coroutine and Flow patterns.

### How do I install Compose multiplatform patterns in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/compose-multiplatform-patterns to use it in all your projects, or to .claude/skills/compose-multiplatform-patterns in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

### Does Compose multiplatform patterns run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Compose multiplatform patterns?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Compose multiplatform patterns?

The closest alternatives to Compose multiplatform patterns are Android clean architecture, Dart flutter patterns, Accessibility, Expo native UI and Expo UI.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Android clean architecture](https://ai-powered.com/skills/android-clean-architecture): Android clean architecture is an open-source agent skill for developer tools.
- [Dart flutter patterns](https://ai-powered.com/skills/dart-flutter-patterns): Dart flutter patterns is an open-source agent skill for developer tools.
- [Accessibility](https://ai-powered.com/skills/accessibility): Accessibility is an open-source agent skill for developer tools.
- [Expo native UI](https://ai-powered.com/skills/expo-native-ui): Expo native UI is an open-source agent skill for developer tools.
- [Expo UI](https://ai-powered.com/skills/expo-ui): Expo UI is an open-source agent skill for developer tools.
- [Vue](https://ai-powered.com/skills/vue): Vue is an open-source agent skill for developer tools.
- [Swift swiftui](https://ai-powered.com/skills/swift-swiftui): Swift swiftui is an open-source agent skill for developer tools.
- [Mac design](https://ai-powered.com/skills/mac-design): Mac design is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/compose-multiplatform-patterns
