lua-docs

lua-docs is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 168 tokens per session (1,044 once invoked), scanned A, original, MIT.

A reference guide to Lua 5.5, a lightweight scripting language that can be embedded inside other programs. It covers values, tables, functions, control flow, metatables, coroutines, and memory management.

In plain words
What is it for?
Use it to look up Lua syntax, create tables and functions, customize behavior with metatables, use coroutines, manage data, and connect Lua with host programs.
Why use it?
It gives you the language rules needed to write Lua scripts or understand how Lua behaves when built into another application.

Skill for Claude CodeCodex

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/pledgeandgrow/pledge-skills/lua
Any agent
npx skills add pledgeandgrow/pledge-skills --skill lua
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

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-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/lua.svg)](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/lua)
Your own site
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/lua"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/lua.svg" alt="Measured on agentmods" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,044 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.00168 $0.01044
Opus 5 $0.00084 $0.00522
Sonnet 5 $0.00034 $0.00209
Haiku 4.5 $0.00017 $0.00104

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

Security

Grade A, and why

lua-docs 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 4d 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/lua/SKILL.md · 77 lines

How it starts

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

Lua

Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. It is dynamically typed, runs by interpreting bytecode with a register-based virtual machine, and has automatic memory management with generational garbage collection.

Specification: Lua 5.5 Reference Manual


Quick Reference

Topic File
Introduction (what is Lua, design, embedding, extension language) introduction.md
Values & Types (nil, boolean, number, string, function, userdata, thread, table; metatables; metamethods; GC; weak tables) types.md
Syntax (lexical conventions, identifiers, keywords, strings, comments, variables, scoping) syntax.md
Statements & Expressions (blocks, chunks, assignment, control structures, for loops, operators, precedence, table constructors, function definitions, multiple results) expressions.md
Coroutines (create, resume, yield, wrap, states, collaborative multithreading) coroutines.md
Standard Libraries (basic, string, table, math, I/O, OS, UTF-8, debug, modules) standard-libraries.md
Patterns (character classes, pattern items, captures, balanced match, frontier) patterns.md
C API (stack, registry, C closures, error handling, status codes, yields, debug interface, auxiliary library) c-api.md
Standalone Interpreter (CLI options, arg table, environment variables, interactive mode) standalone.md
Migration & Syntax (incompatibilities with 5.4, complete syntax grammar) migration.md

Core Concepts

  • Values and Types: Eight basic types — nil, boolean, number, string, function, userdata, thread, table. All values are first-class.
  • Tables: The sole data-structuring mechanism — arrays, lists, sets, records, graphs, trees. Associative arrays with any key type (except nil and NaN).
  • Metatables & Metamethods: Extensible semantics — operator overloading, indexing control, calls, GC finalizers, tostring, pairs, length.
  • Coroutines: Collaborative multithreading — coroutine.create, resume, yield, wrap, close.
  • Closures: Functions capture upvalues (external local variables) from their lexical scope.
  • Garbage Collection: Incremental and generational modes, GC metamethods (__gc), weak tables (__mode).
  • C API: Stack-based interaction — push/pop values, registry, C closures, error handling, continuation functions.
  • Patterns: Lightweight pattern matching (not full regex) — character classes, captures, balanced match, frontier patterns.
  • Modules: require, package.path, package.cpath, searchers, preload.
  • _ENV: Every chunk compiled in scope of _ENV; global variables are _ENV.var.

Read the full file on GitHub · 77 lines

Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 77 lines · 168 tokens per session scan A 216881e2a3bd

Subscribe to this mod's changes

lua-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 168 tokens to every session and 1,044 once invoked, about $0.0008 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-31.

Related

Other skills, from other repositories

esp32-arch-review

Review ESP32 FastLED firmware architecture for RTOS safety, DMA correctness, LED driver patterns, memory management, and peripheral safety. Use before merging significant driver changes, new platform ports, or when auditing existing ESP32 FastLED code.

FastLED/FastLED · 53 tokens

esp32-log-triage

Parse and classify ESP32 serial log output to identify FastLED-related errors, RMT/I2S/SPI driver faults, timing violations, RTOS issues, and crash signatures. Use when debugging unexpected device behavior, boot failures, or LED output problems on ESP32.

FastLED/FastLED · 61 tokens

embedded-debug

Firmware crash analysis, stack trace decoder, and register dump interpreter for ESP32/ARM/AVR platforms. Use when debugging device crashes, panics, guru meditation errors, hard faults, or analyzing core dumps.

FastLED/FastLED · 46 tokens

ci-fix

Scan all CI builds and tests, find failures, fetch error logs, and fix the code. Prioritizes unit tests, example tests, then uno, attiny85, esp32s3, esp32c6, teensy41. Use when CI is red and you need to diagnose and repair build/test failures.

FastLED/FastLED · 0 tokens

memory-audit

Audit embedded code for stack overflow risks, heap fragmentation, static allocation patterns, and memory leaks. Use when investigating OOM crashes, optimizing memory usage, or reviewing memory-critical code on constrained devices.

FastLED/FastLED · 43 tokens

timing-analysis

Analyze real-time constraints, ISR latency, DMA transfer times, and LED protocol timing for embedded systems. Use when debugging timing-sensitive code, optimizing frame rates, or verifying protocol compliance.

FastLED/FastLED · 40 tokens