Platform

SkillMonitoring & ops

Platform-specific behavior on the KMP Starter Template — the Platform class, logging, native iOS bindings, and SPM dependency integration.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Platform skill

What this skill tells your AI

The instructions your AI receives, as published by devatrii/kmp-starter-template in .agents/skills/kmp-starter/platform/SKILL.md and read by ahel’s review.

Platform class

Use the Platform abstraction for platform-specific behavior (com.kmpstarter.core.platform).

if (platform.debug) { /* debug-only: verbose logging, lower remote-config interval, disable analytics */ }

val osVersion = platform.osVersion
val versionName = platform.appInfo.versionName
val appName = platform.appInfo.appName

if (platform.isAndroid) { /* Android */ }
if (platform.isIos) { /* iOS */ }

platform.ifAndroid { android -> /* Android-only */ }
platform.ifIos { ios -> /* iOS-only; ios.exactVersion.major/minor/patch */ }

if (platform.isDynamicColorSupported) { /* Android 12+ */ }

Prefer Platform over scattering raw expect/actual checks across the codebase.

Logging

Use com.kmpstarter.utils.logging.Log:

Log.d(TAG, "Debug message")
Log.i(TAG, "Info message")
Log.w(TAG, "Warning message")
Log.e(TAG, "Error message")
Log.d(null, "uses default tag")

Pass null for the default tag; supports multiple items: Log.d(TAG, "User:", userId, "Action:", name).

Native iOS bindings (Swift → Kotlin)

Add Swift code in starter/native/bindings/src/swift/interop/. Classes/methods must be @objc public. Resync Gradle after adding. Call from iosMain:

@objc public class HelloKotlin: NSObject {
    @objc public static func sayHello(str: String) { print("Hello \(str)") }
}
import interop.HelloKotlin
HelloKotlin.sayHelloWithStr("DevAtrii")

SPM dependencies (iOS)

Use the spm-for-kmp plugin. Configure per iOS target:

target.swiftPackageConfig(cinteropName = "interop") {
    dependency {
        val dep = libs.ios.someSwift.get()
        remotePackageVersion(url = uri(dep.group), products = { add(dep.name) }, version = dep.version!!)
    }
}

Manage versions/names in gradle/libs.versions.toml.

Reference

  • Docs: https://starter.atherio.dev/fundamentals/03-platform-class/, https://starter.atherio.dev/fundamentals/10-logging/, https://starter.atherio.dev/fundamentals/04-native-bindings/, https://starter.atherio.dev/fundamentals/11-swift-package-manager/

Signals

GitHub stars
162
Forks
28
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
kmp-starter-platform
Source
github.com/devatrii/kmp-starter-template