/xmake-skills:xmake-optionsfrom xmake-skills
Defines user-configurable build options (`option(...)`) in Xmake, reads them from targets, and exposes them on the `xmake f` command line. Covers showmenu, default, values, and option-driven config.h generation.
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.
Options are user-facing switches that can be set via xmake f --name=value and queried from targets and conditions.
option("enable_foo")
set_default(false)
set_showmenu(true)
set_description("Enable the foo subsystem")
option_end()
set_showmenu(true) makes the option visible in xmake f --menu and xmake f --help.
target("app")
add_files("src/*.cpp")
if has_config("enable_foo") then
add_files("src/foo/*.cpp")
add_defines("ENABLE_FOO=1")
end
has_config("name") returns true when the option is truthy. Use get_config("name") to read the actual value.
option("backend")
set_default("vulkan")
set_values("vulkan", "metal", "d3d12")
set_showmenu(true)
xmake f --backend=metal
option("has_avx2")
add_cxflags("-mavx2")
add_cxxincludes("immintrin.h")
add_cxxsnippets("int f(){ return _mm256_set1_epi32(1)[0]; }")
Xmake runs the snippet at configure time; the option becomes enabled if the probe compiles.
target("app")
set_configdir("$(buildir)/config")
add_configfiles("src/config.h.in")
set_configvar("ENABLE_FOO", has_config("enable_foo") and 1 or 0)
src/config.h.in can reference ${define ENABLE_FOO} or ${ENABLE_FOO}.
xmake f --enable_foo=y --backend=metal -m release
xmake
xmake-targetsxmake-toolchainsWhat 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