/xmake-skills:xrepo-clifrom xmake-skills
Installs, inspects, and exports C/C++ packages via xrepo, xmake's standalone package manager. Covers install/search/info/fetch/export/download, repository management, and package virtual environments.
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.
xrepo is xmake's standalone C/C++ package manager. It shares the xmake runtime but is a full package tool on its own — use it outside of any project to install, query, or enter an environment with C/C++ libraries and tools.
xrepomanages global repositories and installed packages.xmake repois a project-local variant. If you want the change to apply everywhere on your machine, usexrepo.
Packages come from the official xmake-repo by default, plus any private repos you register, plus bridges to vcpkg/brew/conan/pacman/apt etc.
xrepo install zlib tbox
xrepo install "zlib 1.2.x" # semver range — QUOTE the spec
xrepo install "zlib >=1.2.0"
xrepo install -m debug zlib # debug build
xrepo install -m release zlib
xrepo install -k shared zlib # dynamic library
xrepo install -k static zlib
xrepo install -p iphoneos -a arm64 zlib
xrepo install -p android -a arm64-v8a --ndk=~/android-ndk-r26 zlib
xrepo install -p mingw --mingw=/opt/llvm-mingw zlib
xrepo install -p cross --sdk=/opt/arm-linux-musleabi-cross zlib
xrepo install -p wasm --toolchain=emcc zlib
Pass recipe options via -f:
xrepo install -f "runtimes='MD'" zlib
xrepo install -f "regex=true,thread=true" boost
xrepo install -f "shared=true,pic=true" openssl
xrepo can install through other package managers and still hand you xmake-style link info:
xrepo install brew::zlib
xrepo install vcpkg::zlib
xrepo install conan::zlib/1.2.11
xrepo install pacman::zlib
xrepo install apt::zlib1g-dev
xrepo install --force zlib # rebuild even if cached
xrepo remove zlib # uninstall
xrepo clean # clean caches
xrepo clean --all
xrepo search zlib "pcr*"
xrepo info zlib
xrepo info shows description, versions, upstream URLs, hashes, supported platforms, and available configs — use it to discover which -f "..." options a package accepts before installing.
The dependency graph of a package, as a tree or as json:
xrepo info --depgraph libpng
xrepo info --depgraph --format=json libpng
xrepo fetch)fetch resolves an installed package and prints the info you would otherwise get through add_packages. Great for dropping xrepo packages into a non-xmake build.
xrepo fetch pcre2 # Lua table (linkdirs/links/defines/includedirs)
xrepo fetch --cflags openssl
xrepo fetch --ldflags openssl
xrepo fetch --cflags --ldflags conan::zlib/1.2.11
xrepo fetch -p iphoneos --cflags "zlib 1.2.x"
Pipe into a Makefile / CMake toolchain:
CFLAGS="$(xrepo fetch --cflags openssl)"
LDFLAGS="$(xrepo fetch --ldflags openssl)"
xrepo download zlib
xrepo download "zlib 2.x"
xrepo download -o /tmp zlib # output directory
Does not build or install — just fetches and extracts the upstream source.
Copy an installed package (headers, libs, cmake files, …) into a standalone directory so you can ship it or hand it to another toolchain:
xrepo export -o /tmp/output zlib
xrepo export -o /tmp/output -p android -a arm64-v8a "zlib 1.2.x"
export and import are a pair: export an installed package on a machine with network
access, import it where there is none.
xrepo export -o /tmp/output zlib
xrepo import -i /tmp/output # install the exported packages here
scan re-registers the packages already present in the install directory, e.g. after you
copied them in by hand or restored a cache:
xrepo scan # all installed packages
xrepo scan zlib
xrepo add-repo myrepo https://github.com/mygroup/myrepo
xrepo add-repo myrepo https://github.com/mygroup/myrepo dev # branch
xrepo rm-repo myrepo
xrepo list-repo
xrepo update-repo # pull the latest recipes
Private, air-gapped setups typically: add-repo an internal mirror, then install everything from there.
xrepo env drops you into a shell (or runs a single command) with selected packages on PATH / LD_LIBRARY_PATH / PKG_CONFIG_PATH. This is a sizable topic on its own — see the xrepo-env skill for ad-hoc, project-local (./xmake.lua), and named environments, plus CI usage and --show debugging.
| Command | Purpose |
|---|---|
xrepo install <pkg> | install a package |
xrepo remove <pkg> | uninstall |
xrepo update <pkg> | update to newer version |
xrepo search <pattern> | search available recipes |
xrepo info <pkg> | show recipe metadata + configs |
xrepo fetch [--cflags/--ldflags] <pkg> | print link/compile info |
xrepo export -o <dir> <pkg> | export installed package |
xrepo download [-o dir] <pkg> | fetch source only |
xrepo add-repo / rm-repo / list-repo / update-repo | global repo management |
xrepo env ... | virtual environments — see xrepo-env skill |
xrepo clean [--all] | clean caches |
-m debug|release — build mode-k static|shared — library kind-p <plat> / -a <arch> — target platform / arch-f "k=v,k=v" — recipe configs (per package)--runtimes=MD|MT|MDd|MTd — MSVC runtime--ndk=, --sdk=, --mingw=, --vs= — toolchain roots--toolchain=<name> — force a specific toolchain-v / -vD — verbose / diagnosisxrepo install zlib 1.2.x parses 1.2.x as a second package name. Always quote: "zlib 1.2.x".xrepo vs xmake repo. xrepo is global; xmake repo is for project-local repos inside an xmake.lua. They are not interchangeable.xrepo update-repo before install.xrepo fetch --cflags prints paths into ~/.xmake/packages/... — fine for local builds, not portable across machines. Use xrepo export to get a self-contained directory.xrepo env) → xrepo-envxmake.lua project → xmake-packagesxmake-repo-testing-p/-a → xmake-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