kotlin-multiplatform-expert

Guide Kotlin Multiplatform projects through cross-platform configuration and interop challenges.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-old --skill kotlin-multiplatform-expert
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kotlin-multiplatform-expert
Source: https://github.com/trancee/MeshLink-old/tree/main/.agents/skills/kotlin-multiplatform-expert
Command: npx skills add https://github.com/trancee/MeshLink-old --skill kotlin-multiplatform-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides deep, expert guidance for Kotlin Multiplatform (KMP) projects to resolve cross-platform configuration, interop, and testing challenges between Android and iOS.

Core Features & Use Cases

  • Target structure mastery: guidance on commonMain/iosMain/appleMain source sets, expect/actual, and the Kotlin Multiplatform plugin configuration to avoid subtle pitfalls.
  • Interop and integration: techniques for CocoaPods/SPM/XCFramework, cinterop, and Swift interop including @Throws, @ObjCName, and SKIE for a smoother Swift-facing API.
  • UI and testing patterns: Compose Multiplatform guidance, KMP testing (commonTest, runTest, Turbine), and robust cross-platform test strategies, plus CI/CD and publishing workflows.
  • Practical outcomes: actionable steps, code snippets, and best practices to keep KMP projects maintainable as they scale.

Quick Start

Pose a KMP question and I will guide you through setting up targets, interop, and testing for Android+iOS.

Frequently Asked Questions about kotlin-multiplatform-expert

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

FAQPage Schema
How do I configure Kotlin Multiplatform source sets for Android and iOS?▼

Set up Kotlin Multiplatform source sets by organizing commonMain, iosMain, and appleMain hierarchies using expect/actual declarations. This structure shares core logic across Android and iOS while targeting platform-specific implementations, avoiding subtle plugin configuration pitfalls.

What's the best way to handle Swift interop in a KMP project?▼

Handle Swift interop in a KMP project using cinterop, CocoaPods, SPM, or XCFramework. Apply @Throws and @ObjCName annotations, or integrate SKIE, to generate a smoother Swift-facing API and resolve cross-platform integration challenges.

Does Compose Multiplatform work for shared UI across Android and iOS?▼

Yes, Compose Multiplatform works for shared UI across Android and iOS. It provides patterns to build cross-platform user interfaces within KMP modules, allowing you to maintain UI code alongside shared logic while keeping projects maintainable.

How do I write cross-platform tests for Kotlin Multiplatform modules?▼

Write cross-platform tests for Kotlin Multiplatform modules using commonTest, runTest, and Turbine. These testing approaches validate shared logic and asynchronous flows, ensuring robust cross-platform test strategies as KMP projects scale.

How to set up CI/CD and publishing workflows for KMP libraries?▼

Set up CI/CD and publishing workflows for KMP libraries by configuring Gradle tasks to build XCFrameworks and manage SPM or CocoaPods distribution. This automates cross-platform artifact publishing and maintains project maintainability.

Why does my Kotlin Multiplatform expect/actual declaration fail to compile?▼

Kotlin Multiplatform expect/actual declarations fail to compile due to hierarchical source set misconfigurations or mismatched platform signatures. Aligning commonMain targets with iosMain actual implementations and fixing Kotlin plugin configurations resolves these errors.