# Xmake Packages

> Use when adding third-party C/C++ dependencies to an Xmake project — via `add_requires` / `add_packages`, configuring package options, pinning versions, or using `xrepo` from the command line.

- **Type:** Skill
- **Install:** `agentstack add skill-xmake-io-xmake-skills-xmake-packages`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xmake-io](https://agentstack.voostack.com/s/xmake-io)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [xmake-io](https://github.com/xmake-io)
- **Source:** https://github.com/xmake-io/xmake-skills/tree/master/skills/project-config/xmake-packages

## Install

```sh
agentstack add skill-xmake-io-xmake-skills-xmake-packages
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Xmake Packages

Xmake has a built-in package manager (xrepo) that fetches and builds C/C++ dependencies and wires them into your targets.

## Adding a dependency

```lua
add_requires("fmt 10.2.1", "spdlog")

target("app")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("fmt", "spdlog")
```

`add_requires` declares *what* you need (and optionally a version). `add_packages` attaches the package to a specific target, adding its includes, links, and defines automatically.

## Version selectors

```lua
add_requires("zlib 1.3.x")        -- semver range
add_requires("openssl >=3.0")
add_requires("cmake master")      -- branch
add_requires("boost 1.84.0")
```

## Package options

```lua
add_requires("boost", {configs = {regex = true, system = true, shared = false}})
add_requires("ffmpeg", {configs = {shared = true, gpl = false}})
```

Options map to the package's own configurable features — check the package with `xrepo info `.

## Optional and system packages

```lua
add_requires("mysql", {optional = true})          -- build continues if missing
add_requires("zlib", {system = true})             -- only use the system copy
add_requires("zlib", {system = false})            -- force xrepo to build it
```

## Conditional / platform-specific

```lua
if is_plat("linux") then
    add_requires("libuuid")
end

add_requires("directxtk", {plat = "windows"})
```

## Private repositories

```lua
add_repositories("my-repo https://github.com/me/my-xmake-repo.git")
add_requires("mypkg")
```

## CLI — xrepo

```bash
xrepo search fmt
xrepo info fmt
xrepo install "fmt 10.2.1"
xrepo env -b fmt bash          # shell with fmt on PATH/PKG_CONFIG_PATH
```

## Troubleshooting

- Force a rebuild of a package: `xmake require --force fmt`
- Clear the package cache: `xmake require --clean`
- Show resolved packages: `xmake require --info fmt`

## When to branch out

- Exposing package usage behind an option → `xmake-options`
- Cross-compiled packages → `xmake-toolchains`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [xmake-io](https://github.com/xmake-io)
- **Source:** [xmake-io/xmake-skills](https://github.com/xmake-io/xmake-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-xmake-io-xmake-skills-xmake-packages
- Seller: https://agentstack.voostack.com/s/xmake-io
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
