lua-guidelines
Skill3 starsChanged 8 days agoMITView on GitHub
Apply Lua policy as a conditional overlay when writing or reviewing Lua code, including WezTerm, Hammerspoon, Rime, and Neovim Lua files: style, module boundaries, luac validation, and selene linting. Configuration that contains no Lua code, such as Rime schema or dictionary YAML, does not need it.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- stevencarpenter/agentstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- stevencarpenter/agents★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- analyze-projectSkill
- api-contract-strategySkill
- architecture-patternsSkill
- close-changeSkill
- design-changeSkill
- development-standardsSkill
- docker-multiarch-buildSkill
- error-patternsSkill
- go-guidelinesSkill
- herdr-implementSkill
- implement-changeSkill
- logging-standardsSkill
- organize-docsSkill
- output-stylesSkill
- plan-changeSkill
- powershell-guidelinesSkill
- python-guidelinesSkill
- review-changeSkill
- review-designSkill
- review-implementationSkill
- review-planSkill
- routeros-scripting-guidelinesSkill
- runtime-diagnosisSkill
- security-guardrailsSkill
- shell-guidelinesSkill
- skill-authoringSkill
- skill-minerSkill
- skills-routingSkill
- smart-commitSkill
- sops-age-guardrailsSkill
- sync-truthSkill
- testing-strategySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Use local for variables and functions, and keep state in local variables.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lua Guidelines
Apply these standards to .lua files, including those in configuration ecosystems such as WezTerm, Hammerspoon, Rime and Neovim tooling. Language selection reads references/language-selection.md in skills-routing; ad hoc tool selection and search/refactor workflow read references/tool-selection.md there.
Progressive Disclosure
- Installing the checkers, or choosing a checker for a host runtime:
references/toolchain.md - Writing
pcall/xpcallor(value, err)code:references/error-handling.md
Rules
- Use
localfor variables and functions, and keep state inlocalvariables. Return a module table instead of writing to_G. - Structure modules as
local M = {}...return M. - Scope
pcallto a declared-optional import with an explicit fallback, such aspcall(require, "mod"). - Format with
styluawhen available, with itssyntaxset to the target Lua version; formatting is not runtime validation. - Validate with a checker that matches the declared target runtime, and state which version ran:
lua-language-server --checkwhen available,luac -p path/to/file.luaorlua -e 'assert(loadfile("path/to/file.lua"))'when that Lua matches the target. - Claim compatibility only for hosts whose Lua version you ran. A pass from workstation Lua against a LuaJIT or older host does not show that the host accepts the file.
- Lint with
selenewhen available, configured per repository with the target Lua version. - For generic error-handling patterns, see
error-patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

