/xmake-skills:xmake-nimfrom xmake-skills
Builds Nim projects with xmake: binary/library targets from .nim sources, selects C or C++ backend, and mixes Nim with C.
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.
Nim compiles to C (or C++ / JavaScript) via nim c / nim cpp; xmake wraps this into a regular target model.
xmake create -l nim -t console hello
cd hello
xmake run
add_rules("mode.debug", "mode.release")
target("hello")
set_kind("binary")
add_files("src/*.nim")
target("app") set_kind("binary")
target("mylib") set_kind("static")
target("mydyn") set_kind("shared")
target("app")
add_files("src/main.nim")
set_values("nim.backend", "c") -- default
-- or:
set_values("nim.backend", "cpp")
set_values("nim.backend", "objc")
set_values("nim.backend", "js")
Most projects use c (native). cpp is required if you import C++ libraries via {.importcpp.}. js is for web targets.
target("app")
add_files("src/*.nim")
add_ncflags("-d:release", "--opt:speed") -- Nim compiler flags
add_cxflags("-O3") -- passes to underlying C compiler
add_ncflags = Nim compiler flags. add_cxflags flows through to the C backend.
xmake f --toolchain=nim
xmake f --toolchain=nim --sdk=/opt/nim-2.0
Nim code can call C with {.importc.}; xmake can also compile C files alongside:
target("app")
set_kind("binary")
add_files("src/main.nim", "src/helper.c")
add_includedirs("include")
{.importcpp.}, the target must use nim.backend = "cpp". Otherwise link errors.nimble vs xmake. Nim's native package manager is nimble. Xmake doesn't integrate with it — declare Nim deps via nimble manually, and let xmake handle the build.-d:release passed as nim flag. It's a Nim define, not a C flag — must go in add_ncflags, not add_defines.xmake-targetsxmake-targetsWhat 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`.Other plugins' skills for the same job