kotlin-multiplatform-expect-actual

kotlin-multiplatform-expect-actual is a skill for Claude Code, Codex from ashtanko/compose-android-template. It costs 54 tokens per session (1,297 once invoked), scanned A, original, MIT.

A guide for defining boundaries between shared Kotlin Multiplatform code and platform-specific implementations. Kotlin Multiplatform lets one project share code across platforms such as Android, iOS, and desktop.

In plain words
What is it for?
Use it for platform services, native software-development kits, Compose Multiplatform UI, permissions, files, settings, sensors, and other platform integrations.
Why use it?
It helps keep shared code stable and understandable while isolating platform details, dependencies, and testing needs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it for platform services, native software-development kits, Compose Multiplatform UI, permissions, files, settings, sensors, and other platform integrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual
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 ashtanko/compose-android-template --skill kotlin-multiplatform-expect-actual
Clone the repo
git clone --depth 1 https://github.com/ashtanko/compose-android-template

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 kotlin-multiplatform-expect-actual

README.md
[![agentmods](https://agentmods.dev/badge/skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual/github.svg)](https://agentmods.dev/skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual)
Your own site
<a href="https://agentmods.dev/skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual"><img src="https://agentmods.dev/badge/skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kotlin-multiplatform-expect-actual

Your own site · 80×15
<a href="https://agentmods.dev/skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual"><img src="https://agentmods.dev/badge/skills/ashtanko/compose-android-template/kotlin-multiplatform-expect-actual.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,297 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00054 $0.01297
Opus 5.5 $0.00022 $0.00519
Sonnet 5.5 $0.00011 $0.00259
Haiku 4.5 $0.00005 $0.00130

Measured 3mo ago against content hash 0e2d3c1aab90, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kotlin-multiplatform-expect-actual 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 3mo 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.

.agents/skills/kotlin-multiplatform-expect-actual/SKILL.md · 127 lines

How it starts

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

Kotlin Multiplatform: expect/actual boundaries

Core principle

Keep common APIs semantic and stable. Put platform mechanics behind small expect/actual declarations or interfaces, and keep Android/iOS/Desktop details out of commonMain.

Boundary procedure

  1. Name the product capability in common terms: share text, read clipboard, request haptic feedback, resolve current region.
  2. Check whether common callers need fakes, injected dependencies, lifecycle ownership, or runtime implementation choice.
  3. Pick the smallest boundary from the table below.
  4. Keep the common signature free of platform types and platform vocabulary.
  5. Put business branching in common code; keep actuals/platform bindings as translation layers.
  6. Validate by compiling every affected source set and testing common code with a fake where possible.

Choose the boundary

Situation Prefer
Simple compile-time platform specialization expect/actual function, value, typealias, or leaf composable
Implementation needs injected dependencies, lifecycle ownership, runtime choice, or test fakes Common interface plus platform binding
UI is mostly shared, one leaf differs Common composable calling an expect leaf
Entire screen differs by platform Separate platform screens behind a common navigation contract
Only constants/resources differ Common API exposing semantic values, actual values per platform

Keep common APIs semantic

Write common APIs so callers describe intent, not platform mechanics:

// GOOD: common API is semantic
expect fun currentRegion(): Region
// BAD: common API leaks Android implementation
expect fun currentRegionFromAndroidLocale(context: Context): Region

The Android actual can use Locale APIs. The iOS actual can use Foundation APIs. Common callers should not know.

Keep actuals thin

Actual implementations should translate the semantic API into platform calls. If the operation needs an Activity, view controller, lifecycle owner, DI, or fakes, stop and use an interface supplied by platform code instead of an expect class:

Read the full file on GitHub · 127 lines

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. 3mo ago First seen · 127 lines · 54 tokens per session scan A 0e2d3c1aab90

Subscribe to this mod's changes

kotlin-multiplatform-expect-actual is a skill published in the GitHub repository ashtanko/compose-android-template (14 stars, last pushed 5d ago), licensed MIT. It adds 54 tokens to every session and 1,297 once invoked, about $0.0002 per session on Opus 5.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

kotlin-multiplatform-expect-actual compared with skills from other repositories

kotlin-multiplatform-expect-actual next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kotlin-multiplatform-expect-actualashtanko/compose-android-templateSkill145d agoMITA54Claude Code, Codex
compose-animationschrisbanes/skillsSkill1.2k3d agoApache-2.0A67Claude Code
compose-focus-navigationchrisbanes/skillsSkill1.2k3d agoApache-2.0A41Claude Code
kotlin-androidericrisco/rsc-harnessSkill6916d agoMITA78Claude Code, Codex
swift-adaptive-layout-prokelvinkosbab/AppBootstrapAISkill8yesterdayMITA129Claude Code
swift-modularization-prokelvinkosbab/AppBootstrapAISkill8yesterdayMITA94Claude Code
android-gradle-architecture-prokelvinkosbab/AppBootstrapAISkill8yesterdayMITA74Claude Code