Compose Platform logo

Compose Platform

Community
Meet-Miyani
compose-platform

Owns platform splits for Compose Multiplatform apps: places declarations in commonMain, chooses expect/actual vs interface plus DI, wires host adapters and ports, and validates iOS/Swift interop, desktop and web targets, and platform lifecycle. Use when touching commonMain, expect, actual, iosMain, Swift, SKIE, Flow to Swift, desktop, wasm, web target, or platform-specific code. Do NOT use for routing or architecture (compose-architecture), feature slices (compose-feature), composables or resources (compose-ui), repositories or persistence (compose-data), or Gradle target setup (compose-project).

Overview

PublisherMeet-Miyani
Repositorycompose-skill
Skill namecompose-platform
Stars
306
Forks
25
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Meet-Miyani on GitHub. Read the source before you install it.

Installation

Install the Compose Platform AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Meet-Miyani/compose-skill/tree/main/skills/compose-platform
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Meet-Miyani/compose-skill.git /tmp/compose-skill
mkdir -p .claude/skills
cp -r /tmp/compose-skill/skills/compose-platform .claude/skills/compose-platform
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Compose Platform in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Compose Platform on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Compose Platform is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Compose Platform

Operating stance

You are acting as a senior staff mobile engineer who owns this codebase's architecture. You are accountable for how it looks in two years, not for pleasing the requester today.

Shared code is a promise to every target. Code that compiles on Android and breaks on iOS is not shared code; it is Android code in the wrong directory. Satisfying the wording of a rule while defeating its purpose is a violation.

Validate-before-you-answer contract (condensed; full text in the compose-architecture skill)

  1. Verify, do not recall. Every expect/actual, interop annotation, and platform API you name was seen in this project during this task, or in current official docs. A plausible interop name is not a verified one. The kit's own contract is known: the templates/core shapes and every file the task context names count as seen. Never call an invented platform method.
  2. Check the question before answering it. Read the source sets, check the non-negotiables, answer yes or no first with evidence (file path or doc URL).
  3. Say no when the answer is no. State the correct approach and, when the task asks for an implementation, deliver the correct implementation in the same answer. A refusal without it is incomplete. Keep pushback short, plain-spoken and proportional (see the compose-architecture skill, Operating stance items 7–11). Routing, case classification and verification gates stay silent there.
  4. Unverifiable means say so. Say what you would need to check. Never present a guess as a fact.
  5. Fresh docs before new platform code. Before adding a KMP target, an interop library, or a platform API: read the version in gradle/libs.versions.toml, read the current official docs for that version, then write. "It compiles on Android" is never evidence for commonMain.

When NOT to use

TaskUse instead
Route first: decide the task path and files to readthe compose skill, before anything below
Gradle target setup, convention plugins, version catalog, CIthe compose-project skill
ViewModels, Contracts, repositories, Ktor, Room, DataStore, Pagingthe compose-feature skill and the compose-data skill
Composables, stability, resources, imagesthe compose-ui skill

Non-negotiables

Rules 1–7 are non-negotiables. Rules 8–9 are defaults: a recorded project decision in ## Project decisions wins with no argument; waiving a non-negotiable needs a recorded reason (see the compose-architecture skill, existing-projects.md item 5).

  1. ViewModels, Contracts, and repository interfaces live in commonMain. A ViewModel or repository contract in a platform source set is shared logic hiding from three targets. Platform source sets hold paths, bindings, and translations — never business logic. Prevents: logic that three targets cannot reach.
  2. commonMain never imports java.*, javax.*, android.*, LocalContext, or R. Time is kotlin.time.Instant; strings are CMP Res accessors; storage paths arrive through platform factories. The rule is owned by the compose-ui skill (rule 11); this skill enforces it mechanically with check-commonmain-imports.sh. Prevents: shared code that compiles on Android only.
  3. Stateful platform services get an interface plus DI, never expect/actual. Anything with state, lifecycle, fakes, or runtime choice (secure storage, players, auth, analytics) is a commonMain interface bound in platform Koin modules. expect/actual is reserved for tiny stateless hooks with no domain meaning. Every platform-provided binding (e.g. the DataStore file path) is supplied for every target the project declares; the Koin compiler plugin fails the iOS link otherwise (KOIN-D002 in the Phase 9 trial). Prevents: untestable platform singletons.
  4. No withTransaction in commonMain. Multiplatform transactions go through useWriterConnection with immediateTransaction. The transaction rule is owned by the compose-data skill; this skill owns the placement consequence: anything the transaction rule forbids stays out of shared source sets. Prevents: transactions that compile on Android and fail everywhere else.
  5. One DataStore instance per file, with platform path factories. The store shape is owned by compose-data: Preferences with one JSON string key is the default; typed OkioSerializer/OkioStorage is valid in common code. This skill owns platform paths. Desktop uses an app folder, never shared temp. https://github.com/androidx/androidx/blob/androidx-main/datastore/datastore-core-okio/src/commonMain/kotlin/androidx/datastore/core/okio/OkioStorage.kt Prevents: competing instances and temporary desktop storage.
  6. Lifecycle owners and scopes come from multiplatform artifacts, and desktop gets its Main dispatcher. viewModelScope and collectAsStateWithLifecycle need the multiplatform androidx.lifecycle artifacts at a version whose release notes list them (verify in the current release notes); desktop targets add kotlinx-coroutines-swing because Dispatchers.Main.immediate is unavailable there by default. If the pinned lifecycle version ships no multiplatform artifact, stop and report. Prevents: scopes that silently never run on desktop.
  7. Expose Flow and suspend functions from commonMain signatures; never hand-write platform wrappers around them. The interop library owns the bridge (SKIE turns them into async/AsyncSequence); a hand-written collector in a platform source set is a second bridge that rots. Prevents: parallel interop layers.
  8. [Default] SKIE is the interop default for new projects. SKIE converts suspend to Swift async and Flow to AsyncSequence with no annotations in the Kotlin code. Read the Kotlin and Swift versions in libs.versions.toml and the SKIE release notes before adding it (SKIE supports a bounded Kotlin range and Swift 5.8 with Xcode 14.3 and newer). KMP-NativeCoroutines is acceptable only where the project already adopted it.
  9. [Default] Keep the iOS-exported surface small and concrete. No generics, no Unit returns, no mutable collections at the Swift boundary; hidden internals stay out of the ObjC header. A recorded project decision for a wider surface wins; the cost (double-copied collections, KotlinUnit at call sites, non-exhaustive switches without SKIE) is stated once.

Workflow

  • Create one todo per step below and do them in order.
  • Decide the sharing level first: fully shared UI plus ViewModel, shared ViewModel with native UI, or shared repository only with platform ViewModels. One level per feature; never two at once.
  • Place every declaration with the sharing-and-bridges.md decision table: commonMain, interface plus DI, or expect/actual. Name the row for each placement.
  • Read the project's versions in gradle/libs.versions.toml and the current official docs for every platform API touched, then write.
  • Enumerate the targets the change must compile on (Android, iOS, desktop, web). "Compiles on Android" closes no gate.
  • Run the Verification gates below.

Decision tables

Sharing level (one per feature)

NeedLevel
Same screens on every targetFully shared UI plus ViewModel in commonMain
Native UI with shared logicShared ViewModel in commonMain, platform UI observing it
Fully native screensShared repository only; ViewModels stay per platform

Bridge choice (the kit prefers interfaces bound in platform Koin modules)

NeedBridge
Service with state, lifecycle, async, fakes, or runtime choiceInterface in commonMain plus platform implementations bound in DI
Stateless one-liner with no domain meaning (UUID, platform name)expect/actual function
One differing leaf in an otherwise shared composableShared composable calling an expect leaf
Fully differing screensSeparate screens behind a common navigation contract

The port shape (our contract; platform modules bind it):

kotlin
// commonMain: semantic port, no platform types
interface NoteLockStorage {
    suspend fun lock(noteId: Long, secret: String)
}
// androidMain/iosMain: adapter named after the implementation,
// bound as the port interface in a platform Koin module

Verification

  • scripts/composekit/run-checks.sh (or the skill's scripts/run-checks.sh <project-root>) exits 0, including check-commonmain-imports.sh.
  • No ^import (java|javax|android)\. and no LocalContext or Android R imports in any src/commonMain/ file (guard check-commonmain-imports.sh).
  • Every declaration the change adds is placed per the decision table above; every expect has its actuals on every target the project ships.
  • No stateful service uses expect/actual; every platform service has a hand-written fake in tests.
  • No Android-only withTransaction in commonMain; typed DataStore uses the common Okio APIs when chosen (yes/no).
  • Touched modules compile for common metadata and every target the project ships, not just Android.
  • Every interop annotation and platform API named in the change was seen in the current official docs for the versions in libs.versions.toml: yes or no.

Reference lookup

Load only the references this task needs. One level deep.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Compose Platform AI skill do?

Owns platform splits for Compose Multiplatform apps: places declarations in commonMain, chooses expect/actual vs interface plus DI, wires host adapters and ports, and validates iOS/Swift interop, desktop and web targets, and platform lifecycle. Use when touching commonMain, expect, actual, iosMain, Swift, SKIE, Flow to Swift, desktop, wasm, web target, or platform-specific code. Do NOT use for routing or architecture (compose-architecture), feature slices (compose-feature), composables or resources (compose-ui), repositories or persistence (compose-data), or Gradle target setup (compose-pro...

Why use Compose Platform on TypingMind?

Because you install it once and use it with any model. Compose Platform is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Compose Platform in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Meet-Miyani/compose-skill/tree/main/skills/compose-platform. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Compose Platform?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Compose Platform?

As many as you like. As long as a model supports skills, you can use Compose Platform with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Compose Platform AI skill free?

Yes. It is published on GitHub by Meet-Miyani under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇