/xmake-skills:xmake-build-cachefrom xmake-skills
Configures and debugs xmake's built-in local build cache (replaces ccache) and remote compile cache service for cross-machine sharing. Covers enabling/disabling, external ccache fallback, server/client setup, and cache cleaning.
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 has a built-in compile cache that speeds up rebuilds by reusing object files. Two flavors:
Both use the same --ccache name on the CLI — --ccache= is xmake-speak for "C/C++ build cache", not the ccache tool specifically.
Enabled automatically. No setup required. Since v2.6.6, xmake uses its own built-in local cache; before that it shelled out to the system ccache.
xmake f --ccache=n # disable for this project
xmake f --ccache=y # re-enable
If you specifically want the third-party ccache tool (e.g. for CI cache sharing with non-xmake builds):
xmake f --ccache=n --cxx="ccache g++" --cc="ccache gcc"
xmake
Note the --ccache=n — disables xmake's built-in cache so the two don't stack.
ccache fork.~/.xmake/cache/ (cross-project shared).xmake g --clean # nuclear: wipe global cache
Shared cache server. First developer to compile uploads objects; everyone else downloads them. Big win for CI + team setups.
xmake service --ccache # foreground
xmake service --ccache -vD # verbose
xmake service --ccache --start # daemonize
xmake service --ccache --stop
xmake service --ccache --restart
First run creates ~/.xmake/service/server.conf and prints a generated token.
~/.xmake/service/server.conf){
remote_cache = {
listen = "0.0.0.0:9692",
workdir = "/Users/ruki/.xmake/service/server/remote_cache"
},
known_hosts = { },
logfile = "/Users/ruki/.xmake/service/server/logs.txt",
tokens = {
"590234653af52e91b9e438ed860f1a2b"
}
}
listen — host:port to bind.workdir — cache storage on the server.tokens — list of allowed client tokens. Generate more with xmake service --gen-token.known_hosts — optional IP allowlist (harden access).~/.xmake/service/client.conf){
remote_cache = {
connect = "cache.internal:9692",
token = "590234653af52e91b9e438ed860f1a2b"
}
}
cd myproject
xmake service --connect --ccache # just the cache service
xmake service --connect --distcc --ccache # combine with distributed compile
xmake # builds as usual, cache hits are transparent
Cache hits show up in output as the normal "cache compiling" line — xmake pulls from the remote server instead of compiling.
xmake service --disconnect --ccache
xmake service --clean --ccache # wipe this project's cache on the server
xmake clean --all # (connected) also cleans remote cache
If the server network is flaky, add timeouts so clients fall back to local compilation instead of hanging:
{
remote_cache = {
connect_timeout = 5000,
send_timeout = 5000,
recv_timeout = 5000,
}
}
Unit: milliseconds. Works on both server and client sides.
xmake -v # verbose: shows `cache compiling` vs normal lines
xmake --rebuild # force full rebuild, bypass cache
xmake -rv # rebuild verbose
In the build log:
cache compiling — served from cache (local or remote).compiling (plain) — cache miss, actually compiled.distcc compiling — delegated to a distcc server (see xmake-distributed-compilation).--ccache=n but cache still active. You disabled the xmake built-in, but if CXX=ccache g++ is in the env, ccache is still interposing. unset CXX CC or point at the raw compiler.connect_timeout / send_timeout / recv_timeout so the client degrades to local on network trouble.~/.xmake/service/, all clients need the new token.xmake service --clean --ccache inside a different project only affects that project.xmake-distributed-compilationxmake-remote-compilationxmake-build-optimizationWhat 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-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./xmake-color-outputUse when emitting colored/styled output from `xmake.lua` or custom tasks/plugins via `cprint` / `cprintf`, or when the user wants to disable colors (`XMAKE_COLORTERM=nocolor`, `--theme=plain`). Covers the `${...}` color tag syntax, all color names, truecolor, emoji, and the disable knobs.Other plugins' skills for the same job