agentleFS
szlayszlay/roblox-base/.claude/skills/roblox-luau-core/SKILL.md

roblox-luau-core

Skill1 starsChanged 4 months agoMITView on GitHub

Use for Luau syntax, tables, control flow, string patterns, math, scope, closures, idioms, or porting code from JavaScript or Python.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Truthiness: Only nil and false are falsy.

    line 26
  2. Very specific:

    Strings: Prefer backticks ` {name} age {age} over ...

    line 30
  3. Very specific:

    Tables: Only compound type. Reference semantics (= aliases).

    line 32
  4. Very specific:

    No arrow functions, ===, !=, spread, const/let

    line 43
  5. Very specific:

    Use task.wait/spawn/delay, never deprecated wait/spawn/delay

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Luau Core Language

When to Load

Load for Luau syntax questions: variables, operators, tables, string patterns, math helpers, scope/closures, common idioms, porting from JS/Python, and sharp edges (1-based indexing, nil semantics, truthiness). For type annotations, use roblox-luau-types. For OOP/async/modules, use roblox-luau-patterns.

Hand off to: roblox-luau-types (type annotations/generics), roblox-luau-patterns (OOP/async/modules), roblox-* domain skills (engine APIs).

Full reference: references/full.md

Quick Reference

Basics: Luau = Lua 5.1 + extensions. Always local. No hoisting — callees above callers. Forward-declare for mutual recursion.

Extensions over Lua 5.1: continue, += -= *=, // floor division, math.clamp/sign/round, backtick interpolation, generalized iteration, table.freeze/clone/clear.

Truthiness: Only nil and false are falsy. 0, "", {} are truthy. No type coercion in == (0 == "0" → false).

Arrays: 1-based. #tbl length — unreliable with nil gaps, keep contiguous. Use table.insert/remove/find/sort/concat. Iterate: for k, v in tbl do.

Strings: Prefer backticks `{name} age {age}` over ... Patterns (NOT regex): %a %d %w %s classes, * + - ? quantifiers, ^$ anchors. Functions: string.match/gmatch/gsub/split.

Tables: Only compound type. Reference semantics (= aliases). table.clone is shallow. nil removes keys. Dynamic keys need bracket notation t[key].

Ternary: (cond and val or fallback) breaks if val is falsy. Use if cond then a else b for safety.

Error handling: pcall(fn) / xpcall(fn, handler). No try/catch.

Pitfalls:

  • a and b or c fails when b is nil/false
  • Arrays start at 1, not 0
  • : defines implicit self, . doesn't
  • While-loop closures share variable — capture in local
  • No arrow functions, ===, !=, spread, const/let
  • Reserved keywords can't be identifiers (return, continue, etc.)
  • Use task.wait/spawn/delay, never deprecated wait/spawn/delay

JS→Luau: map/filter → manual loops, null → nil, x ?? y → x or y, x?.y → x and x.y, === → ==, !== → ~=, import → require, class → metatable+__index, try/catch → pcall.

For detailed examples, see references/full.md.

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.