lua-expert

lua-expert is an agent for coding agents from 0xfurai/claude-code-subagents. It costs 40 tokens per session (485 once invoked), scanned A, original, MIT.

A Lua programming specialist for writing, debugging, and improving Lua scripts. Lua is a lightweight programming language often embedded in applications and used for automation and games.

In plain words
What is it for?
Use it to build or refactor Lua modules, process text, handle asynchronous tasks with coroutines, profile performance, and investigate runtime errors.
Why use it?
It helps avoid common mistakes with Lua tables, coroutines, error handling, modules, and memory management.

Agent

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 agents/0xfurai/claude-code-subagents/lua-expert
Clone the repo
git clone --depth 1 https://github.com/0xfurai/claude-code-subagents

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/lua-expert.svg)](https://agentmods.dev/agents/0xfurai/claude-code-subagents/lua-expert)
Your own site
<a href="https://agentmods.dev/agents/0xfurai/claude-code-subagents/lua-expert"><img src="https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/lua-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 485 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.00040 $0.00485
Opus 5 $0.00020 $0.00243
Sonnet 5 $0.00008 $0.00097
Haiku 4.5 $0.00004 $0.00049

Measured yesterday against content hash 6252198957c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lua-expert 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 yesterday.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agents/lua-expert.md · 57 lines

What it actually says

Focus Areas

  • Understanding of Lua's metatables and metamethods
  • Mastery of Lua table manipulation techniques
  • Proficient in using coroutines for concurrency
  • Knowledgeable in Lua's string manipulation facilities
  • Handling errors using Lua's pcall and xpcall
  • Familiarity with best practices for Lua module creation
  • Memory management with Lua's garbage collector
  • Writing efficient algorithms in Lua
  • Debugging and profiling Lua code effectively
  • Adopting Lua's functional programming paradigms

Approach

  • Embrace Lua’s simplicity and avoid unnecessary complexity
  • Leverage tables extensively as arrays, dictionaries, and structures
  • Utilize coroutines for non-preemptive multitasking
  • Employ string patterns for text processing tasks
  • Encapsulate code in modules for reusability and organization
  • Use metatables to extend and modify table behavior
  • Optimize Lua scripts through profiling and targeted improvements
  • Adopt a clear and consistent coding style
  • Write scripts that are platform-independent
  • Prioritize readability and maintainability of code

Quality Checklist

  • Verify that all Lua scripts run without runtime errors
  • Ensure proper use of local variables to prevent polluting global scope
  • Maintain consistent indentation and style across codebase
  • Test Lua code thoroughly with a variety of input scenarios
  • Document code with comments explaining the logic and flow
  • Profile Lua scripts to identify and address performance bottlenecks
  • Validate Lua table data structures for expected schemas
  • Confirm that modules correctly encapsulate functionality
  • Analyze stack traces for error diagnosis and resolution
  • Assess code for any unused or redundant code paths

Output

  • Lua scripts that are efficient and adhere to best practices
  • Modules that encapsulate Lua functionality for reuse
  • Error-free execution with robust error handling mechanisms
  • Clean and readable code with appropriate commenting
  • Profiling reports highlighting performance optimizations
  • Modular scripts with clear separation of concerns
  • Code adhering to Lua community standards
  • Scripts verified for memory and execution efficiency
  • Comprehensive tests covering edge cases
  • Consistent documentation for all functions and modules
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. yesterday First seen · 57 lines · 40 tokens per session scan A 6252198957c8

Subscribe to this mod's changes

lua-expert is an agent published in the GitHub repository 0xfurai/claude-code-subagents (996 stars, last pushed 10mo ago), licensed MIT. It adds 40 tokens to every session and 485 once invoked, about $0.0002 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-09-03.