kmp-migration

Guide Android module migration to Kotlin Multiplatform with dependency audits and source-set restructuring.

23|2|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/kirich1409/krozov-ai-tools --skill kmp-migration
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kmp-migration
Source: https://github.com/kirich1409/krozov-ai-tools/tree/main/plugins/developer-workflow-kotlin/skills/kmp-migration
Command: npx skills add https://github.com/kirich1409/krozov-ai-tools --skill kmp-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrate Android projects to Kotlin Multiplatform (KMP) — facilitate isolation, dependency audits, and shared code strategies for multi-platform work. This skill guides teams through module isolation, KMP readiness checks, Kotlin version upgrades, and iOS framework exposure (CocoaPods / XCFramework / SPM) while applying expect/actual patterns. Trigger on: "move to KMP", "share with iOS", "extract to shared module", "make multiplatform", "migrate :module to KMP", "can we share this with iOS", "move to commonMain", "Kotlin Multiplatform". Do NOT use for: in-project library swaps that don't involve platform sharing (use code-migration instead), general KMP questions without a specific module/codebase to migrate, or iOS-only work.

Core Features & Use Cases

  • Guidance through module isolation, dependency compatibility audits, and source-set restructuring for KMP migrations.
  • Kotlin version upgrade planning and execution to 2.x, ensuring compatibility.
  • iOS framework exposure strategies (CocoaPods / XCFramework / SPM) and expect/actual patterns for multi-platform code.

Quick Start

Isolate the module, run dependency audits with the latest maven-mcp tooling, and migrate sources to androidMain before promoting to commonMain.

Frequently Asked Questions about kmp-migration

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

FAQPage Schema
How do I migrate an Android module to Kotlin Multiplatform?▼

Migrate an Android module to Kotlin Multiplatform by isolating the module, auditing dependencies for compatibility, and restructuring source-sets from androidMain to commonMain using an expect/actual pattern. The process includes a migration plan, step-by-step guidance, and compile verification checkpoints.

What's the best way to share Android code with iOS using Kotlin Multiplatform?▼

Share Android code with iOS by exposing it through iOS frameworks using CocoaPods, XCFramework, or Swift Package Manager. This Kotlin Multiplatform migration strategy applies expect/actual patterns to handle platform-specific implementations while keeping shared logic in commonMain.

Can I migrate to Kotlin Multiplatform if my project uses an older Kotlin version?▼

Migrating to Kotlin Multiplatform with an older Kotlin version requires a planned Kotlin version upgrade to 2.x to ensure compatibility. The migration process includes upgrade planning and execution steps to transition your codebase smoothly to the required version.

Does a Kotlin Multiplatform migration require a dependency audit?▼

A dependency audit is required during a Kotlin Multiplatform migration to verify that all libraries in your Android module support multiplatform usage. Checking dependency compatibility prevents build failures when moving shared code to commonMain.

When should I not use a Kotlin Multiplatform migration approach?▼

Avoid a Kotlin Multiplatform migration for in-project library swaps that do not involve platform sharing, general KMP questions without a specific module to migrate, or iOS-only work. Use code-migration instead when cross-platform sharing is not the goal.

How does the expect/actual pattern work when moving code to commonMain?▼

The expect/actual pattern works in Kotlin Multiplatform by declaring expected functionality in commonMain and providing actual platform-specific implementations in androidMain or iOS source-sets. This allows shared code to compile across platforms while accessing native features.