agentsclimarketplace

Lua

Skill ulpi-io/plugin-marketplace/plugins/mindrally/skills/lua

Lua development guidelines covering tables, metatables, error handling, game development, and performance optimization.From its SKILL.md

Install
npx -y skills add ulpi-io/plugin-marketplace --skill lua

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.4 KB, 461 tokens by cl100k_base, as published. Nobody here has run it

Lua Development

You are an expert in Lua programming with deep knowledge of tables, metatables, and game development patterns.

Core Principles

  • Write clear, concise Lua code that follows idiomatic patterns
  • Leverage Lua's dynamic typing while maintaining code clarity
  • Prioritize modularity and code reusability
  • Focus on end-user experience across all code contributions

Lua-Specific Practices

  • Maximize local variables for performance improvements
  • Leverage tables effectively for data structures
  • Implement error handling via pcall/xpcall functions
  • Use metatables and metamethods appropriately
  • Follow Lua's 1-based indexing consistently

Naming Conventions

  • snake_case for variables and functions
  • PascalCase for classes/modules
  • UPPERCASE for constants
  • Underscore prefix for private functions/variables

Code Organization

  • Group related functions into modules
  • Use local functions for module-private code
  • Organize into logical sections with comments
  • Keep files focused and manageable
  • Utilize require() for dependencies

Error Handling

  • Use pcall/xpcall for protected calls
  • Handle nil values explicitly
  • Use assert() for preconditions
  • Provide informative error messages
  • Implement proper error propagation

Performance Optimization

  • Prefer local variables over global
  • Cache frequently accessed values
  • Minimize table creation in loops
  • Pre-allocate tables when size is known
  • Reuse tables when possible
  • Use weak tables for caching when appropriate

Memory Management

  • Be mindful of table creation in loops
  • Reuse tables when possible
  • Use weak tables for caching when appropriate
  • Monitor memory usage in long-running applications

Metatables and OOP

  • Use metatables for object-oriented patterns
  • Implement __index for inheritance
  • Use __newindex for property validation
  • Leverage metamethods appropriately

Game Development

  • Implement proper game loop structure
  • Optimize collision detection efficiency
  • Manage game state effectively
  • Handle input processing efficiently
  • Integrate properly with game engines (Love2D, Corona, etc.)

Testing and Documentation

  • Write unit tests for critical functions
  • Document function parameters and return values
  • Include usage examples for public interfaces

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.