From kotlin-multiplatform
Diagnose and fix Kotlin Multiplatform Gradle, source-set, dependency, Android target, Compose plugin, KGP/AGP, testing, static-analysis, and CI issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kotlin-multiplatform:kmp-gradle-doctorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill for KMP build failures, Gradle DSL changes, plugin version alignment, target declarations, source-set hierarchy, Android-KMP plugin migration, dependency placement, KSP/KAPT, detekt/ktlint, Compose compiler, CI, or test task selection.
Use this skill for KMP build failures, Gradle DSL changes, plugin version alignment, target declarations, source-set hierarchy, Android-KMP plugin migration, dependency placement, KSP/KAPT, detekt/ktlint, Compose compiler, CI, or test task selection.
settings.gradle(.kts)build.gradle(.kts)gradle/libs.versions.tomlgradle.propertiesgradle/wrapper/gradle-wrapper.propertiespython3 ../../scripts/kmp_inspector.py --root <project-root>
clean unless cache state is the suspected issue.kdoctor only when installed or explicitly approved to install; its scope is host/toolchain readiness.Use project static inspection first. Then consider host diagnostics when symptoms include Xcode selection, CocoaPods/Ruby, Android Studio plugin, JDK/JAVA_HOME, simulator, or iOS Gradle task failures unrelated to source changes.
Useful checks:
xcode-select -p
xcodebuild -version
java -version
./gradlew -version
kdoctor -v
Do not install or update KDoctor, CocoaPods, Ruby, Xcode, Android Studio, JDKs, or SDK tools unless the user explicitly asked for environment setup.
For medium or large KMP projects, inspect whether repeated configuration is centralized:
build-logic/ as an included build or buildSrc/ for convention plugins when many modules repeat setup.pluginManagement and dependencyResolutionManagement in settings.dependsOn() edges can disable the default hierarchy template; if the repo has manual edges, keep them only when they model a real non-default sharing need.commonMainandroidMainiosMain or the exact native source setjvmMain or a named desktop source setcommonMain, verify all configured targets publish the artifact.For KMP library modules targeting Android on modern AGP:
com.android.kotlin.multiplatform.library.kotlin { android { ... } }.android {} block in a module that has moved to the Android-KMP library plugin.buildTypes or productFlavors in that module.androidResources { enable = true } if Android resources or Compose resources need Android resource processing.withJava() if Java source files exist.localDependencySelection when consuming variant-rich Android libraries.Prefer the narrowest proof:
./gradlew :shared:compileKotlinMetadata
./gradlew :shared:compileKotlinIosSimulatorArm64
./gradlew :shared:jvmTest
./gradlew :shared:allTests
./gradlew :androidApp:assembleDebug
./gradlew :desktopApp:run
Task names vary by module and target. Use ./gradlew :module:tasks --all when uncertain.
detekt checks all commonMain, iosMain, and androidMain code.api(...) dependencies, review whether the public surface is broader than needed.npx claudepluginhub xopoko/plug-n-skills --plugin kotlin-multiplatformProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.