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-typescript-to-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-typescript-to-lua)<a href="https://agentmods.dev/skills/xonovex/platform/writing-typescript-to-lua"><img src="https://agentmods.dev/badge/skills/xonovex/platform/writing-typescript-to-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-typescript-to-lua"><img src="https://agentmods.dev/badge/skills/xonovex/platform/writing-typescript-to-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.00086 | $0.00840 |
| Opus 5.5 | $0.00034 | $0.00336 |
| Sonnet 5.5 | $0.00017 | $0.00168 |
| Haiku 4.5 | $0.00009 | $0.00084 |
Grade A, and why
writing-typescript-to-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.
TypeScript-to-Lua Coding Guidelines
The output is Lua. For Lua runtime semantics and idioms: module pattern, coroutines, metatables, error handling, string building. Apply writing-lua, which also covers hot-path tuning of the generated code. This skill covers only the TS→Lua transpiler boundary: what translates, how to shape TS source for clean Lua, and TSTL-specific features.
Requirements
- TSTL ≥ 1.24; TS strict mode; Lua ≥ 5.3 / LuaJIT 2.1.
Essentials
- Code organization - Favor namespaces/functions over classes for clean Lua output; Lua module idioms in writing-lua, see references/namespaces-vs-classes.md
- TSTL features - Use LuaMultiReturn, decorators when beneficial, see references/multi-return-functions.md, references/tstl-decorators.md
- Performance - Keep tables stable, cache lookups, design for Lua GC and coroutines; the JIT "why" is in writing-lua, see references/performance-tips.md, references/coroutine-patterns.md
- Optimization - Avoid heavy TypeScript features, see references/avoiding-heavy-features.md
Gotchas
- Not all TypeScript features translate: generators,
for-await-of, dynamicimport(), and BigInt are unsupported or partially supported - Translation is source-to-source; runtime semantics follow Lua, not JS:
0and""are truthy in Lua, falsy in JS - Lua's table indexing (1-based, no
lengthfor holes) replaces JS arrays: pass-through types abstract this but iteration order changes - Importing JS-only libraries silently fails at translation, only
@typespackages with Lua-runtime equivalents work tstlcis the CLI; build configs are different fromtsc: sharing atsconfig.jsonwith web projects requires carefulcompilerOptionssplit
Progressive disclosure
- Read references/namespaces-vs-classes.md - Load when choosing code organization, namespaces, or enums for clean Lua output
- Read references/multi-return-functions.md - Load when implementing Lua-style multiple return values
- Read references/coroutine-patterns.md - Load when implementing cooperative multitasking
- Read references/lua-interop.md - Load when calling Lua code from TypeScript
- Read references/tstl-decorators.md - Load when using TSTL-specific decorators
- Read references/performance-tips.md - Load when optimizing for Lua GC/JIT or generated code is slow or bloated
- Read references/type-safety.md - Load when maintaining types across TS/Lua boundary
- Read references/avoiding-heavy-features.md - Load when transpiled output is unexpectedly large
- Read references/tsconfig.md - Load when configuring TSTL compiler options
What ships with it
13 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 3.1 KB
- eval-trigger.json 5.8 KB
- moon.yml 119 B
- references/avoiding-heavy-features.md 586 B
- references/coroutine-patterns.md 674 B
- references/lua-interop.md 587 B
- references/multi-return-functions.md 899 B
- references/namespaces-vs-classes.md 672 B
- references/performance-tips.md 1.3 KB
- references/tsconfig.md 670 B
- references/tstl-decorators.md 845 B
- references/type-safety.md 691 B
- sources.json 1.0 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 · 86 tokens per session scan A eee1b157f4d2
writing-typescript-to-lua is a skill published in the GitHub repository xonovex/platform (6 stars, last pushed yesterday), licensed MIT. It adds 86 tokens to every session and 840 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-typescript-to-lua compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| writing-typescript-to-luaxonovex/platform | Skill | 6 | yesterday | MIT | A | 86 | Claude Code |
| onejs-setup-and-overviewSingtaa/OneJS | Skill | 364 | 3d ago | MIT | A | 211 | Claude Code, Codex |
| wallet-cliBofAI/skills | Skill | 168 | 4d ago | MIT | A | 92 | Codex |
| create-custom-widgetmendixlabs/mxcli | Skill | 145 | yesterday | Apache-2.0 | A | 50 | Claude Code |
| agent-inspectrajudandigam/agent-inspect | Skill | 213 | 4d ago | MIT | A | 52 | Claude Code, Codex |
| adding-a-commandcaliber-ai-org/ai-setup | Skill | 1.3k | 2mo ago | MIT | A | 76 | Claude Code, Codex |
| authoring-typescriptNVIDIA/elements | Skill | 122 | yesterday | Apache-2.0 | A | 104 | Claude Code, Codex |