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.
npx skills add xmake-io/xmake-skills --skill xmake-debug-package-sourcegit clone --depth 1 https://github.com/xmake-io/xmake-skillsWrote 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.
[](https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-debug-package-source)<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>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.
| Model | Per session | Once 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 |
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 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 (seexmake-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
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.
- 6d ago First seen · 260 lines · 81 tokens per session scan C 8f22ee7b265e
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.
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…
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.
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…
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…
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.
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.