/xmake-skills:xmake-repo-testingfrom xmake-skills
Tests package recipes in xmake-repo locally using xmake's test.lua script with --shallow, platform/arch/mode/kind/configs flags for quick verification before PR submission.
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-repo is the official package recipe repository. Each recipe is a packages/<a>/<name>/xmake.lua describing how to fetch, build, and install a library. The repo ships a test script at scripts/test.lua that drives a full install + test build of a recipe exactly like CI does.
Always run it from the xmake-repo checkout root.
xmake l scripts/test.lua -vD --shallow <package>
xmake l — run a Lua script in the xmake environment.-v — verbose (show each sub-command).-D — diagnosis (full tracebacks on failure; essential when debugging a broken recipe).--shallow — only install the package you asked for, not its dependencies. Dependencies are pulled from the remote binary cache instead of rebuilt locally. This is the single most important flag for iterating quickly.<package> — the package name, e.g. fmt, zlib, boost.Example — test the fmt recipe:
cd xmake-repo
xmake l scripts/test.lua -vD --shallow fmt
Append the version to the package name, same syntax as add_requires:
xmake l scripts/test.lua -vD --shallow "fmt 10.2.1"
xmake l scripts/test.lua -vD --shallow "cmake master"
Quote it — the space matters.
xmake l scripts/test.lua -vD --shallow -k shared fmt
xmake l scripts/test.lua -vD --shallow -k static fmt
xmake l scripts/test.lua -vD --shallow -m debug fmt
xmake l scripts/test.lua -vD --shallow -m release fmt
xmake l scripts/test.lua -vD --shallow -p linux -a x86_64 fmt
xmake l scripts/test.lua -vD --shallow -p macosx -a arm64 fmt
xmake l scripts/test.lua -vD --shallow -p mingw -a x86_64 --mingw=/opt/llvm-mingw fmt
xmake l scripts/test.lua -vD --shallow -p android -a arm64-v8a --ndk=~/android-ndk-r26 fmt
xmake l scripts/test.lua -vD --shallow -p iphoneos -a arm64 fmt
xmake l scripts/test.lua -vD --shallow -p wasm --toolchain=emcc fmt
Recipes declare options via add_configs(...). Pass them with -f:
xmake l scripts/test.lua -vD --shallow -f "shared=true,pic=true" openssl
xmake l scripts/test.lua -vD --shallow -f "header_only=false" fmt
xmake l scripts/test.lua -vD --shallow -f "regex=true,system=true" boost
xmake l scripts/test.lua -vD --shallow --runtimes=MD fmt
xmake l scripts/test.lua -vD --shallow --runtimes=MT fmt
xmake l scripts/test.lua -vD --shallow --vs=2022 --vs_toolset=14.38 fmt
Verify URL, hash, and unpack work without actually compiling:
xmake l scripts/test.lua -vD --shallow --fetch fmt
xmake l scripts/test.lua -vD --shallow --precompiled fmt
Point at a local source tree to iterate on patches without re-downloading:
xmake l scripts/test.lua -vD --shallow -d /path/to/fmt-source fmt
packages/<a>/<name>/xmake.lua.xmake f -c with your flags.--shallow, deps come from the remote cache).on_test(...) block against the installed package.A successful run ends with passed!. A failure prints the command that failed — rerun it with -vD if you didn't already.
xmake l scripts/list.lua <pkg> — see recipe metadata.packages/<a>/<pkg>/xmake.lua.xmake l scripts/test.lua -vD --shallow <pkg> — test.add_configs, on_install, on_test until green.For a brand-new package, scaffold it first:
xmake l scripts/new.lua <pkg>
| Flag | Purpose |
|---|---|
-v / -D | verbose / diagnosis |
--shallow | only install the target package, not its deps |
-k static|shared | library kind |
-m debug|release | build mode |
-p <plat> / -a <arch> | target platform / architecture |
-f "k=v,k=v" | package configs (recipe options) |
--runtimes=MD|MT|MDd|MTd | MSVC runtime |
--vs=, --vs_toolset=, --vs_sdkver= | VS version pinning |
--ndk=, --ndk_sdkver= | Android NDK |
--sdk=, --mingw= | cross-toolchain roots |
--toolchain=<name> | force a toolchain |
--fetch | fetch/unpack only, no build |
--precompiled | install from binary cache |
--remote | run test on the remote server |
-d <dir> | use a local source directory (debug patches) |
--shallow. Without it, the script rebuilds every transitive dependency from source — turning a 10-second iteration into 30 minutes.xmake-repo checkout root so scripts/test.lua and packages/ resolve correctly.xmake require --force <pkg> or delete ~/.xmake/packages/<a>/<pkg>/<version>/<hash> between runs if a recipe change does not seem to take effect.fmt 10.2.1 must be one quoted argument, otherwise the shell splits it and 10.2.1 is parsed as a separate flag.xmake-packagesxmake-toolchainsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xmake-repo, package-recipe, testing, build-test, local-testing, recipe-testing
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