xmake-script-modules

xmake-script-modules is a skill for Claude Code, Codex from xmake-io/xmake-skills. It costs 116 tokens per session (2,362 once invoked), scanned A, original, Apache-2.0.

A reference guide to the built-in modules available while writing xmake Lua scripts. Lua is the scripting language used by xmake for build logic and custom tasks.

In plain words
What is it for?
Writing `xmake.lua` logic that lists, copies, moves, or removes files; runs commands; reads and writes text; handles paths and environment variables; and reports errors.
Why use it?
It helps you find the right built-in function for files, processes, paths, text, environment variables, errors, and output without importing it manually.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/xmake-io/xmake-skills/xmake-script-modules
Any agent
npx skills add xmake-io/xmake-skills --skill xmake-script-modules
Clone the repo
git clone --depth 1 https://github.com/xmake-io/xmake-skills

Made for: Claude Code, Codex.

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-script-modules

README.md
[![agentmods](https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-script-modules.svg)](https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-script-modules)
Your own site
<a href="https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-script-modules"><img src="https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-script-modules.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00116 $0.02362
Opus 5 $0.00058 $0.01181
Sonnet 5 $0.00023 $0.00472
Haiku 4.5 $0.00012 $0.00236

Measured 5d ago against content hash 933d10894c49, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xmake-script-modules scanned grade A with 0 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/scripting/xmake-script-modules/SKILL.md · 275 lines

How it starts

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

Built-in Script-Module Reference

Inside the script domain (on_load, on_build, after_build, on_run, on_test, task/rule/plugin bodies, imported .lua modules) xmake provides a set of pre-imported modules. No import(...) needed for any of these — they are injected into the sandbox.

For how to write modules and use import() itself, see xmake-scripting.

os — filesystem, process, env

Filesystem

os.exists("path")          -- true if file or dir exists
os.isfile("path")
os.isdir("path")
os.mkdir("a/b/c")          -- recursive
os.rmdir("a")
os.rm("file-or-glob")
os.cp("src", "dst")        -- file or dir; glob patterns supported
os.mv("src", "dst")
os.ls("dir")               -- returns list of basenames
os.files("src/**/*.cpp")   -- glob list of files
os.dirs("src/**")          -- glob list of dirs
os.filedirs("src/**")      -- glob files + dirs
os.emptydir("build")       -- delete all contents

Globs: * one level, ** recursive, ? single char. (...) in the pattern preserves directory structure during copy.

Process

os.exec("cmd arg1 arg2")           -- raises on non-zero exit, streams output
os.execv(program, {args})          -- list form — no shell parsing (prefer this)
os.run("cmd")                      -- silent unless it fails
os.runv(program, {args})
os.vrun("cmd")                     -- silent; print only in -v mode
os.vrunv(program, {args})
os.iorun("cmd")                    -- returns stdout
os.iorunv(program, {args})         -- returns stdout, stderr

*v (list) forms are safer — they bypass shell quoting entirely. Prefer them whenever arguments come from variables.

Environment / info

os.getenv("PATH")
os.setenv("FOO", "bar")            -- scope: current xmake process only
os.host()                          -- "macosx" | "linux" | "windows" | ...
os.arch()                          -- "x86_64" | "arm64" | ...
os.subhost()                       -- detailed host info
os.tmpdir()                        -- scratch dir
os.curdir()                        -- cwd
os.cd("path")                      -- change cwd
os.mtime("file")                   -- modification time
os.time()                          -- current unix time
os.date("%Y-%m-%d")
os.nuldev()                        -- /dev/null or NUL
os.argv()                          -- raw CLI args

Read the full file on GitHub · 275 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. 5d ago First seen · 275 lines · 116 tokens per session scan A 933d10894c49

Subscribe to this mod's changes

xmake-script-modules is a skill published in the GitHub repository xmake-io/xmake-skills (23 stars, last pushed 12d ago), licensed Apache-2.0. It adds 116 tokens to every session and 2,362 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. 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

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

platform-detection

Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…

dotnet/skills · 146 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

rust-pro

Master modern Rust (2024 edition) with async patterns, advanced type system features, and production-ready systems programming. Expert in the current Rust ecosystem including Tokio, axum, and modern crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.

vudovn/ag-kit · 58 tokens

omh-rust

This is a Hermes-native rust workflow skill.

rlaope/oh-my-hermes · 69 tokens