lua

Generate Lua executables, modules, and libraries following repository conventions.

9|3|Updated Jun 29, 2012
One-click install
npx skills add https://github.com/whilp/dotfiles --skill lua-whilp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lua
Source: https://github.com/whilp/dotfiles/tree/main/.claude/skills/lua
Command: npx skills add https://github.com/whilp/dotfiles --skill lua-whilp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides coding standards and templates for Lua, enabling consistent module design, executable wrappers, and library code across projects.

Core Features & Use Cases

  • Templates: executable.lua, main.lua, module.lua, and test.lua templates for rapid scaffolding.
  • Patterns: consistent module structure, file organization, and parameter handling.
  • Documentation: guidance on using cosmo tooling and path handling.

Quick Start

Copy templates from .claude/skills/lua/templates/ to create a new Lua module and customize it with your function.

Frequently Asked Questions about lua

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

FAQPage Schema
How do I structure Lua code for executables and modules?

Lua code structure follows repository conventions: executables in .local/bin use shebangs and module path setup, application modules go in src/*/main.lua, and libraries in src/*/*.lua. Templates for executable.lua, main.lua, module.lua, and test.lua provide scaffolding that handles command dispatch, argument parsing, error handling, and test exports to ensure consistency across projects.

What templates are available for Lua projects?

Four core templates are provided: executable.lua for command-line tools with dispatch patterns, main.lua for application entry points, module.lua for reusable library code, and test.lua for testing support. Each template includes conventions for module paths, shebang usage, and documentation-driven patterns ready to customize with your functions.

How do I set up module paths and exports in Lua?

Module path setup and test exports are handled through repository conventions templates. Libraries return export tables enabling testing, while executables and main.lua modules configure paths for dependency loading. The templates include environment setup and conditional execution logic to support both direct execution and testing workflows.

Can I use these templates for testing Lua code?

Yes. Modules structured with the provided templates return export tables enabling test support. The test.lua template integrates with the module structure to facilitate testing, and conditional execution patterns allow code to run in both test and production contexts with appropriate error handling.

What does cosmo tooling do in Lua projects?

Cosmo is referenced in documentation guidance for template processing and code generation within Lua projects. The Skill provides guidance on using cosmo alongside path handling and repository conventions to generate consistent code structure across modules and executables.