
roblox-luau-patterns
Use when writing or refactoring Roblox Luau modules, object lifecycles, signals, task scheduling, pcall, and cleanup.
- Installs
- 2.1K
- Last 24h
- +51
- Trending rank
- #3297
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-luau-patterns- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads roblox-luau-patterns automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
Make ownership visible
Signal connections, instances, and tasks need cleanup owners. Disconnect/cancel at teardown. Export typed custom signal payloads (Signal<T...>).
Configure before parenting to hide partial state. Parent earlier only when ancestry is required; explain why. This does not guarantee replication ordering.
Preserve failure semantics
local ok, value = pcall(dataStore.GetAsync, dataStore, key)
if not ok then
return nil, `read failed: {value}`
end
return value, nil -- value may legitimately be nil
Do not collapse "call succeeded and returned nil" into "call failed." Retry only when the domain operation is safe to repeat. Persistence, HTTP, purchases, and remotes belong to their domain skills.
Naming and return contracts
Practitioner conventions: mark yielding functions Async, keep return counts consistent, and prefer named module exports. Respect existing project contracts; details in full.md.
Schedule deliberately
Use task.defer, task.spawn, task.delay, and task.cancel deliberately. Avoid legacy wait() and unjustified polling. Prefer a real state-change signal; otherwise choose and measure an explicit cadence.
Review
Clear owner, narrow public API, no circular require, no accidental concurrent startup, success and missing-data states remain distinct, connections/tasks cleaned up, client input routed to roblox-networking.
Details: references/full.md
FAQ
What does the roblox-luau-patterns skill do?
Use when writing or refactoring Roblox Luau modules, object lifecycles, signals, task scheduling, pcall, and cleanup.
How do I install roblox-luau-patterns?
Run npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-luau-patterns in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/roblox-luau-patterns/ (personal) or .claude/skills/roblox-luau-patterns/ (project).
Which AI agents can use roblox-luau-patterns?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is roblox-luau-patterns safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains roblox-luau-patterns?
It is published by tabooharmony in tabooharmony/roblox-brain. It has 2,128 recorded installs.
More from tabooharmony/roblox-brain
roblox-building
tabooharmony/roblox-brain
Use when building or editing geometry, maps, props, or generated assets with MCP or standalone Luau.
roblox-animation-vfx
tabooharmony/roblox-brain
Use when adding, changing, or fixing Roblox animations, particles, beams, trails, tweens, camera shake, or other visual effects.
roblox-studio-mcp
tabooharmony/roblox-brain
Use when working in Roblox Studio through MCP: editing scripts or scenes, generating assets, playtesting, screenshots, or input.
roblox-lighting
tabooharmony/roblox-brain
Use when setting up or changing Roblox lighting, atmosphere, day/night cycles, or post-processing effects.
roblox-gui
tabooharmony/roblox-brain
Use when building or fixing Roblox menus, HUDs, shops, dialogs, or UI that must work on phones, tablets, desktop and console.
roblox-performance
tabooharmony/roblox-brain
Use when profiling or fixing Roblox performance: low FPS, lag, memory, network load, slow phones, hot paths.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.