All skills
kotlin avatar

/kotlin-tooling-native-build-performance

@87bec33 official
by kotlinkotlin/kotlin-agent-skills1.1k stars
42

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS. Use when the user reports slow iOS or shared-framework builds, long linkDebug*/linkRelease* or XCFramework tasks, cold CI builds that re-download the Kotlin/Native toolchain, KSP or other generated code on the native path, transitiveExport usage, or asks for a local-development versus CI build performance plan.

Use this Skill: https://skilld.dev/gh/kotlin/kotlin-agent-skills/kotlin-tooling-native-build-performance

This session only. Nothing lands on disk.

referencesartifacts-and-targets.md

≈536 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Build the Right Artifact for the Feedback Loop

A release binary takes roughly an order of magnitude longer to build than a debug binary, and umbrella tasks such as build and assemble compile the same code several times. Map each feedback loop to one specific task.

Task table

Feedback loop Correct task
Xcode builds and runs the app (direct integration) :shared:embedAndSignAppleFrameworkForXcode
Gradle-only check of the Apple Silicon simulator framework :shared:linkDebugFrameworkIosSimulatorArm64
CocoaPods integration :shared:linkPodDebugFrameworkIosSimulatorArm64
Distribution or App Store validation assemble<Name>ReleaseXCFramework — in CI, not in the local loop
Debug XCFramework genuinely required assemble<Name>DebugXCFramework

Per-target link tasks follow the pattern link<BuildType>Framework<Target>; find the exact names with ./gradlew :shared:tasks or in the build log.

Rules

  • embedAndSignAppleFrameworkForXcode builds only the slice Xcode asked for and must run from an Xcode build phase, not standalone. Direct integration uses the documented run-script phase; keep its OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED guard so the IDE does not trigger a second Gradle invocation.
  • Do not mix integration methods: a project either uses direct integration or the CocoaPods integration, and the local task must match the one in use.
  • Do not replace CI release artifacts with debug artifacts. If CI release builds are slow, fix caching, the target matrix, and exports instead.

Target matrix

*XCFramework tasks build every declared target. Remove a target only when project policy confirms it is unused — the common case is dropping iosX64() when the team no longer supports Intel-based simulators. State the policy assumption in your report; if policy is unclear, ask instead of deleting.

Docs: https://kotlinlang.org/docs/multiplatform-ios-integration-overview.html, https://kotlinlang.org/docs/multiplatform/multiplatform-direct-integration.html, https://kotlinlang.org/docs/multiplatform/multiplatform-build-native-binaries.html

Source: SKILL.md on GitHub

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a diagnostic framework and an audit script to optimize Kotlin/Native build performance. It is safe for its intended purpose, but it carries a low risk of indirect prompt injection due to the processing of untrusted project files during the analysis phase.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 87bec33. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 3 months ago
Other metadata
metadata
{
  "author": "JetBrains",
  "version": "1.0.0",
  "tested_models": "openai/gpt-5.5, openai/gpt-5.4-mini",
  "last_eval": "2026-07-06"
}

README badge

README badge for kotlin/kotlin-agent-skills/kotlin-tooling-native-build-performance