/xmake-skills:xmake-pluginsfrom xmake-skills
Invokes built-in Xmake plugins (project generators, compile_commands, doxygen) and defines custom tasks/plugins with `task(...)`. Useful for project configuration and build automation.
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.
Plugins extend the xmake CLI with new subcommands. Xmake ships many built-in plugins; you can also define project-local tasks in xmake.lua.
xmake project -k compile_commands # compile_commands.json (clangd/LSP)
xmake project -k cmakelists # export CMakeLists.txt
xmake project -k ninja # build.ninja
xmake project -k vsxmake -m "debug,release" # Visual Studio
xmake project -k xcode # Xcode
xmake doxygen # generate API docs via doxygen
xmake lua <script> # run a Lua snippet in xmake env
xmake l path/to/script.lua # shorthand
xmake macro --begin ... --end # record a macro of commands
xmake repo --add myrepo https://... # manage xrepo repositories
Auto-regenerate compile_commands.json on every build:
add_rules("plugin.compile_commands.autoupdate", {outputdir = "."})
xmake show -l plugins
A task is a named script reachable via xmake <taskname>.
task("hello")
set_menu {
usage = "xmake hello [options]",
description = "Say hello",
options = {
{"n", "name", "kv", "world", "name to greet"}
}
}
on_run(function ()
import("core.base.option")
print("hello, %s!", option.get("name"))
end)
xmake hello --name=ruki
Option spec: {short, long, kind, default, description} where kind is "k" (flag), "kv" (key-value), or "vs" (values).
task("count_files")
set_menu {usage = "xmake count_files", description = "Count .cpp files"}
on_run(function ()
import("core.project.project")
for _, target in pairs(project.targets()) do
local n = #target:sourcefiles()
print("%s: %d files", target:name(), n)
end
end)
Commonly imported modules: core.base.option, core.project.project, core.project.config, core.platform.platform, lib.detect.find_tool, core.tool.toolchain.
task(...) API, lives under ~/.xmake/plugins or a repo).xmake-rulesxmake-commandsWhat 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