lua-expert

A Lua coding expert for a lightweight programming language often used in games, embedded software, and scripting. It focuses on Lua's tables, coroutines, modules, error handling, and memory behavior.

In plain words
What is it for?
Writing and reviewing Lua scripts, organizing reusable modules, processing text, handling errors, using metatables and coroutines, profiling code, and improving memory use.
Why use it?
It helps write Lua that is easier to understand, less error-prone, and efficient enough for its runtime. It also helps diagnose performance and runtime problems without adding unnecessary complexity.

Agent

Part of the dev plugin — 13 agents shipped together

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/andisab/swe-marketplace/dev-lua-expert
Clone the repo
git clone --depth 1 https://github.com/andisab/swe-marketplace

Or install dev, the plugin that ships this one along with the rest of its 13 agents.

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 530 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.00530
Opus 5 $0.00020 $0.00265
Sonnet 5 $0.00008 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 3d ago against content hash 252297dcce85, 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 3d 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.

plugins/dev/agents/dev-lua-expert.md · 66 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. 3d ago First seen · 66 lines · 40 tokens per session scan A 252297dcce85

Subscribe to this mod's changes

lua-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 15d ago), licensed MIT. It adds 40 tokens to every session and 530 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-08-30.