kotlin-tooling-native-build-performance

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform iOS builds.

1|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/citytexi/team-yg-pesonal-agent --skill kotlin-tooling-native-build-performance-citytexi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kotlin-tooling-native-build-performance
Source: https://github.com/citytexi/team-yg-pesonal-agent/tree/main/.claude/skills/kotlin-tooling-native-build-performance
Command: npx skills add https://github.com/citytexi/team-yg-pesonal-agent --skill kotlin-tooling-native-build-performance-citytexi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects targeting iOS — long linkDebug/linkRelease tasks, cold CI builds that re-download the Kotlin/Native toolchain, and local loops that build release artifacts — are diagnosed and fixed with measured, release-safe changes. ## Core Features & Use Cases - Static audit script: Runs a read-only shell audit that prints file:line findings for disabled caches, transitiveExport usage, broad KSP configuration, and missing CI ~/.konan caching. - Symptom-to-cause diagnosis: Maps build-log symptoms (release tasks in local loops, configuration-phase pauses, ksp* task dominance) to targeted reference guides covering caching, artifacts and targets, exports, and experimental switches. - Use Case: A developer whose shared-module change costs 12 minutes because the local loop runs assembleXCFramework gets a measured plan: switch to linkDebugFrameworkIosSimulatorArm64 locally, enable the configuration cache, and keep CI release artifacts unchanged. ## Quick Start Ask the agent to diagnose why your Kotlin Multiplatform iOS build is slow and propose a measured fix plan using this skill.

Frequently Asked Questions about kotlin-tooling-native-build-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up slow Kotlin/Native iOS builds?▼

First classify the scenario (local vs CI, debug vs release, cold vs warm), then measure with kotlin.build.report.output=file or --scan. Common fixes are enabling Gradle build and configuration caches, keeping ~/.konan warm in CI, and building only the debug framework task your loop needs.

Why is my Kotlin Multiplatform iOS build slow locally?▼

Local loops often run broad tasks like assembleXCFramework, which builds release binaries for every target — release linking is roughly an order of magnitude slower than debug. Use a specific task such as linkDebugFrameworkIosSimulatorArm64 or the Xcode embed task instead.

How do I cache the Kotlin/Native toolchain in CI?▼

Kotlin/Native stores its compiler distribution in ~/.konan, which ephemeral CI runners lose between runs. On GitHub Actions, cache ~/.konan with actions/cache keyed on the OS and libs.versions.toml hash to avoid cold-start downloads every build.

Does transitiveExport slow down Kotlin/Native builds?▼

Yes. transitiveExport = true exports the entire transitive dependency closure and disables dead code elimination in many cases. Remove it and keep explicit export(...) entries only for modules whose API Swift or Objective-C code calls directly.

Should I enable kotlin.incremental.native for faster builds?▼

kotlin.incremental.native=true is experimental: it recompiles only changed klib parts and can help warm rebuilds after small edits. Enable it only with user agreement, label it experimental in reports, and revert if it causes inconsistent builds.