roblox-luau-core — Claude Code skill for Luau
A skill for writing and debugging Luau that teaches the agent the language's semantics and catches syntax carried over from JavaScript or Python.
npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -a claude-codeWhat roblox-luau-core does
The skill loads when an agent writes, edits or debugs Luau: tables, control flow, string patterns, scope, closures. It also covers syntax errors, nil indexing, odd loop and table behavior, string formatting, and reviewing Luau code for correctness.
Inside is a quick reference plus a list of translation traps. Only false and nil are falsy in Luau, so 0, an empty string and an empty table all count as true. Equality does not coerce types, which makes 0 == "0" false, and inequality is written ~=. Arrays are 1-based, dictionary iteration order is unspecified, and assigning nil removes a key. Luau string patterns are not regular expressions — worth remembering before porting a regex.
A separate section handles code coming from JavaScript and Python. ===, null, optional chaining, arrow functions and array methods have no Luau equivalent, and neither do None, zero-based lists, exceptions or tuples. The expression x or fallback tests truthiness rather than absence, so it will overwrite a legitimate false. Deeper examples live in references/full.md. The skill is meant to sit alongside roblox-luau-types and roblox-luau-patterns, with engine APIs left to domain skills.
What it helps with
- port a function from JavaScript to Luau without leftover syntax
- trace a nil index through a chain of tables
- check that dictionary iteration does not rely on key order
- debug a syntax error inside a string pattern
- review code for accidental aliases of the same table
Example prompts for the agent
- rewrite this module from JavaScript to Luau and flag what does not translate directly
- check this script for nil gaps in the array and for reliance on dictionary order
- why does this loop behave differently than in Python? walk through the Luau semantics
How to install roblox-luau-core
1Skills CLI (Vercel)
npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -a claude-code2Manually: put the files in place
~/.claude/skills/roblox-luau-core/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/roblox-luau-core/
1Skills CLI (Vercel)
npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -a codex2Manually: put the files in place
.agents/skills/roblox-luau-core/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -a cursor2Manually: put the files in place
.cursor/skills/roblox-luau-core/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install TabooHarmony/roblox-brain roblox-luau-core2Manually: put the files in place
.github/skills/roblox-luau-core/SKILL.md1Skills CLI (Vercel)
npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -a gemini-cli2Platform CLI
gemini skills install https://github.com/TabooHarmony/roblox-brain --path skills/core/roblox-luau-coreManually: put the files in place
.devin/skills/roblox-luau-core/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -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 roblox-luau-core
How do I install roblox-luau-core in Claude?
Run npx skills add TabooHarmony/roblox-brain --skill roblox-luau-core -a claude-code. The skill lands at ~/.claude/skills/roblox-luau-core/SKILL.md.
What does roblox-luau-core do?
It gives the agent a Luau semantics reference and a breakdown of traps when porting code from JavaScript or Python. Useful while writing, editing or debugging scripts.
Which skills should I pair it with?
roblox-luau-types covers types and roblox-luau-patterns covers lifecycle, while engine APIs belong to domain skills. This one handles the core language only.
Source text
SKILL.md · MIT
---
name: roblox-luau-core
description: "Use when writing, editing, or debugging any Luau: tables, control flow, string patterns, scope, closures, and errors ported from JS/Python."
when_to_use: "Also for Luau syntax errors, nil indexing, wrong loop or table behavior, string formatting, and reviewing Luau code for correctness."
last_reviewed: 2026-10-14
sources:
- https://luau.org/syntax
- https://create.roblox.com/docs/luau/control-structures
- https://luau.org/library
- https://raw.githubusercontent.com/Kampfkarren/kampfkarren-luau-guidelines/main/README.md
- https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/reference/engine/libraries/vector.yaml
---
# Luau Core Language
## When to Load
Load for Luau semantics and JS/Python translation. Types: `roblox-luau-types`; lifecycle: `roblox-luau-patterns`; engine APIs: domain skills.
## Quick Reference
- Only `false` and `nil` are falsy. `0`, `""`, and `{}` are truthy.
- Equality does not coerce types. `0 == "0"` is false. Inequality is `~=`.
- Array conventions are 1-based. `#array` is meaningful only for a sequence without nil gaps.
- Assigning `nil` removes a table key; assigning a table copies the reference; `table.clone` is shallow.
- Dictionary iteration order is unspecified. Do not make behavior depend on it.
- Dynamic keys require brackets: `record[field]`. Dot syntax uses a literal identifier.
- Missing arguments become `nil`; extra results and arguments can be discarded.
- Prefer an `if` expression over `condition and a or b` when `a` may be falsy.
- Locals start at their declaration; `repeat` locals reach `until`. Forward-declare mutual recursion.
- Luau string patterns are not regular expressions. Their syntax and capabilities differ.
- Backtick interpolation and `..` are valid. Join many fragments once in hot loops.
- NaN does not equal itself and defeats `<`/`>`; test with `x ~= x`.
- Binary data uses the `buffer` library: fixed size, 0-based offsets, explicit-width reads/writes. Avoid `buffer.readinteger`/`writeinteger` (stubs, not released runtime).
- For Base64, hashing, or compression use `EncodingService` (buffers, not strings; JSON via `HttpService`). Details: see full reference.
```luau
local label = if enabled then "On" else "Off"
local message = `{name}: {score}`
local byId: {[number]: string} = {}
byId[userId] = name
for index, value in values do
print(index, value)
end
```
### Translation traps
- JavaScript `===`, `!==`, `null`, optional chaining, spread, arrow functions, and array methods are not Luau syntax.
- Python `None`, zero-based list assumptions, list comprehensions, exceptions, and implicit tuple behavior do not translate directly.
- `x or fallback` tests truthiness, not only absence. It replaces a valid `false` value.
- `typeof(value)` recognizes Roblox datatypes; `type(value)` reports the underlying Luau type category.
### Review
Valid Luau, no nil gaps, no assumed dictionary order, no accidental aliases, no cross-language syntax, no fallbacks hiding `false` or `nil`.
> Detailed language traps and translation examples: [references/full.md](references/full.md)
© TabooHarmony · MIT · TabooHarmony/roblox-brain