roblox-luau-patterns
Installation
SKILL.md
Luau Patterns
When to Load
Load for module shapes, resource ownership, scheduling, and failure contracts. See roblox-luau-core for semantics, roblox-luau-types for types, roblox-architecture for startup.
Quick Reference
Choose a shape
- Plain functions: default for stateless transformation or validation.
- Module with private state: one explicit subsystem owner. Do not create a manager class merely to namespace functions.
- Object with metatable: multiple independent values need shared behavior and lifecycle.
- Existing library abstraction: follow it when the project already uses it consistently. Do not add Promise, signal, cleanup, or framework dependencies for one call site.
Constructors use ., instance methods use :, and mutable fields belong on the instance, not the class table.