Claude Code Plugins

Community-maintained marketplace

Feedback
2
0

Kotlin Multiplatform - shared code, expect/actual, iOS integration

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name kotlin-multiplatform
description Kotlin Multiplatform - shared code, expect/actual, iOS integration
version 1.0.0
sasmp_version 1.3.0
bonded_agent 04-kotlin-multiplatform
bond_type PRIMARY_BOND
execution [object Object]
parameters [object Object]
logging [object Object]

Kotlin Multiplatform Skill

Build cross-platform applications with shared Kotlin code.

Topics Covered

Project Setup

kotlin {
    androidTarget()
    listOf(iosX64(), iosArm64(), iosSimulatorArm64()).forEach {
        it.binaries.framework { baseName = "Shared"; isStatic = true }
    }
    sourceSets {
        commonMain.dependencies {
            implementation("io.ktor:ktor-client-core:2.3.8")
        }
        androidMain.dependencies { implementation("io.ktor:ktor-client-okhttp:2.3.8") }
        iosMain.dependencies { implementation("io.ktor:ktor-client-darwin:2.3.8") }
    }
}

expect/actual

// commonMain
expect class SecureStorage { fun get(key: String): String? }

// androidMain
actual class SecureStorage { actual fun get(key: String) = prefs.getString(key, null) }

// iosMain
actual class SecureStorage { actual fun get(key: String) = KeychainWrapper.get(key) }

Troubleshooting

Issue Resolution
"No actual for expect" Add implementation in platform source set
iOS framework not found Run linkDebugFrameworkIos task

Usage

Skill("kotlin-multiplatform")