compose-multiplatform-patterns

compose-multiplatform-patterns is a skill for Claude Code from shennawardana23/skillme. It costs 95 tokens per session (2,185 once invoked), scanned A, original, Apache-2.0.

A collection of patterns for building user interfaces with Jetpack Compose and Compose Multiplatform. Compose Multiplatform lets Kotlin code share interfaces across Android, iOS, desktop, and web.

In plain words
What is it for?
Use it when writing or reviewing Compose screens, connecting ViewModels and StateFlow, building shared Kotlin interfaces, adding navigation, or diagnosing sluggish lists and repeated redraws.
Why use it?
It helps manage screen data consistently, design reusable interface pieces, connect screens to navigation, and reduce slow or unnecessary redraws.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Use it when writing or reviewing Compose screens, connecting ViewModels and StateFlow…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shennawardana23/skillme/compose-multiplatform-patterns
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.

Any agent
npx skills add shennawardana23/skillme --skill compose-multiplatform-patterns
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/compose-multiplatform-patterns.svg)](https://agentmods.dev/skills/shennawardana23/skillme/compose-multiplatform-patterns)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/compose-multiplatform-patterns"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/compose-multiplatform-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,185 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00095 $0.02185
Opus 5 $0.00048 $0.01092
Sonnet 5 $0.00019 $0.00437
Haiku 4.5 $0.00010 $0.00218

Measured 6d ago against content hash 9d51c492e2a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

compose-multiplatform-patterns 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 6d ago.

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-patterns/SKILL.md · 260 lines

How it starts

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

Compose Multiplatform Patterns

Shared UI across Android, iOS, Desktop, and Web via Compose Multiplatform, plus Jetpack Compose specifics on Android. Core mental model: state flows down as an immutable snapshot, events flow up as callbacks — the same unidirectional-data-flow discipline as SwiftUI or React, expressed with Kotlin's StateFlow and Compose's recomposition system instead of a virtual DOM diff.

When to use

Building Compose UI (Jetpack Compose or Compose Multiplatform); wiring ViewModels to screen state; implementing navigation in a KMP or Android project; designing reusable composables; diagnosing excess recomposition or janky lists.

State management

Single state data class per screen, exposed as StateFlow, collected with lifecycle awareness:

data class ItemListState(
    val items: List<Item> = emptyList(),
    val isLoading: Boolean = false,
    val error: String? = null,
    val searchQuery: String = ""
)

class ItemListViewModel(private val getItems: GetItemsUseCase) : ViewModel() {
    private val _state = MutableStateFlow(ItemListState())
    val state: StateFlow<ItemListState> = _state.asStateFlow()

    fun onSearch(query: String) {
        _state.update { it.copy(searchQuery = query) }
        viewModelScope.launch {
            _state.update { it.copy(isLoading = true) }
            getItems(query).fold(
                onSuccess = { items -> _state.update { it.copy(items = items, isLoading = false) } },
                onFailure = { e -> _state.update { it.copy(error = e.message, isLoading = false) } }
            )
        }
    }
}

@Composable
fun ItemListScreen(viewModel: ItemListViewModel = koinViewModel()) {
    val state by viewModel.state.collectAsStateWithLifecycle()
    ItemListContent(state = state, onSearch = viewModel::onSearch)
}

@Composable
private fun ItemListContent(state: ItemListState, onSearch: (String) -> Unit) {
    // Stateless — trivially previewable and testable in isolation
}

collectAsStateWithLifecycle (not plain collectAsState) stops collecting when the composable leaves the started lifecycle state, avoiding wasted work and leaked collection in backgrounded screens.

Read the full file on GitHub · 260 lines

Files

What ships with it

1 file 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. 6d ago First seen · 260 lines · 95 tokens per session scan A 9d51c492e2a9

Subscribe to this mod's changes

compose-multiplatform-patterns is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 9d ago), licensed Apache-2.0. It adds 95 tokens to every session and 2,185 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

animations-native

Authors performant React Native / Expo animations with Reanimated and gesture handling with react-native-gesture-handler, running motion on the UI thread so it stays at 60/120 fps. Covers worklets, shared values, useAnimatedStyle, withTiming/withSpring, layout animations, the Gesture API (pan/pinch/drag/swipe), Moti…

mthines/agent-skills · 182 tokens

dart-flutter-patterns

A collection of architecture and coding patterns for building Dart and Flutter applications, including state management, navigation, networking, storage, and tests.

sutchan/Agent-Skills-Hub · 50 tokens

flutter-add-widget-preview

A guide for adding isolated, interactive previews of Flutter widgets. Widgets are Flutter's reusable interface building blocks.

sutchan/Agent-Skills-Hub · 21 tokens

flutter-setup-declarative-routing

A Flutter routing guide for defining screens and URLs with go_router. It covers deep links, nested navigation, persistent navigation shells, and clean web URLs.

sutchan/Agent-Skills-Hub · 24 tokens

flutter-apply-architecture-best-practices

A guide for structuring Flutter apps into separate UI, business-logic, and data layers. Flutter is a toolkit for building apps from one Dart codebase.

sutchan/Agent-Skills-Hub · 34 tokens

flutter-build-responsive-layout

A Flutter guide for building layouts that adapt to the available window space. It uses tools such as LayoutBuilder, MediaQuery, Expanded, and Flexible to support different screen sizes and orientations.

sutchan/Agent-Skills-Hub · 25 tokens