xmake-debug-package-source

xmake-debug-package-source is a skill for Claude Code from xmake-io/xmake-skills. It costs 81 tokens per session (2,459 once invoked), scanned C, original, Apache-2.0.

A workflow for debugging the source code of packages managed by xmake, a C/C++ build and package tool. It lets you test a local source directory so edits are preserved between builds, then create a patch after the fix.

In plain words
What is it for?
Use it when an add_requires or xmake-repo package fails to build or behaves incorrectly, including verbose local testing and remote debugging.
Why use it?
Normal package runs can delete extracted source and lose temporary edits, making investigation slow and repetitive.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xmake-skills plugin — 58 skills shipped together

Good fit Use it when an add_requires or xmake-repo package fails to build or…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xmake-io/xmake-skills/xmake-debug-package-source
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xmake-io/xmake-skills --skill xmake-debug-package-source
Clone the repo
git clone --depth 1 https://github.com/xmake-io/xmake-skills

Made for: Claude Code.

Or install xmake-skills, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xmake-debug-package-source

README.md
[![agentmods](https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-debug-package-source.svg)](https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-debug-package-source)
Your own site
<a href="https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-debug-package-source"><img src="https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-debug-package-source.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,459 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02459
Opus 5 $0.00041 $0.01229
Sonnet 5 $0.00016 $0.00492
Haiku 4.5 $0.00008 $0.00246

Measured 6d ago against content hash 8f22ee7b265e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

xmake-debug-package-source scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ~/.xmake/packages/z/zlib # nuclear

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -LO https://zlib.net/zlib-1.2.11.tar.gz
skills/packages/xmake-debug-package-source/SKILL.md · 260 lines

How it starts

The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debugging Package Source Code

Packages installed via add_requires / xrepo fail for many reasons — upstream bug on your toolchain, outdated patch, missing flag. This skill is about the iteration loop for fixing a broken package recipe or upstream source without losing work between attempts.

Default recipe flow:

add_requires("foo") → fetch tarball → apply patches → on_install → on_test

Each time the recipe runs, xmake blows away the extracted source and re-applies patches. That's fine for stable packages, terrible for debugging — every change you make to the unpacked source is lost on the next run.

1. Fast-path: -d <local-source-dir> with scripts/test.lua

Inside an xmake-repo clone (your own or the official one):

xmake l scripts/test.lua -vD --shallow -d /tmp/zlib-1.2.11 zlib
  • -d <dir> — tells the test script to use your local source directory instead of re-downloading and re-extracting. Your edits persist across runs.
  • --shallow — don't rebuild transitive dependencies (see xmake-repo-testing).
  • -vD — verbose + tracebacks.

Workflow

# 1. Download & unpack once
curl -LO https://zlib.net/zlib-1.2.11.tar.gz
tar xf zlib-1.2.11.tar.gz -C /tmp
cd xmake-repo

# 2. First run — sees what fails
xmake l scripts/test.lua -vD --shallow -d /tmp/zlib-1.2.11 zlib
# ... some configure step blows up ...

# 3. Edit /tmp/zlib-1.2.11/configure to fix it
vim /tmp/zlib-1.2.11/configure

# 4. Re-run — your edit is still there
xmake l scripts/test.lua -vD --shallow -d /tmp/zlib-1.2.11 zlib

# 5. Iterate until it builds + on_test passes

Without -d, step 4 would re-extract the tarball and wipe your edit. This is the difference between "debug in 5 minutes" and "debug in an afternoon".

2. Turning edits into a patch

Once you've fixed the bug locally, generate a patch for the recipe:

cd /tmp/zlib-1.2.11
tar xf ~/Downloads/zlib-1.2.11.tar.gz -C /tmp/zlib-1.2.11.orig --strip-components=1
diff -urN /tmp/zlib-1.2.11.orig /tmp/zlib-1.2.11 > /path/to/xmake-repo/packages/z/zlib/patches/my-fix.patch

Read the full file on GitHub · 260 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 260 lines · 81 tokens per session scan C 8f22ee7b265e

Subscribe to this mod's changes

xmake-debug-package-source is a skill published in the GitHub repository xmake-io/xmake-skills (23 stars, last pushed 14d ago), licensed Apache-2.0. It adds 81 tokens to every session and 2,459 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cpp-pro

Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance…

Jeffallan/claude-skills · 79 tokens

memory-safety-patterns

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

rmyndharis/antigravity-skills · 45 tokens

cpp

Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…

crazyguitar/cppcheatsheet · 0 tokens

cutlass-skill

Write, debug, and optimize CUTLASS, CuTe, and CuTeDSL GPU kernels from local upstream source, examples, and headers. Use when the task explicitly involves CUTLASS/CuTe/CuTeDSL, cute::Layout, cute::Tensor, TiledMMA, TiledCopy, CollectiveBuilder, CollectiveMainloop, CollectiveEpilogue, GemmUniversal, KernelSchedule…

slowlyC/agent-gpu-skills · 137 tokens

cuda-c-optimization

A guide for improving CUDA C programs, which run computations on NVIDIA GPUs. It covers GPU memory access, thread-block sizing, numerical stability, and debugging.

mindspore-ai/akg · 20 tokens

cpp-debugging

Use when a C++ failure involves memory lifetime, undefined behavior, native crashes, or debugger-only state — debug with symbols, sanitizers, and platform-native debuggers before patching symptoms.

drvoss/everything-copilot-cli · 42 tokens