Agent skill

Luamake

by actboy168 in actboy168/luamake

Luamake 构建系统指南——用于当前项目的 luamake / make.lua / Ninja 生成流程。当用户需要编写、修改、排查或理解 make.lua、目标定义、lm:conf、deps / objdeps、代码生成、Lua C 模块、Bee 运行时集成,或需要解决当前项目中由 luamake 驱动的构建问题时,使用此 skill。即使用户没有明确提到…

MITAuto-check passed

Install Luamake

skills CLI
$ npx skills add actboy168/luamake --skill luamake -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install actboy168/luamake luamake --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/actboy168/luamake.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills .claude/skills/luamake && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
luamake
GitHub stars
210
Token cost
~2k tokens
SKILL.md length
464 words
Files
10 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Luamake 构建系统指南——用于当前项目的 luamake / make.lua / Ninja 生成流程。当用户需要编写、修改、排查或理解 make.lua、目标定义、lm:conf、deps / objdeps、代码生成、Lua C 模块、Bee 运行时集成,或需要解决当前项目中由 luamake 驱动的构建问题时,使用此 skill。即使用户没有明确提到…

  • SKILL.md covers 快速开始, 目标类型, 目标属性 and 配置 (lm:conf), plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Luamake is an agent skill from actboy168/luamake. Luamake 构建系统指南——用于当前项目的 luamake / make.lua / Ninja 生成流程。当用户需要编写、修改、排查或理解 make.lua、目标定义、lm:conf、deps / objdeps、代码生成、Lua C 模块、Bee 运行时集成,或需要解决当前项目中由 luamake 驱动的构建问题时,使用此 skill。即使用户没有明确提到 luamake,但上下文明显是在处理本项目的构建脚本、构建目录、目标依赖或 luamake 生成的 Ninja 流程,也应使用此 skill。不要把它用于纯通用的 C/C++ 编译知识、与本项目无关的 CMake / xmake / Bazel / Meson 问题,或仅讨论编译器理论而未涉及 luamake / make.lua 的请求。

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `references/advanced/bee_runtime.md`, `references/advanced/lua_embed.md` and `references/best_practices/bp_codegen.md`).

It works with C++ and Lua. The licence is MIT.

Example prompts

  • “/luamake”

What it can do on your machine

Read from SKILL.md and the folder at commit f999945. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are lua and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Luamake loads about 2k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 96 tokens; SKILL.md has 464 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from actboy168/luamake at commit f999945, republished under its MIT licence (© actboy168). 464 words, ~2,004 tokens.

Download SKILL.mdSave it as .claude/skills/luamake/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
luamake
description
Luamake 构建系统指南——用于当前项目的 `luamake` / `make.lua` / Ninja 生成流程。当用户需要编写、修改、排查或理解 `make.lua`、目标定义、`lm:conf`、`deps` / `objdeps`、代码生成、Lua C 模块、Bee 运行时集成,或需要解决当前项目中由 `luamake` 驱动的构建问题时,使用此 skill。即使用户没有明确提到 `luamake`,但上下文明显是在处理本项目的构建脚本、构建目录、目标依赖或 `luamake` 生成的 Ninja 流程,也应使用此 skill。不要把它用于纯通用的 C/C++ 编译知识、与本项目无关的 CMake / xmake / Bazel / Meson 问题,或仅讨论编译器理论而未涉及 `luamake` / `make.lua` 的请求。

Luamake Build System

基于 Lua 的构建系统,生成 Ninja 构建文件。

快速开始

lua
local lm = require "luamake"

lm:exe "myapp" {
    sources = { "src/*.c", "!src/test.c" },
    includes = "include",
    defines = { "DEBUG", "VERSION=1.0" },
}
bash
luamake          # 构建
luamake clean    # 清理
luamake rebuild  # 重建

目标类型

API说明输出
lm:exe可执行文件app.exe / app
lm:dll动态库lib.dll / lib.so / lib.dylib
lm:lib静态库lib.lib / lib.a
lm:source_set源码集(不链接,用于复用,通过 deps 引用)无
lm:lua_srcLua C 模块(静态嵌入到 lm:lua_exe)无
lm:lua_dllLua C 模块(动态加载)module.dll / module.so
lm:lua_exe内嵌 Lua 的可执行文件app.exe / app
lm:lua_embedLua 嵌入资源(按命名组嵌入 Lua 文件,生成 source_set;自动导出 includes/objdeps)无(source_set)
lm:phony伪目标(聚合依赖)无

目标属性

源文件
属性说明示例
sources源文件"src/*.cpp", { "a.cpp", "b.cpp" }
includes包含目录"include", { "include", "3rd" }
sysincludes系统包含目录(抑制警告)"/usr/local/include"
defines预处理器定义{ "DEBUG", "VER=1" }
objdeps对象依赖(编译前必须生成)"generated_header"

objdeps 用法:当源文件依赖代码生成产物(如生成的头文件)时,需用 objdeps 声明依赖的目标名,确保生成步骤在编译前完成。deps 只控制链接顺序,不能保证编译前生成文件。

lua
lm:rule "gen_header" { ... }  -- 生成头文件的规则
lm:exe "app" {
    sources = "src/*.cpp",
    objdeps = "gen_header",  -- 编译 src/*.cpp 前先执行 gen_header
}

注意:lm:lua_embed 目标会自动导出 includes 和 objdeps,通过 deps 依赖它的目标无需手动声明这两项。详见下方 lm:lua_embed 用法。

链接
属性说明示例
links链接库{ "pthread", "ws2_32" }
linkdirs库搜索目录"lib", { "lib", "/usr/lib" }
ldflags链接器标志"-Wl,--as-needed"
frameworksmacOS/iOS 框架{ "Foundation", "Cocoa" }
deps目标依赖"lib1", { "lib1", "lib2" }
编译
属性说明示例
flags编译器标志{ "-Wall", "-O2" }
cflagsC 编译器标志"-std=c11"
cxxflagsC++ 编译器标志"-std=c++20"
confs引用命名配置"myconfig"

注意:cflags/cxxflags 直接传递给编译器命令行。在 lm:conf 中可用 c = "c11" / cxx = "c++20" 作为简写,luamake 会自动转换为对应编译器的标准标志(如 MSVC 的 /std:c11)。

特殊目标用法

lm:source_set — 将源文件组织为可复用的源码集,通过 deps 引用,不单独链接:

lua
-- 定义共享源码集
lm:source_set "common" {
    includes = "include",
    sources = { "src/common/*.cpp" },
}

-- 多个目标复用同一组源文件
lm:exe "app1" { deps = "common", sources = "src/app1.cpp" }
lm:exe "app2" { deps = "common", sources = "src/app2.cpp" }

lm:lua_src — 将 Lua C 模块静态嵌入到 lm:lua_exe 中:

lua
lm:lua_src "mymodule" {
    sources = "src/mymodule.c",
}

lm:lua_exe "app" {
    deps = "mymodule",
    sources = "src/main.cpp",
}

lm:lua_embed — 将 Lua 文件按命名组嵌入到 C 源码中,生成一个 source_set 供其他目标依赖。data 下每个 key 是一个组,组名直接成为生成的 lua_embed_bundle 结构体的字段名。每组可独立设置 bytecode = true。bee_glue = true 启用 bee 胶水层,约定 data.preload 注入 _PRELOAD、data.main[1] 作为入口。自动向依赖方导出 includes 和 objdeps,通过 deps 依赖时无需手动声明。完整规则(分组语义、pattern 语法、字节码取舍、bee_glue 契约、无胶水时的接入姿势)见 references/advanced/lua_embed.md:

lua
lm:lua_embed "myembed" {
    bee_glue = true,
    data = {
        main    = { bytecode = true, "src/main.lua" },
        preload = { bytecode = true, { dir = "lualib" } },
        data    = { { name = "config.json", file = "assets/config.json" } },
    },
}

lm:lua_src "glue" {
    deps     = "myembed",       -- 自动获取 includes 和 objdeps
    includes = "3rd/bee.lua",
    sources  = "src/glue.cpp",
}

lm:lua_exe "app" { deps = { "glue", "myembed" }, sources = "src/main.cpp", }


**`lm:phony`** — 聚合多个目标为一个命名依赖,方便统一引用:

```lua
lm:phony "all_libs" {
    deps = { "libfoo", "libbar", "libqux" },
}

lm:exe "app" {
    deps = "all_libs",
    sources = "main.cpp",
}

配置 (lm:conf)

lm:conf 有两种用法,行为完全不同,不要混淆:

匿名配置:lm:conf { ... } — 立即生效,影响全局

不带名称调用时,属性立即应用到当前工作区的所有后续目标,相当于设置全局默认值。

lua
-- 所有参数均为可选,按项目实际需要填写
lm:conf {
    c = "c11",        -- C 标准:"c89", "c99", "c11", "c17"
    cxx = "c++20",    -- C++ 标准:"c++11", "c++14", "c++17", "c++20"
    visibility = "hidden",  -- 符号可见性:"hidden"(默认隐藏)或 "default"(默认可见)
}

-- 以下目标自动继承上面的配置
lm:exe "app1" { sources = "src/app1.cpp" }
lm:exe "app2" { sources = "src/app2.cpp" }

适用场景:项目中大部分目标共享相同的编译标准、模式等基础配置时使用。

命名配置:lm:conf "name" { ... } — 按需引用,不自动生效

带名称调用时,属性不会立即生效,仅存储起来,需要目标通过 confs 属性显式引用。

lua
-- 定义命名配置(不会自动应用到任何目标)
lm:conf "mylib" {
    defines = "MYLIB_API",
    includes = "3rd/mylib",
}

-- 通过 confs 引用,只有这个目标会使用该配置
lm:exe "app" {
    confs = "mylib",
    sources = "main.cpp",
}

适用场景:多个目标需要共享同一组特定配置(如第三方库的头文件路径和宏定义),但不希望污染全局时使用。

如何选择
场景用法
设置项目范围的 C/C++ 标准、构建模式等lm:conf { ... }
为特定的几个目标共享一组 includes/defineslm:conf "name" { ... } + confs = "name"
只有一个目标需要特定配置直接写在目标属性里,无需 conf

内置变量

路径变量
变量说明示例
$builddir构建目录(默认 build,可自定义)build
$bindir二进制输出目录build/bin
$objdir对象文件目录build/obj
$bin$bindir 别名
$obj$objdir 别名
$in输入文件 (规则中)
$out输出文件 (规则中)

自定义构建目录:当项目已使用 build 目录时,可在脚本开头修改构建目录:

lua
lm.builddir = "_build"   -- 构建产物将输出到 _build/ 目录

$bindir 和 $objdir 默认基于 $builddir,修改后会自动跟随变化。

Show full SKILL.md (171 more words)Show less
全局变量
变量说明示例值
lm.os目标 OS"windows", "linux", "macos", "ios", "android"
lm.compiler编译器"msvc", "gcc", "clang"
lm.arch架构"x86_64", "x86", "arm64"
lm.mode构建模式"debug", "release"
lm.workdir工作目录项目根目录

开发工作流

编写或修改 make.lua 构建脚本后,必须运行构建命令验证脚本的正确性:

bash
# 1. 运行构建,验证脚本是否有语法错误或配置问题
luamake

# 2. 如果构建失败,根据错误信息修复脚本后重新运行
luamake

# 3. 如果需要从干净状态重建(排除增量构建的干扰)
luamake rebuild
注意事项
  • Windows 平台:必须使用 PowerShell 运行 luamake 命令,不要使用 Git Bash。
  • 每次修改 make.lua 后都要运行 luamake 确认构建成功,不要只写脚本不验证。
  • 关注构建输出中的警告和错误信息,它们通常指向配置问题(如路径错误、缺少依赖等)。
  • 如果构建失败,优先分析错误信息,修复后再次运行验证,直到构建通过。

最佳实践

主题文档包含内容
依赖管理references/best_practices/bp_dependency.mddeps 定义顺序、源码集复用、增量源码集、动态模块发现
条件编译与静态分析references/best_practices/bp_compilation.md条件编译、静态分析集成
代码生成与 objdepsreferences/best_practices/bp_codegen.md代码生成管道、objdeps 用法
Lua 模块与测试references/best_practices/bp_lua_and_test.mdLua C 模块、内置测试框架
其他详细文档
主题文档
Bee 运行时库(API 参考来源、模块列表、Meta 文件用法)references/advanced/bee_runtime.md
lm:lua_embed 权威参考(分组 / pattern / bytecode / bee_glue / 自定义接入)references/advanced/lua_embed.md

Bee 运行时库

luamake lua script.lua 运行脚本时预加载 bee 库。API 参考来源及模块列表详见 references/advanced/bee_runtime.md。

适用边界

优先在以下场景使用本 skill:

  • 当前仓库明确使用 luamake 或通过 make.lua 定义构建目标。
  • 用户正在修改 make.lua、排查 luamake 报错,或理解 deps、objdeps、lm:conf、目标类型、构建目录等机制。
  • 用户讨论的问题与当前项目的 Ninja 生成流程、Bee 集成或 Lua C 模块构建直接相关。

以下场景通常不应使用本 skill:

  • 与当前项目无关的通用 C/C++ 编译、链接、优化理论问题。
  • 纯 CMake、xmake、Bazel、Meson 等其他构建系统的问题。
  • 只是在问编译器语法、语言标准或平台 API,而没有落到 luamake / make.lua 的构建脚本上。

故障排除

问题解决方案
"no source files found"检查 glob 模式,确认 rootdir,检查文件扩展名
Windows 链接错误添加系统库:links = { "ws2_32", "iphlpapi", "user32" }
交叉编译问题使用平台特定配置,检查 lm.compiler
缺少生成文件添加 objdeps 确保生成后再编译
build 目录冲突项目已使用 build 目录时,用 lm.builddir = "_build" 修改构建目录
找不到头文件检查 includes 路径,使用绝对路径或 $builddir
Ninja 构建失败删除 build/ 目录重新构建

© actboy168, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills of actboy168/luamake.

  • SKILL.md
  • references/advanced/bee_runtime.md
  • references/advanced/lua_embed.md
  • references/best_practices/bp_codegen.md
  • references/best_practices/bp_compilation.md
  • references/best_practices/bp_dependency.md
  • references/best_practices/bp_lua_and_test.md
  • references/core/advanced_api.md
  • references/core/path_management.md
  • references/core/platform_config.md

Open the folder on GitHubat commit f999945

Compare with similar skills

Luamake next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Luamake compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Luamake this skillactboy168/luamake210—~2kAutomated safety check: PassMIT
Add Lua Binding Simplecataclysmbn/Cataclysm-BN1.3k—~846Automated safety check: PassCustom licence
Cpp Compiler FlagsSerial-Studio/Serial-Studio7.2k—~2.1kAutomated safety check: PassCustom licence
Ss Cpp ModernSerial-Studio/Serial-Studio7.2k—~1.6kAutomated safety check: PassCustom licence
Bee Luaactboy168/bee.lua194—~613Automated safety check: PassMIT
Add Lua Binding Complexcataclysmbn/Cataclysm-BN1.3k—~2.2kAutomated safety check: PassCustom licence

Similar skills

  • Add Lua Binding Simple

    cataclysmbn/Cataclysm-BN

    Add simple Cataclysm-BN Lua bindings for stringid types, enums, and basic read-only C++ types.

    1.3k GitHub stars~846 tokensUpdated today
    Auto-check passed
  • Cpp Compiler Flags

    Serial-Studio/Serial-Studio

    C++ compiler/linker flag guidance for Serial Studio's build (GCC, Clang, AppleClang, MSVC cl.exe, clang-cl, MinGW, IntelLLVM).

    7.2k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Ss Cpp Modern

    Serial-Studio/Serial-Studio

    Modern C++20 authoring guidance for Serial Studio (Qt 6.11, C++20): concepts, ranges, move/RAII, std smart pointers, constexpr, lock-free SPSC atomics.

    7.2k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Bee Lua

    actboy168/bee.lua

    bee.lua 运行时库指南——Lua 5.4/5.5 上的跨平台系统级绑定(异步 I/O、网络、子进程、线程、文件系统、文件监控、崩溃 dump)。当需要在本项目里编写、修改或排查使用 require "bee." 的 Lua 代码,涉及 socket/select/epoll/async、thread/channel/serialization、subprocess、filesystem/f…

    194 GitHub stars~613 tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Add Lua Binding Complex

    cataclysmbn/Cataclysm-BN

    Add comprehensive Cataclysm-BN Lua bindings for complex C++ classes with methods, inheritance, constructors, properties, operators, and ownership rules.

    1.3k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Elodin DB

    elodin-sys/elodin

    Work with Elodin-DB, the time-series telemetry database. An agent skill from elodin-sys/elodin.

    547 GitHub stars~2.8k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed

Works with

Questions about Luamake

What does Luamake do?

Luamake 构建系统指南——用于当前项目的 luamake / make.lua / Ninja 生成流程。当用户需要编写、修改、排查或理解 make.lua、目标定义、lm:conf、deps / objdeps、代码生成、Lua C 模块、Bee 运行时集成,或需要解决当前项目中由 luamake 驱动的构建问题时,使用此 skill。即使用户没有明确提到…. Luamake is an agent skill from actboy168/luamake.

How do I install Luamake in Claude Code?

Run `npx skills add actboy168/luamake --skill luamake -a claude-code`. Or copy the skill folder (skills in actboy168/luamake) into .claude/skills/luamake in your project. Claude Code loads it when a task matches its description.

How do I install Luamake in Codex?

Run `npx skills add actboy168/luamake --skill luamake -a codex`. Or copy the skill folder (skills in actboy168/luamake) into .agents/skills/luamake in your project. Codex loads it when a task matches its description.

Can I use Luamake in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add actboy168/luamake --skill luamake -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/luamake, .gemini/skills/luamake, .github/skills/luamake and .opencode/skills/luamake in your project.

What does Luamake need to run?

SKILL.md names no scripts, command-line tools or credentials: Luamake is instructions for the agent only.

Does Luamake access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Luamake safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Luamake use?

Luamake is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Luamake use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Luamake?

Skills that share tags, products or a category with Luamake: Add Lua Binding Simple (cataclysmbn/Cataclysm-BN, 1.3k stars), Cpp Compiler Flags (Serial-Studio/Serial-Studio, 7.2k stars), Ss Cpp Modern (Serial-Studio/Serial-Studio, 7.2k stars) and Bee Lua (actboy168/bee.lua, 194 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Luamake?

actboy168 (a GitHub user) maintains it in actboy168/luamake, which has 210 GitHub stars. The repository was last updated on September 4, 2026.

Source: actboy168/luamake on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.