kmp

Configure Kotlin Multiplatform source sets with expect/actual patterns.

6|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/ImL1s/flutter-claude-skills --skill kmp-iml1s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kmp
Source: https://github.com/ImL1s/flutter-claude-skills/tree/main/skills/kmp
Command: npx skills add https://github.com/ImL1s/flutter-claude-skills --skill kmp-iml1s

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kotlin Multiplatform enables sharing code across Android, iOS, Desktop, Web (WASM), and Server using a unified project structure and proper separation of concerns.

Core Features & Use Cases

  • Shared code across platforms via commonMain and platform-specific source sets.
  • Expect/Actual pattern for platform APIs to minimize duplication.
  • Clear module structure: core, feature modules, and multiple targets to enable scalable projects.

Quick Start

Create a new Kotlin Multiplatform project and start sharing code across platforms using commonMain and platform-specific source sets.

Frequently Asked Questions about kmp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share code between Android and iOS using Kotlin Multiplatform?

Kotlin Multiplatform shares code across platforms by using the commonMain source set for shared logic and the expect/actual pattern for platform-specific APIs in androidMain and iosMain.

What is the expect/actual pattern in Kotlin Multiplatform?

The expect/actual pattern in Kotlin Multiplatform allows you to declare expected functions or classes in commonMain and provide their actual implementations in platform-specific source sets like iosMain and androidMain to minimize code duplication.

Does Kotlin Multiplatform support Web and Desktop targets?

Yes, Kotlin Multiplatform supports Web and Desktop targets by organizing shared logic across Android, iOS, Desktop, and Web using unified project structures with corresponding source sets like wasmMain and jvmMain.

How do I structure a scalable Kotlin Multiplatform project?

You can structure a scalable Kotlin Multiplatform project by organizing your codebase into clear core and feature modules with multiple targets, ensuring proper separation of concerns across commonMain and platform-specific source sets.

What are the limitations of sharing code with Kotlin Multiplatform?

Kotlin Multiplatform code sharing requires a proper project setup with commonMain, androidMain, iosMain, jvmMain, and wasmMain source sets, meaning platform-specific behavior must be explicitly managed using expect/actual declarations rather than fully automated translation.