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 xonovex/platform --skill writing-luagit clone --depth 1 https://github.com/xonovex/platformWrote 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/xonovex/platform/writing-lua)<a href="https://agentmods.dev/skills/xonovex/platform/writing-lua"><img src="https://agentmods.dev/badge/skills/xonovex/platform/writing-lua/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.
<a href="https://agentmods.dev/skills/xonovex/platform/writing-lua"><img src="https://agentmods.dev/badge/skills/xonovex/platform/writing-lua.svg" alt="Reviewed on agentmods" width="80" 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.00079 | $0.00666 |
| Opus 5.5 | $0.00032 | $0.00266 |
| Sonnet 5.5 | $0.00016 | $0.00133 |
| Haiku 4.5 | $0.00008 | $0.00067 |
Grade A, and why
writing-lua 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lua Coding Guidelines
Write Lua modules with local state, explicit error handling, and clear interfaces.
Requirements
- Lua ≥ 5.4, or LuaJIT 2.1 for the hot-path tunings.
Essentials
- Module pattern - Always
local, one module per file returning table, see references/module-pattern.md, references/local-variables.md - Code organization - Prefer table-based modules and simple functions, see references/module-pattern.md, references/metatables.md
- Cooperative tasks - Use coroutines for async patterns, see references/coroutines.md
- Validation - Validate inputs, see references/input-validation.md
- Hot paths - Plain numeric loops and lookups cached in locals, only where profiling shows the need, see references/hot-paths.md
- Paradigm - Functional style → applying-fp; class/OO design (metatable-based) → applying-oop
Gotchas
- Arrays are 1-indexed; a
nilhole breaks the#length operator (it stops at the first nil) - Tables are both array and hash; mixing them is fine but iteration order isn't guaranteed for the hash part
/always returns a float; use//for integer floor division:total // per_page, notmath.floor(total / per_page)- Variables are global by default unless declared
local: forgettinglocalin a loop counter leaks into the surrounding scope - Hot-path tuning beyond what profiling shows (manual unrolling, FFI arrays, SIMD-style tricks) adds code and no speed
Progressive disclosure
- Read references/module-pattern.md - Load when creating reusable modules or organizing code structure
- Read references/local-variables.md - Load when encountering global variable issues or scoping problems
- Read references/metatables.md - Load when implementing object-oriented patterns or operator overloading
- Read references/coroutines.md - Load when implementing cooperative multitasking or async patterns
- Read references/input-validation.md - Load when adding type checks or parameter validation
- Read references/idiomatic-patterns.md - Load when learning common Lua idioms or patterns
- Read references/hot-paths.md - Load when a profile shows a hot loop or a LuaJIT trace to tune
What ships with it
11 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.
- eval-output.json 5.7 KB
- eval-trigger.json 8.5 KB
- moon.yml 86 B
- references/coroutines.md 666 B
- references/hot-paths.md 825 B
- references/idiomatic-patterns.md 634 B
- references/input-validation.md 446 B
- references/local-variables.md 389 B
- references/metatables.md 502 B
- references/module-pattern.md 344 B
- sources.json 1.8 KB
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.
- 9d ago First seen · 40 lines · 79 tokens per session scan A c14b8f7e2b3f
writing-lua is a skill published in the GitHub repository xonovex/platform (6 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 666 once invoked, about $0.0003 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-11-21.
writing-lua compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| writing-luaxonovex/platform | Skill | 6 | yesterday | MIT | A | 79 | Claude Code |
| static-rustdinglebear-ai/soma | Skill | 1 | 6d ago | AGPL-3.0 | A | 28 | Claude Code, Codex |
| local-python-toolsdinglebear-ai/soma | Skill | 1 | 6d ago | AGPL-3.0 | A | 21 | Claude Code, Codex |
| windows-automationnavig-run/core | Skill | 5 | 1mo ago | none | A | 20 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |