luau-best-practices — Claude Code skill
A skill for writing, reviewing, and refactoring Roblox Luau code, with guidance on project structure, error handling, cleanup, and server-side checks.
npx skills add dig1t/skills --skill luau-best-practices -a claude-codeWhat luau-best-practices does
This skill gives an agent working rules for Roblox Luau: naming, file layout, Server, Client, Shared, and Packages organization, plus service and controller patterns. It covers when to use pcall around failing external calls and how to keep private state separate from a module’s public API.
The guidance also addresses event cleanup, Maid or Janitor usage, remote-call validation, and server authority. It recommends modern task APIs instead of older scheduling calls. Client-provided values must not define game state; the server checks the input and calculates the result.
What it helps with
- review Roblox Luau for style violations
- structure services and controllers by responsibility
- trace leaks from undisconnected events
- validate remote-call inputs on the server
- replace legacy waiting and scheduling calls
Example prompts for the agent
- Review this Roblox module against Luau best practices and suggest concrete changes.
- Find memory leaks in the project and inspect event cleanup.
- Rewrite this remote handler so the server validates input and computes the result.
How to install luau-best-practices
1Skills CLI (Vercel)
npx skills add dig1t/skills --skill luau-best-practices -a claude-code2Manually: put the files in place
~/.claude/skills/luau-best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/luau-best-practices/
1Skills CLI (Vercel)
npx skills add dig1t/skills --skill luau-best-practices -a codex2Manually: put the files in place
.agents/skills/luau-best-practices/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dig1t/skills --skill luau-best-practices -a cursor2Manually: put the files in place
.cursor/skills/luau-best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dig1t/skills luau-best-practices2Manually: put the files in place
.github/skills/luau-best-practices/SKILL.md1Skills CLI (Vercel)
npx skills add dig1t/skills --skill luau-best-practices -a gemini-cli2Platform CLI
gemini skills install https://github.com/dig1t/skills --path luau-best-practicesManually: put the files in place
.devin/skills/luau-best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dig1t/skills --skill luau-best-practices -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about luau-best-practices
How do I install luau-best-practices in Claude Code?
Run npx skills add dig1t/skills --skill luau-best-practices -a claude-code, then check ~/.claude/skills/luau-best-practices/SKILL.md.
What does luau-best-practices do?
It guides an agent through writing, reviewing, and refactoring Roblox Luau. The scope includes project layout, error handling, connection cleanup, server authority, and input validation.
How does the skill handle client data in Roblox?
It treats client input as untrusted. The server should validate types, ranges, and game rules before calculating or applying the result.