Skip to content
Back to skills

Luau Best Practices

ASecurity

Apply when reading or editing Roblox Luau for typed APIs, module boundaries, instance lifecycles, error handling, and maintainable data-oriented code.

  • 2 stars
  • 0 votes
  • 1 copy
  • 4 views
  • Added September 19, 2026
ai-agentsrustapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add HungryKelvin123/dstack --skill luau-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Luau Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Luau Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hungrykelvin123-luau-best-practices/badge)](https://www.skillsdirectory.com/skills/hungrykelvin123-luau-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: luau-best-practices
description: "Apply when reading or editing Roblox Luau for typed APIs, module boundaries, instance lifecycles, error handling, and maintainable data-oriented code."
---

# Luau engineering

- Use `--!strict` when it matches the repository. Preserve its established typing level.
- Model domain state with exported types, tagged variants, constrained tables, and narrow function contracts. Avoid `any` unless an external boundary forces it and narrow immediately.
- Keep modules cohesive. Separate authoritative services, shared definitions, client controllers, and pure domain logic. Avoid circular requires and hidden singleton state.
- Validate external values at remotes, DataStores, attributes, configuration, and deserialization boundaries. Internal functions may trust already-validated types.
- Make lifecycle ownership visible. Disconnect signals, cancel tasks, destroy temporary Instances, and clear player or character state at the owning boundary.
- Prefer tables and data-driven dispatch when they remove repeated conditionals. Do not build a framework for one call site.
- Avoid yielding inside locks, event handlers, or state mutations unless the contract accounts for reentry and stale state.
- Keep comments for non-obvious reasons and invariants. Let names and types explain mechanics.
- Match repository formatting and naming. Use Roblox APIs and existing utilities before adding substitutes.

Verification follows the repository. `rojo build` checks mapping and serialization, not type correctness or runtime behavior.

Files in this skill

  • SKILL.md1.5 KB
  • agents/openai.yaml226 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.