Roblox Luau Lint
ASecurityUse on any Roblox project kept on disk (Rojo, *.project.json) when a script does nothing, errors only on the server or only on clients, after writing, pasting or AI-generating Luau, before publishing, or as a CI check. Lints without opening Studio - scripts that never run because of their folder or file suffix, client-only APIs on the server and server-only APIs on clients (LocalPlayer, RenderStepped, UserInputService, DataStoreService, ServerStorage, FireServer/OnServerEvent mix-ups), while-...
- 3 stars
- 0 votes
- 0 copies
- 2 views
- Added November 29, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add flxnsee/gamedev-toolkit --skill roblox-luau-lint --agent claude-codeAre you the author of Roblox Luau Lint?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/flxnsee-roblox-luau-lint)---
name: roblox-luau-lint
description: Use on any Roblox project kept on disk (Rojo, *.project.json) when a script does nothing, errors only on the server or only on clients, after writing, pasting or AI-generating Luau, before publishing, or as a CI check. Lints without opening Studio - scripts that never run because of their folder or file suffix, client-only APIs on the server and server-only APIs on clients (LocalPlayer, RenderStepped, UserInputService, DataStoreService, ServerStorage, FireServer/OnServerEvent mix-ups), while-true loops that never yield, deprecated APIs (wait/spawn/delay, FindPartOnRay, Region3 queries, body movers, Humanoid:LoadAnimation), remotes fired with the player as an argument, InvokeClient from the server, data store calls outside pcall, require(assetId) backdoors and getfenv/loadstring.
license: MIT
compatibility: Python 3.10+, standard library only. Roblox Studio is not required; the code must be on disk (Rojo, or exported from Studio).
metadata:
author: gamedev-toolkit
version: "0.1.0"
---
# Roblox Luau lint
Roblox decides where code runs from two things: the script's class and where it sits in the
game tree. Most "my script does nothing" and "works in Studio, breaks in game" bugs are one of
those two being wrong, or client and server code mixed up. [scripts/luau_lint.py](scripts/luau_lint.py)
checks both without opening Studio.
## Run
`${CLAUDE_SKILL_DIR}` is this skill's folder, where its scripts are. Run the commands from the
project folder as shown, without searching for the script. If the variable was not filled
in, use the base directory shown when the skill loaded.
```bash
python "${CLAUDE_SKILL_DIR}/scripts/luau_lint.py" path/to/rojo-project # human-readable
python "${CLAUDE_SKILL_DIR}/scripts/luau_lint.py" . --json # for parsing
python "${CLAUDE_SKILL_DIR}/scripts/luau_lint.py" . --include-packages # also lint Wally Packages/
```
Exit code `0` = no errors, `1` = errors, `2` = no `.luau`/`.lua` files. The linter reads
`default.project.json` (or another `*.project.json`) to learn where each file ends up, and
Rojo's file names to learn what it becomes: `*.server.luau` is a `Script`, `*.client.luau`
a `LocalScript`, anything else a `ModuleScript`. Without a project file it can't check
placement. Each finding names the file and line and says what to use instead.
## Fixing findings
1. **Misplaced scripts**: server logic goes in ServerScriptService (`*.server.luau`), client
logic in StarterPlayerScripts (`*.client.luau`), shared code in ReplicatedStorage as a
ModuleScript required from both sides.
2. **Client/server mix-ups**: split the code. The client calls `remote:FireServer(args)`; the
server handles `remote.OnServerEvent:Connect(function(player, args)` and **checks the
arguments first**: type, range, cooldown, and whether that player may do it. Never trust
values a client sends.
3. **Data stores**: wrap every call in `pcall` and handle failure. Retry with backoff, and
**don't save over a player's data after a failed load**: mark the session so it doesn't save.
4. **`require(assetId)`**: ask the user where it came from before touching it. Removing it
can break the game if it's a real dependency; if it's unknown, it's probably a backdoor.
## Limits
- It checks text patterns, not types. A remote or data store reached through a variable with
an unusual name, or code built at runtime, can slip through.
- `RunContext` set only in Studio isn't visible on disk; set it in a `.meta.json`.
## Reference
- [references/studio-only.md](references/studio-only.md): linting code that lives only in
Studio, through a Roblox Studio MCP server. Read it when there's no project on disk.
Files in this skill
- SKILL.md
- scripts/luau_lint.py
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.