be-lua

Develop and test backend Lua scripts for OpenResty, Redis EVAL, and Lua 5.4.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/MassimilianoPili/agent-framework --skill be-lua
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: be-lua
Source: https://github.com/MassimilianoPili/agent-framework/tree/main/.claude/agents/be-lua
Command: npx skills add https://github.com/MassimilianoPili/agent-framework --skill be-lua

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the development and testing of backend logic written in Lua, ensuring code quality and adherence to best practices for various Lua runtimes.

Core Features & Use Cases

  • Lua Scripting: Develop scripts for OpenResty/Nginx, Redis EVAL, or standalone Lua applications.
  • Code Quality: Enforces Lua coding standards, module patterns, and error handling.
  • Testing & Linting: Integrates with busted for testing and luacheck for linting.
  • Use Case: Implement a new API endpoint in OpenResty by writing Lua handlers and ensuring they are non-blocking and properly tested.

Quick Start

Use the be-lua skill to implement a new rate-limiting script for Redis.

Frequently Asked Questions about be-lua

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write and test Lua backend scripts for OpenResty?

To write and test Lua backend scripts for OpenResty, you must enforce non-blocking I/O and use busted for unit testing. This approach ensures your Nginx handlers are idiomatic and properly validated.

What is the best way to ensure code quality in Redis EVAL scripts?

The best way to ensure code quality in Redis EVAL scripts is integrating luacheck for static analysis and busted for testing. This combination enforces idiomatic Lua conventions and validates module patterns.

Can I use busted and luacheck for standalone Lua 5.4 applications?

Yes, you can use busted and luacheck for standalone Lua 5.4 applications. They enforce idiomatic Lua conventions and module patterns while verifying error handling via pcall during your backend development.

How do I handle errors in Lua backend code using pcall?

To handle errors in Lua backend code using pcall, encapsulate risky function calls within pcall blocks. This prevents non-blocking I/O operations in OpenResty from crashing and ensures safe execution.

Does OpenResty require non-blocking I/O for Lua handlers?

Yes, OpenResty requires non-blocking I/O for Lua handlers to maintain server concurrency. Enforcing this pattern during API endpoint development prevents request bottlenecks and ensures proper Nginx performance.

Why does my Lua module pattern fail static analysis with luacheck?

Your Lua module pattern fails static analysis with luacheck if it violates idiomatic conventions. Enforcing proper module structures and correcting syntax ensures your backend scripts pass linting and execute reliably.