
roblox-luau-types
Use when adding or fixing Luau type annotations: generics, unions, narrowing, strict mode, sealed tables, module type exports, typed metatables.
- Installs
- 2K
- Last 24h
- +49
- Trending rank
- #3392
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-luau-types- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads roblox-luau-types automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Luau Type System
When to Load
Load for Luau annotations, inference, narrowing, strictness, exports, and solver features. Syntax: roblox-luau-core; lifecycle/scheduling: roblox-luau-patterns.
Quick Reference
Strictness: --!strict for maintained code, --!nonstrict while transitioning, --!nocheck only for legacy or generated code. Directives and project settings select the mode; never assume one global default.
New solver gate: keyof, rawkeyof, setmetatable<T, M>, type functions, and read members need the new type solver. On by default for nocheck/nonstrict projects; strict projects need Workspace.UseNewLuauTypeSolver = Enabled (Scripting). Errors here usually mean wrong solver, not wrong syntax.
Inference philosophy: Infer first; annotate boundaries (params, returns, exports). Don't annotate every local.
Sealed vs unsealed tables: An unannotated local table stays open to new fields until annotated, returned from a function, or its scope exits; annotation seals it. Build tables fully before annotating; passing a table to a typed function does not seal it.
Unions: local id: string | number is a union; prefer tagged unions (type State<T> = {kind:"loading"} | {kind:"ready", value:T}) and discriminate on kind to narrow.
Narrowing: typeof, IsA, assertions, and tagged discriminants refine types; examples in full.md.
Missing keys: use { [K]: V? } when lookups may miss; narrow before use.
Closed vocabularies: prefer literal unions; never checks can flag missing branches. Keep requires statically resolvable. Practitioner guidance: full.md.
Generics: Use when input→output type matters: function first<T>(list: {T}): T?, or type Result<T> = {success: boolean, value: T?}. Never replace with any.
Type exports: export type Foo = {...} at module boundaries; consumers use Types.Foo.
Object typing: typeof(setmetatable({} :: CounterData, Counter)) types precise self; the new solver adds setmetatable<T, M> directly.
Casts (::): For narrowing overly generic inference, never for hiding errors.
Trust boundaries: Annotations contract with the compiler, not runtime data. Remotes, DataStores, HttpService, and attributes still need checks; inside a trusted boundary, let types carry the load.
Review: no hidden any, premature sealing, unchecked casts, or solver-blind rewrites.
Full reference: see
references/full.md
FAQ
What does the roblox-luau-types skill do?
Use when adding or fixing Luau type annotations: generics, unions, narrowing, strict mode, sealed tables, module type exports, typed metatables.
How do I install roblox-luau-types?
Run npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-luau-types in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/roblox-luau-types/ (personal) or .claude/skills/roblox-luau-types/ (project).
Which AI agents can use roblox-luau-types?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is roblox-luau-types safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains roblox-luau-types?
It is published by tabooharmony in tabooharmony/roblox-brain. It has 2,012 recorded installs.
More from tabooharmony/roblox-brain
roblox-building
tabooharmony/roblox-brain
Use when building or editing geometry, maps, props, or generated assets with MCP or standalone Luau.
roblox-animation-vfx
tabooharmony/roblox-brain
Use when adding, changing, or fixing Roblox animations, particles, beams, trails, tweens, camera shake, or other visual effects.
roblox-studio-mcp
tabooharmony/roblox-brain
Use when working in Roblox Studio through MCP: editing scripts or scenes, generating assets, playtesting, screenshots, or input.
roblox-lighting
tabooharmony/roblox-brain
Use when setting up or changing Roblox lighting, atmosphere, day/night cycles, or post-processing effects.
roblox-gui
tabooharmony/roblox-brain
Use when building or fixing Roblox menus, HUDs, shops, dialogs, or UI that must work on phones, tablets, desktop and console.
roblox-luau-patterns
tabooharmony/roblox-brain
Use when writing or refactoring Roblox Luau modules, object lifecycles, signals, task scheduling, pcall, and cleanup.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.