Agent skill

Kotlin Tooling Native Build Performance

by Kotlin in Kotlin/kotlin-agent-skills

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS.

Apache-2.0Auto-check passedMobile

Install Kotlin Tooling Native Build Performance

skills CLI
$ npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-native-build-performance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Kotlin/kotlin-agent-skills kotlin-tooling-native-build-performance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Kotlin/kotlin-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kotlin-tooling-native-build-performance .claude/skills/kotlin-tooling-native-build-performance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kotlin-tooling-native-build-performance
GitHub stars
1.1k
Token cost
~2k tokens
SKILL.md length
769 words
Files
7 (incl. scripts, references)
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS.

  • Works in 3 steps: Classify the Slow Scenario → Audit and Measure → Fix in Safe Order
  • The user reports slow iOS
  • SKILL.md covers Step 0: Classify the Slow…, Step 1: Audit and Measure, Step 2: Fix in Safe Order and Worked Example, plus 3 more sections
  • Runs Shell scripts from its folder

What it does

Kotlin Tooling Native Build Performance is an agent skill from Kotlin/kotlin-agent-skills. 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.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `evals/EVALUATION.md`, `references/artifacts-and-targets.md` and `references/caching-and-gradle.md`).

It sits in Mobile, covering Android development and Cross-platform mobile apps. It works with Kotlin, iOS and Gradle. The repository describes itself as: A collection of AI agent skills useful for projects using Kotlin language. The licence is Apache-2.0.

When your agent uses it

  • The user reports slow iOS
  • Shared-framework builds
  • Long linkDebug/linkRelease
  • XCFramework tasks

Example prompts

  • “Use the kotlin-tooling-native-build-performance skill to diagnose and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform…”
  • “/kotlin-tooling-native-build-performance”

Requirements

  • A Bash shell

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Classify the Slow Scenario
  2. Audit and Measure
  3. Fix in Safe Order

What it can do on your machine

Read from SKILL.md and the folder at commit c2f9069. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • kotlinlang.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kotlin Tooling Native Build Performance loads about 2k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 116 tokens; SKILL.md has 769 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~116
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Kotlin/kotlin-agent-skills at commit c2f9069, republished under its Apache-2.0 licence (© Kotlin). 769 words, ~1,985 tokens.

Download SKILL.mdSave it as .claude/skills/kotlin-tooling-native-build-performance/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
kotlin-tooling-native-build-performance
description
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.
license
Apache-2.0
metadata.author
JetBrains
metadata.version
1.0.0
metadata.tested_models
openai/gpt-5.5, openai/gpt-5.4-mini
metadata.last_eval
2026-07-06

Kotlin/Native Build Performance

Turn "the iOS build is slow" into a measured diagnosis and a small set of safe fixes. Two rules apply throughout:

  1. Never trade away required release behavior. A faster local loop must not change what CI publishes.
  2. Measure before and after with the same command and the same build state. An unmeasured fix is a guess.

Step 0: Classify the Slow Scenario

Establish four facts before editing anything: where (local or CI), what (debug feedback loop or release/distribution artifact), state (first build, clean, warm, or no-op), and phase (which tasks dominate the log). Then match the dominant symptom:

Symptom in the build logLikely causeRead
linkRelease* or *ReleaseXCFramework tasks in a local development loopBuilding distribution artifacts for developmentartifacts-and-targets
Kotlin/Native compiler distribution downloaded on every CI run~/.konan not preserved between runscaching-and-gradle
Long pause before the first task startsConfiguration phase, no configuration cachecaching-and-gradle
All iOS targets build when only one simulator is neededBroad task (build, assemble, assemble*XCFramework) or unused targetsartifacts-and-targets
ksp* tasks ahead of compileKotlinIos*Generated-code work on the native pathexports-and-generated-code
Small source edit recompiles and relinks everythingCompiler caches disabled, or missing incrementalitycaching-and-gradle, experimental
Machine overloaded while several link* tasks run at onceParallel native linkingcaching-and-gradle, worker-limit caveat

Step 1: Audit and Measure

  1. Run the static audit from the project root:

    bash
    scripts/audit-native-build.sh /path/to/project

    It is read-only and prints file:line findings (disabled caches, broad local tasks, transitiveExport, broad KSP configuration, missing CI .konan cache), each pointing at the reference file with the fix. Findings are leads, not verdicts — confirm each against project policy.

  2. Find the command the user actually waits for: a script, a CI step, or the Gradle invocation inside an Xcode build phase. Optimize that command, not a task you picked yourself.

  3. Run it twice when practical. The first build downloads Kotlin/Native components and fills caches; only the second and later runs are representative. Attribute time per task before blaming the compiler:

    properties
    kotlin.build.report.output=file   # writes build/reports/kotlin-build/

    Gradle's --scan or --profile work too.

  4. If you cannot run the build (no macOS host, no Xcode), analyze logs, build scans, or checked-in metrics instead — and state explicitly that the conclusion is static.

Step 2: Fix in Safe Order

Apply fixes one at a time, re-measuring as you go:

  1. Restore healthy defaults — remove cache/daemon workarounds, enable Gradle build and configuration caches, keep ~/.konan warm in CI, update Kotlin: references/caching-and-gradle.md
  2. Build only what the feedback loop needs — one specific task per loop, correct integration method, justified target matrix: references/artifacts-and-targets.md
  3. Cut export and generated-code cost — drop transitiveExport, narrow export(...), scope KSP work to the native compilations that need it: references/exports-and-generated-code.md
  4. Experimental switches last, with the user's agreement: references/experimental.md
Show full SKILL.md (318 more words)Show less

Worked Example

A developer on an Apple Silicon Mac complains that "every shared-module change costs 12 minutes". Their loop runs ./gradlew :shared:assembleXCFramework. A build scan of the second (warm) run shows:

:shared:linkReleaseFrameworkIosArm64             348s
:shared:linkReleaseFrameworkIosX64               341s
:shared:compileKotlinIosX64                       96s
:shared:linkDebugFrameworkIosSimulatorArm64       41s
:shared:compileKotlinIosSimulatorArm64            38s
configuration phase                               64s

Reasoning chain:

  • The loop is local + debug + warm, but ~690s goes to linkRelease* — release linking is an order of magnitude slower than debug and only CI needs it. Replace the local command with :shared:linkDebugFrameworkIosSimulatorArm64 (or the Xcode embed task if Xcode drives the build). (artifacts-and-targets)
  • All iosX64 work serves Intel simulators; ask whether the team still supports them before removing the target. (artifacts-and-targets)
  • 64s of configuration on every run disappears behind org.gradle.configuration-cache=true once trialed. (caching-and-gradle)
  • Expected loop after the change: ~40s compile + ~40s link on warm builds — confirm by re-running the new command twice and comparing.
  • CI keeps assembleXCFramework untouched; note that explicitly in the report.

Verify

  • Re-run the exact baseline command; compare warm build against warm build, not warm against cold.
  • Second run with the configuration cache reports it is being reused.
  • The local development log no longer contains linkRelease*, *ReleaseXCFramework, or removed generator tasks.
  • CI still produces every required release artifact, unchanged.
  • Tests pass and the app still runs from Xcode.
  • scripts/audit-native-build.sh reports no findings you have not consciously accepted and documented.

Report Your Changes

Close with a short performance note:

  • The slow scenario (local/CI, debug/release, cold/warm) and the measured evidence — or a statement that the analysis was static.
  • Each change, and why it is safe for release behavior.
  • The before/after commands the user can run to confirm the win.
  • Remaining tradeoffs: experimental flags enabled, targets removed under a policy assumption, worker limits, or generated-code work deferred.
  • Links to the relevant official documentation below.

Official Documentation

© Kotlin, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in skills/kotlin-tooling-native-build-performance of Kotlin/kotlin-agent-skills.

  • SKILL.md
  • evals/EVALUATION.md
  • references/artifacts-and-targets.md
  • references/caching-and-gradle.md
  • references/experimental.md
  • references/exports-and-generated-code.md
  • scripts/audit-native-build.sh

Open the folder on GitHubat commit c2f9069

Compare with similar skills

Kotlin Tooling Native Build Performance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kotlin Tooling Native Build Performance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kotlin Tooling Native Build Performance this skillKotlin/kotlin-agent-skills1.1k—~2kAutomated safety check: PassApache-2.0
Expo Brownfield Integrationmweinbach/agent-coworker1562 repos~900Automated safety check: NotesCustom licence
Upgrade React NativeShopify/flash-list7.2k—~1.9kAutomated safety check: PassMIT
Claude Android NinjaDrjacky/claude-android-ninja124—~5.2kAutomated safety check: PassApache-2.0
Simulator Audio E2Ehyochan/react-native-nitro-sound961—~1.1kAutomated safety check: PassMIT
Ksafeioannisa/KSafe332—~17kAutomated safety check: PassApache-2.0

Similar skills

  • Expo Brownfield Integration

    mweinbach/agent-coworker

    Helps add Expo and React Native to an existing native iOS or Android app, and choose between a prebuilt AAR or XCFramework and a fully integrated build.

    156 GitHub starsUsed in 2 repos~900 tokens
    MobileAuto-check: notes
  • Upgrade React Native

    Shopify/flash-list

    Official

    Upgrade the React Native fixture app to a new version. An agent skill from Shopify/flash-list.

    7.2k GitHub stars~1.9k tokensUpdated 8 days ago
    MobileAuto-check passed
  • Claude Android Ninja

    Drjacky/claude-android-ninja

    Build and migrate Android apps with Kotlin, Jetpack Compose, MVVM, Hilt, Room 3 (KSP, SQLiteDriver, Flow/suspend DAOs), Navigation3, and multi-module Gradle.

    124 GitHub stars~5.2k tokensUpdated 10 days ago
    MobileAuto-check passed
  • Simulator Audio E2E

    hyochan/react-native-nitro-sound

    Build and run repeatable react-native-nitro-sound recorder/player regression tests on an iOS Simulator or Android emulator, with explicit virtual-device selection, microphone permission, Maestro…

    961 GitHub stars~1.1k tokensUpdated 10 days ago
    MobileAuto-check passed
  • Ksafe

    ioannisa/KSafe

    Required before any reply that touches KSafe (by ksafe(...), ksafe.get/put, :ksafe-compose, :ksafe-biometrics), even a 'can KSafe do X?' question or a one-line change that looks like plain Kotlin.

    332 GitHub stars~17k tokensUpdated 6 days ago
    MobileAuto-check passed
  • Ktormonitor

    CosminMihuMDC/KtorMonitor

    KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring.

    254 GitHub stars~2.5k tokensUpdated 26 days ago
    MobileAuto-check passed

More from Kotlin/kotlin-agent-skills

  • Load when porting, converting, or reimplementing a single Gradle plugin as a Kotlin Toolchain local plugin, or when mapping Gradle plugin concepts (Task, Extension, project.version, dependsOn, -P…

    1.1k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Kotlin Tooling Kotlin Toolchain

    Kotlin/kotlin-agent-skills

    Load when building, running, testing, packaging, linting, or configuring a Kotlin/Java project with the Kotlin Toolchain (JetBrains' unified CLI, formerly Amper), when scaffolding a new or…

    1.1k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Load when authoring, writing, or designing a Kotlin Toolchain local plugin to extend the declarative build with code generation, build-time processing, custom verification, or packaging that…

    1.1k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Load when migrating or converting an entire Gradle Kotlin project (build.gradle(.kts), wrapper, libs.versions.toml, buildSrc) to the Kotlin Toolchain, including rewriting CI and replacing Gradle…

    1.1k GitHub stars~6k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Kotlin Tooling Native Build Performance

What does Kotlin Tooling Native Build Performance do?

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS. Kotlin Tooling Native Build Performance is an agent skill from Kotlin/kotlin-agent-skills. Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS.

When should I use Kotlin Tooling Native Build Performance?

Kotlin Tooling Native Build Performance fits situations like: the user reports slow iOS; shared-framework builds; long linkDebug/linkRelease; XCFramework tasks.

How do I install Kotlin Tooling Native Build Performance in Claude Code?

Run `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-native-build-performance -a claude-code`. Or copy the skill folder (skills/kotlin-tooling-native-build-performance in Kotlin/kotlin-agent-skills) into .claude/skills/kotlin-tooling-native-build-performance in your project. Claude Code loads it when a task matches its description.

How do I install Kotlin Tooling Native Build Performance in Codex?

Run `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-native-build-performance -a codex`. Or copy the skill folder (skills/kotlin-tooling-native-build-performance in Kotlin/kotlin-agent-skills) into .agents/skills/kotlin-tooling-native-build-performance in your project. Codex loads it when a task matches its description.

Can I use Kotlin Tooling Native Build Performance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-native-build-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kotlin-tooling-native-build-performance, .gemini/skills/kotlin-tooling-native-build-performance, .github/skills/kotlin-tooling-native-build-performance and .opencode/skills/kotlin-tooling-native-build-performance in your project.

What does Kotlin Tooling Native Build Performance need to run?

Going by SKILL.md and its folder, Kotlin Tooling Native Build Performance needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Kotlin Tooling Native Build Performance access the network?

SKILL.md names 1 domain. As links in the text: kotlinlang.org. This is read from the text; nothing was executed.

Is Kotlin Tooling Native Build Performance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Kotlin Tooling Native Build Performance use?

Kotlin Tooling Native Build Performance is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kotlin Tooling Native Build Performance use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Kotlin Tooling Native Build Performance?

Skills that share tags, products or a category with Kotlin Tooling Native Build Performance: Expo Brownfield Integration (mweinbach/agent-coworker, 156 stars), Upgrade React Native (Shopify/flash-list, 7.2k stars), Claude Android Ninja (Drjacky/claude-android-ninja, 124 stars) and Simulator Audio E2E (hyochan/react-native-nitro-sound, 961 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kotlin Tooling Native Build Performance?

Kotlin (a GitHub organization) maintains it in Kotlin/kotlin-agent-skills, which has 1,074 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: Kotlin/kotlin-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.