agentleFS
CodePhobiiaCodePhobiia/claude-roblox-game-studio/.claude/skills/luau-lint/SKILL.md

luau-lint

Skill9 starsChanged 7 months agoMITView on GitHub

Static analysis of Luau code. Checks for type annotation coverage, deprecated API usage, naming convention compliance, and common anti-patterns. Uses `selene` if available or manual grep patterns.

The file

Files
SKILL.md

/luau-lint — Luau Static Analysis

Steps

1. Check if selene is installed

selene --version 2>/dev/null

If selene IS available:

selene src/

Parse the output and present findings grouped by severity.

If selene is NOT available:

Fall back to manual grep-based checks.

Manual Lint Checks (grep-based fallback)

Deprecated API Usage (CRITICAL)

# Find wait() usage (not task.wait)
grep -rn "[^.]wait(" src/ --include="*.lua" --include="*.luau" | grep -v "task.wait\|:Wait"

# Find spawn() usage (not task.spawn)
grep -rn "[^.]spawn(" src/ --include="*.lua" --include="*.luau" | grep -v "task.spawn"

# Find delay() usage
grep -rn "[^.]delay(" src/ --include="*.lua" --include="*.luau" | grep -v "task.delay"

Print Statements (should be logged, not printed)

grep -rn "print(" src/ --include="*.lua" --include="*.luau" | grep -v "^[^:]*:--"

Missing Type Annotations (basic heuristic)

# Look for `function ModuleName.xyz(` without type annotations
grep -rn "function [A-Za-z]*\.[a-z][a-zA-Z]*(" src/ --include="*.lua" --include="*.luau"

Manually check if these have : ReturnType annotations.

Missing pcall on DataStore/HttpService

grep -rn "DataStoreService\|HttpService\|MarketplaceService" src/ --include="*.lua" --include="*.luau" -A 3 | grep -B 1 "Async\|Post\|Get"

Manually check surrounding code for pcall wrapping.

Hardcoded Magic Numbers in Gameplay Code

grep -rn "[^a-zA-Z_][0-9]\{2,\}" src/ --include="*.lua" --include="*.luau" | grep -v "UDim2\|Vector3\|Color3\|Enum\|^[^:]*:--"

Manual review for magic numbers that should be in config.

Naming Conventions

# PascalCase modules (files)
find src/ -name "*.lua" -o -name "*.luau" | grep -v "/[A-Z][a-zA-Z]*\.lua"

# Check for `function myFunc` (should be `function MyFunc` if public or `local function myFunc` if private)
grep -rn "^function [a-z]" src/ --include="*.lua" --include="*.luau"

Output Format

# Luau Lint Report

## Summary
- Files scanned: X
- Errors: X
- Warnings: X
- Info: X

## Errors (must fix)
### Deprecated API Usage
- `src/ServerScriptService/Foo.lua:42` — `wait(1)` should be `task.wait(1)`
- ...

### Missing pcall
- `src/ServerStorage/PlayerData.lua:18` — DataStore:SetAsync() without pcall

## Warnings
### Print Statements
- `src/ServerScriptService/Combat.lua:95` — `print("hit")` (remove or route to logger)

### Magic Numbers
- `src/ServerScriptService/Combat.lua:102` — `damage = 50` (should be configurable)

## Info
### Naming Suggestions
- ...

Present the report to the user. Offer to delegate fixes to lead-programmer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.