Lua

Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).

11 stars

Best use case

Lua is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).

Teams using Lua should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/lua/SKILL.md --create-dirs "https://raw.githubusercontent.com/hivellm/rulebook/main/templates/skills/languages/lua/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/lua/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Lua Compares

Feature / AgentLuaStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

<!-- LUA:START -->
# Lua Project Rules

## Agent Automation Commands

**CRITICAL**: Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).

```bash
# Complete quality check sequence:
stylua --check .          # Format check
luacheck .                # Linting
busted                    # All tests (100% pass)

# No standard security audit for Lua
```

## Lua Configuration

**CRITICAL**: Use Lua 5.4 or LuaJIT with linting.

- **Version**: Lua 5.4 or LuaJIT 2.1+
- **Linter**: luacheck
- **Formatter**: StyLua
- **Testing**: busted or luaunit

## Code Quality Standards

### Mandatory Quality Checks

**IMPORTANT**: These commands MUST match your GitHub Actions workflows!

```bash
# Pre-Commit Checklist (MUST match .github/workflows/*.yml)

# 1. Format check (matches workflow)
stylua --check src/ tests/

# 2. Lint (matches workflow)
luacheck src/ tests/ --std luajit --no-unused-args

# 3. Run tests (matches workflow)
busted tests/

# If ANY fails: ❌ DO NOT COMMIT - Fix first!
```

**Why This Matters:**
- Example: Using `stylua` (writes) locally but `stylua --check` in CI = failure

### Testing Example (busted)

```lua
describe("DataProcessor", function()
  local processor
  
  before_each(function()
    processor = require("data_processor").new()
  end)
  
  it("processes valid input", function()
    local result = processor:process({1, 2, 3})
    assert.are.same({2, 4, 6}, result)
  end)
  
  it("handles empty input", function()
    assert.has_no.errors(function()
      processor:process({})
    end)
  end)
end)
```

<!-- LUA:END -->

Related Skills

We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.