# Roblox Luau Core

> >

- **Type:** Skill
- **Install:** `agentstack add skill-tabooharmony-roblox-brain-roblox-luau-core`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [TabooHarmony](https://agentstack.voostack.com/s/tabooharmony)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [TabooHarmony](https://github.com/TabooHarmony)
- **Source:** https://github.com/TabooHarmony/roblox-brain/tree/main/skills/roblox-luau-core

## Install

```sh
agentstack add skill-tabooharmony-roblox-brain-roblox-luau-core
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Luau Core Language

## When to Load

Load when the task involves: Luau syntax/variables/operators, table operations, string patterns, math helpers, scope/closures, common idioms, porting from JS/Python, or sharp edges (1-based indexing, nil semantics, truthiness).

**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`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [TabooHarmony](https://github.com/TabooHarmony)
- **Source:** [TabooHarmony/roblox-brain](https://github.com/TabooHarmony/roblox-brain)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-tabooharmony-roblox-brain-roblox-luau-core
- Seller: https://agentstack.voostack.com/s/tabooharmony
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
