/xmake-skills:xmake-kotlinfrom xmake-skills
Builds Kotlin/Native projects with xmake — producing executables and static/shared libraries from .kt sources using the kotlin-native toolchain.
Ships in xmake-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Xmake's Kotlin support targets Kotlin/Native — the ahead-of-time-compiled flavor, not JVM. For JVM-side projects, use Gradle/Maven directly.
xmake create -l kotlin -t console hello
cd hello
xmake run
add_rules("mode.debug", "mode.release")
target("hello")
set_kind("binary")
add_files("src/*.kt")
target("app") set_kind("binary") -- Kotlin/Native executable
target("mylib") set_kind("static")
target("mydyn") set_kind("shared")
Kotlin/Native must be installed separately — it's not bundled with xmake.
xmake f --toolchain=kotlin-native
xmake f --toolchain=kotlin-native --sdk=/opt/kotlin-native-prebuilt-linux-x86_64-1.9.0
Download the compiler from kotlinlang.org/docs/native-overview.html and point --sdk at it.
Kotlin/Native supports many platforms:
xmake f -p linux -a x86_64 --toolchain=kotlin-native
xmake f -p macosx -a arm64 --toolchain=kotlin-native
xmake f -p windows -a x86_64 --toolchain=kotlin-native
xmake f -p iphoneos -a arm64 --toolchain=kotlin-native
Kotlin/Native has a cinterop mechanism for binding C libraries. At the xmake level, link native static libs the usual way:
target("app")
set_kind("binary")
add_files("src/*.kt")
add_deps("mycdep") -- C static library target
cinterop configuration (the .def files) is Kotlin-side — see Kotlin/Native docs.
--sdk globally via xmake g --sdk=....xmake-targetsxmake-cross-compilationWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xmake-io/xmake-skills --plugin xmake-skills58 skills in this plugin
/xmake-addon-developmentUse when writing an Xmake addon — the `addon.lua` manifest, the payload layout (plugins/rules/toolchains/modules/includes/templates), `@self` references, shipping package definitions with an addon, `add_globalmodules`, testing it locally, and publishing it to xmake-repo as an `addon` kind package./xmake-addonsUse when installing or using an Xmake addon — `xmake addon --install/--list/--remove/--upgrade/--search`, declaring `add_addons(...)` in a project, and referencing addon payloads with `@addon/<name>/<rule>`, `@addon.<name>.<module>` or `@self`. For writing and publishing one, see xmake-addon-development./xmake-async-jobsUse when running parallel / async work inside xmake scripts — `async.runjobs` for parallel job execution, `async.jobgraph` (DAG) for dependency-ordered jobs, `async.jobpool` (tree structure), `core.base.scheduler` coroutine scheduling, semaphores, and `on_build_files(..., {jobgraph = true})` in rules. For running external compile jobs faster, see `xmake-build-optimization`./xmake-basicsUse when the user is starting a new Xmake project, installing Xmake, or needs the minimal xmake.lua structure. Covers installation, `xmake create`, the project layout, and the smallest valid xmake.lua./xmake-build-cacheUse when configuring or debugging xmake's local build cache (built-in, replaces ccache) or the remote compile cache service (shared across machines via `xmake service --ccache`). Covers enabling/disabling, fallbacks to external ccache, remote cache server/client setup, and cache cleaning./xmake-build-optimizationUse when a project builds slowly and you want to make it faster — parallel jobs, unity build, precompiled headers, build cache, LTO, link-time improvements, binary package cache, and profiling with `XMAKE_PROFILE=perf:*`. Covers idiomatic xmake speedups and the order to try them.Other plugins' skills for the same job