roblox-luau-architecture
Skill5 starsChanged 5 months agoMITView on GitHub
Design, inspect, and refactor Roblox Luau game architecture. Use for ModuleScript/service boundaries, client-server flow, RemoteEvents/RemoteFunctions, ReplicatedStorage organization, reusable systems, script placement, and safe Studio MCP code-edit workflows.
In this repository39 other files it gives its agents.
- handoffSkill
- roblox-admin-tools-observabilitySkill
- roblox-analytics-instrumentationSkill
- roblox-animation-audio-feedbackSkill
- roblox-asset-pipelineSkill
- roblox-code-maintenance-refactorSkill
- roblox-combat-systemsSkill
- roblox-community-opsSkill
- roblox-creator-store-security-auditSkill
- roblox-datastore-persistenceSkill
- roblox-debugging-bugfixSkill
- roblox-economy-balancingSkill
- roblox-game-development-lifecycleSkill
- roblox-game-ideasSkill
- roblox-game-uxSkill
- roblox-genre-patternsSkill
- roblox-growth-marketingSkill
- roblox-liveops-roadmapSkill
- roblox-localization-accessibilitySkill
- roblox-mobile-playtestSkill
- roblox-monetization-optimizationSkill
- roblox-performance-optimizationSkill
- roblox-playtest-qaSkill
- roblox-policy-complianceSkill
- roblox-publishing-discoverySkill
- roblox-quest-progression-systemsSkill
- roblox-release-operationsSkill
- roblox-retention-monetizationSkill
- roblox-security-economySkill
- roblox-social-systemsSkill
- roblox-studio-workflowSkill
- roblox-to-issuesSkill
- roblox-to-prdSkill
- roblox-triageSkill
- roblox-ui-implementationSkill
- roblox-world-level-designSkill
- setup-roblox-skillsSkill
- write-a-skillSkill
- zoom-outSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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
- Distinctive: line 10
Keep Roblox game code modular, server-authoritative, and easy to extend.
- Very specific: line 14
Start with list_roblox_studios, set_active_studio if needed, and get_studio_state.
- Very specific: line 16
Read relevant scripts with script_read before editing.
- Very specific: line 19
Check get_console_output for regressions.
- Very specific: line 23
Put authoritative game logic in ServerScriptService or server-owned modules.
- Very specific: line 24
Put shared constants, type definitions, remotes, and pure shared helpers in ReplicatedStorage.
- Distinctive: line 25
Put player input, camera, local-only UI, and visual prediction in client scripts.
- Distinctive: line 26
Keep workspace scripts rare and intentional.
- Distinctive: line 27
Avoid scattering duplicated constants across client and server.
- Distinctive: line 31
Treat every client remote payload as untrusted.
- Distinctive: line 32
Prefer narrow remotes with explicit action names and typed payload checks.
- Distinctive: line 34
Use RemoteFunctions sparingly.
- Distinctive: line 35
Never let the client decide currency, inventory, ownership, damage, quest completion, or purchase grants.
- Distinctive: line 48
Keep modules small enough that another system can depend on them without importing unrelated behavior.
- Distinctive: line 56
Locality: put related behavior and its valuable-state rules in one module so a change, a bug, or the knowledge to reason about it lives in …
- Distinctive: line 63
When proposing or making architecture changes, include:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Roblox Luau Architecture
Goal
Keep Roblox game code modular, server-authoritative, and easy to extend. Use Roblox Studio MCP to inspect existing scripts before changing architecture.
MCP Workflow
- Start with
list_roblox_studios,set_active_studioif needed, andget_studio_state. - Locate code with
script_searchorscript_grep. - Read relevant scripts with
script_readbefore editing. - Apply edits with
multi_edit. - Playtest with
start_stop_play. - Check
get_console_outputfor regressions.
Placement Rules
- Put authoritative game logic in
ServerScriptServiceor server-owned modules. - Put shared constants, type definitions, remotes, and pure shared helpers in
ReplicatedStorage. - Put player input, camera, local-only UI, and visual prediction in client scripts.
- Keep workspace scripts rare and intentional; prefer service-style scripts that manage tagged instances or configured folders.
- Avoid scattering duplicated constants across client and server.
Remote Boundaries
- Treat every client remote payload as untrusted.
- Prefer narrow remotes with explicit action names and typed payload checks.
- Rate-limit player-triggered remotes that can affect economy, inventory, combat, or placement.
- Use RemoteFunctions sparingly; avoid long-yielding server calls from the client.
- Never let the client decide currency, inventory, ownership, damage, quest completion, or purchase grants.
Module Pattern
Use modules for:
- Services with
InitandStartstyle lifecycle. - Data access wrappers.
- Economy calculations.
- Reward tables and balancing constants.
- UI controllers on the client.
- Shared utility functions that are deterministic and side-effect-light.
Keep modules small enough that another system can depend on them without importing unrelated behavior.
Prefer Deep Modules
Aim for deep modules: a lot of behavior behind a small, stable interface. A shallow module — where the interface is nearly as complex as its implementation — earns its keep only if it hides real complexity.
- Interface = everything a caller must know: the function signature plus invariants, ordering, error modes, and which side (client/server) may call it. In Roblox, a remote's contract is part of its interface.
- Deletion test: imagine deleting a module. If complexity vanishes, it was a pass-through — inline it. If the same complexity reappears across several call sites, it was earning its keep — keep it and deepen it.
- Locality: put related behavior and its valuable-state rules in one module so a change, a bug, or the knowledge to reason about it lives in one place — not scattered across a LocalScript, a server Script, and three constants files.
- One adapter satisfying an interface is a hypothetical seam; two is a real one. Don't build indirection for a single implementation.
Good seams get names from the game's own vocabulary (the "coin economy service", the "quest tracker"), not generic ones ("Handler", "Manager").
Refactor Output
When proposing or making architecture changes, include:
- Current script locations and responsibilities.
- Proposed module/service boundaries.
- Remote contract changes.
- Migration steps.
- Playtest and console checks.
Next
Slice the architecture work with roblox-to-issues so it lands one safe change at a time, and verify each with roblox-playtest-qa. For valuable-state modules, review the trust boundary with roblox-security-economy; for cleanup of existing debt, use roblox-code-maintenance-refactor.
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
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.

