/kmp:mobiai-kmpfrom kmp
Provides guidance for Kotlin Multiplatform projects: shared code, expect/actual declarations, platform-specific implementations, building, and testing.
Ships in kmp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Community contribution welcome! Help flesh out this skill with KMP patterns, common pitfalls, and real-world workflows.
Guide for working with Kotlin Multiplatform projects.
# Check for KMP indicators
ls shared/ composeApp/ iosApp/ 2>/dev/null
grep -r "kotlin(\"multiplatform\")\|KotlinMultiplatform" build.gradle* --include="*.gradle*" | head -5
cat shared/build.gradle.kts | head -30
project/
shared/ # Shared KMP module
src/
commonMain/kotlin/ # Shared code (all platforms)
commonTest/kotlin/ # Shared tests
androidMain/kotlin/ # Android-specific implementations
iosMain/kotlin/ # iOS-specific implementations
build.gradle.kts
composeApp/ # Android app (Compose)
src/main/
iosApp/ # iOS app (SwiftUI/UIKit)
iosApp.xcodeproj
build.gradle.kts # Root build file
Shared interface with platform-specific implementations:
// commonMain
expect class PlatformLogger() {
fun log(message: String)
}
// androidMain
actual class PlatformLogger {
actual fun log(message: String) = Log.d("KMP", message)
}
// iosMain
actual class PlatformLogger {
actual fun log(message: String) = NSLog(message)
}
# Find expect declarations
grep -r "expect " shared/src/commonMain --include="*.kt" -l
# Find actual implementations
grep -r "actual " shared/src/androidMain --include="*.kt" -l
grep -r "actual " shared/src/iosMain --include="*.kt" -l
# Build shared module
./gradlew :shared:build
# Run common tests
./gradlew :shared:testDebugUnitTest
# Run iOS tests (on macOS)
./gradlew :shared:iosSimulatorArm64Test
# Build Android app
./gradlew :composeApp:assembleDebug
# Build iOS framework
./gradlew :shared:linkDebugFrameworkIosSimulatorArm64
// shared/src/commonTest/kotlin/MyTest.kt
class MyTest {
@Test
fun testSharedLogic() {
val result = calculate(2, 3)
assertEquals(5, result)
}
}
// shared/src/androidTest/kotlin/AndroidSpecificTest.kt
class AndroidSpecificTest {
@Test
fun testAndroidImplementation() { ... }
}
expect declarations have actual implementations for all targetsapi() vs implementation() carefully in shared modulecommonMain, test in commonTestandroidMain/iosMain, test in platform-specific test source setexpect/actual implementationsWant to improve this skill? Share your KMP expertise, Compose Multiplatform patterns, and platform bridging tips via a PR.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub adriaanat/ecosystem-manager --plugin kmp2 plugins ship this exact skill · first indexed Jul 20, 2026
Other plugins' skills for the same job