lua_package_authoring

lua_package_authoring is a skill for Claude Code, Codex from espressif/esp-claw. It costs 38 tokens per session (1,186 once invoked), scanned A, original, Apache-2.0.

A workflow for writing Lua scripts that are bundled inside a device skill or launcher app. Lua is a scripting language, and these scripts can only use capabilities already built into the device.

In plain words
What is it for?
Use it to add or update package-local scripts, check their documented imports and arguments, and verify cleanup and expected output.
Why use it?
It keeps script authoring within the owning package's scope and exposes missing firmware or hardware capabilities instead of pretending they exist.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add or update package-local scripts, check their documented imports and arguments, and verify cleanup and expected output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/espressif/esp-claw/lua_package_authoring
About the project

ESP-Claw is an AI agent framework that runs on Espressif IoT chips and lets people define device behavior through conversation. It handles local sensing, decision-making, and execution for connected devices, with support for event-driven actions, structured memory, and MCP communication.

espressif/esp-claw · 2,260 stars · on GitHub · esp-claw.com

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 espressif/esp-claw --skill lua_package_authoring
Clone the repo
git clone --depth 1 https://github.com/espressif/esp-claw

Made for: Claude Code, Codex.

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 lua_package_authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/espressif/esp-claw/lua_package_authoring/github.svg)](https://agentmods.dev/skills/espressif/esp-claw/lua_package_authoring)
Your own site
<a href="https://agentmods.dev/skills/espressif/esp-claw/lua_package_authoring"><img src="https://agentmods.dev/badge/skills/espressif/esp-claw/lua_package_authoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lua_package_authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/espressif/esp-claw/lua_package_authoring"><img src="https://agentmods.dev/badge/skills/espressif/esp-claw/lua_package_authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,186 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00038 $0.01186
Opus 5.5 $0.00015 $0.00474
Sonnet 5.5 $0.00008 $0.00237
Haiku 4.5 $0.00004 $0.00119

Measured today against content hash f7559930208e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lua_package_authoring 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 today.

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.

components/common/lua_module_builder/skills/lua_package_authoring/SKILL.md · 87 lines

How it starts

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

Lua Package Authoring

Use this skill when skill_creator or app_creator needs new or updated bundled Lua scripts. The owning creator controls the package directory, manifest or Skill definition, update scope, removal, and publication. This skill must not call publish_skill, remove_skill, publish_app, or remove_app.

Lua can only compose modules and capabilities already compiled into the device. If the requested behavior needs a missing driver, native capability, Kconfig option, or firmware component, return that limitation to the owning creator instead of fabricating an API.

Authoring Flow

  1. Use the package kind, id, and absolute target directory resolved by the owning creator.
  2. Activate builtin_lua_modules and read the documentation for every module the implementation will import.
  3. Read a nearby bundled test only when it provides a relevant API or resource-lifecycle example.
  4. Write the smallest complete set of scripts. A package may own one or more scripts; do not force unrelated actions into one file.
  5. Read the completed files back and verify imports, documented APIs, arguments, package-local paths, cleanup, and expected output.
  6. Return control to the owning creator for package verification and publication.

Do not infer undocumented functions from module names or test code from a different module.

Package Paths

For a runtime Skill:

  • Store scripts under <SKILLS_ROOT>/<skill_id>/scripts/.
  • Reference them from SKILL.md with {CUR_SKILL_DIR}/scripts/<file>.lua.
  • Do not reference files owned by an App or another Skill.
  • Document synchronous or asynchronous tool execution as described below.

For a launcher App:

  • Store scripts under <APPS_ROOT>/<app_id>/scripts/.
  • Keep the launcher.json entry package-relative, such as scripts/main.lua.
  • The runtime prepends the running script directory to package.path, so package-local Lua modules beside the entry script can be loaded with require("module_name").
  • Derive asset paths from the running script path, for example with debug.getinfo(1, "S").source, and then resolve the App directory. Do not hard-code /system, /fatfs, or an SD mount point.
  • Do not reference files owned by a Skill or another App.

Read the full file on GitHub · 87 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. today First seen · 87 lines · 38 tokens per session scan A f7559930208e

Subscribe to this mod's changes

lua_package_authoring is a skill published in the GitHub repository espressif/esp-claw (2,260 stars, last pushed yesterday), licensed Apache-2.0. It adds 38 tokens to every session and 1,186 once invoked, about $0.0002 per session on Opus 5.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-10-20.

Related

Other skills, from other repositories