rbx-architecture
Skill0 starsChanged 3 months agoMITView on GitHub
The map of where code lives and who owns truth — container law, the client/server split, and the seven foundational patterns that keep a game navigable at 50+ scripts. Use when the user asks "where should this script go", "client or server?", "how do I structure my game", or when a place has gone spaghetti — Scripts loose in Workspace, logic duplicated on both sides, nothing findable. Do not use for picking a framework — load rbx-frameworks — or for syncing individual values — load rbx-state-replication instead.
In this repository253 other files it gives its agents.
- rbx-abtestSkill
- rbx-accessibilitySkill
- rbx-analytics-eventsSkill
- rbx-analytics-funnelsSkill
- rbx-analytics-readingSkill
- rbx-animationSkill
- rbx-anim-cutscenesSkill
- rbx-anim-npcSkill
- rbx-anim-proceduralSkill
- rbx-anim-rigsSkill
- rbx-anim-tweenSkill
- rbx-assets-audioSkill
- rbx-assets-id-policySkill
- rbx-assets-sanitizeSkill
- rbx-assetsSkill
- rbx-assets-toolboxSkill
- rbx-assets-webSkill
- rbx-audio-feedback-mapSkill
- rbx-audio-mixingSkill
- rbx-audio-musicSkill
- rbx-audio-sfxSkill
- rbx-audioSkill
- rbx-audio-spatialSkill
- rbx-badges-groupsSkill
- rbx-build-compositionSkill
- rbx-build-detailingSkill
- rbx-build-greyboxSkill
- rbx-buildingSkill
- rbx-build-interiorsSkill
- rbx-build-kitbashSkill
- rbx-build-landscapeSkill
- rbx-build-propsSkill
- rbx-build-scaleSkill
- rbx-build-structuresSkill
- rbx-camera-controllersSkill
- rbx-camera-cutsceneSkill
- rbx-camera-shakeSkill
- rbx-chat-moderationSkill
- rbx-ciSkill
- rbx-combat-abilitiesSkill
- rbx-combat-hitregSkill
- rbx-combat-meleeSkill
- rbx-combat-rangedSkill
- rbx-combatSkill
- rbx-combat-statusSkill
- rbx-complianceSkill
- rbx-comprehendSkill
- rbx-controlsSkill
- rbx-data-crossserverSkill
- rbx-data-profilestoreSkill
- rbx-data-recoverySkill
- rbx-data-schemaSkill
- rbx-data-sessionlockSkill
- rbx-dataSkill
- rbx-design-difficultySkill
- rbx-design-loopSkill
- rbx-design-sheetSkill
- rbx-design-socialSkill
- rbx-economy-currenciesSkill
- rbx-economy-gachaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Every new game skeleton, every "where does this go" question, every feature that crosses the client/server line, and every rbx-comprehend …
- Very specific: line 59
Two-phase startup: Every module gets init() (wire references, no cross-module calls yet) then start() (begin behavior).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
rbx-architecture
When to load
Every new game skeleton, every "where does this go" question, every feature that crosses the
client/server line, and every rbx-comprehend pass over an unfamiliar place. rbx-frameworks
sits on top of this foundation; this file is true no matter which framework wins.
Container law
| Container | Holds | Rule |
| ServerScriptService | Server Scripts + server modules | Game logic defaults here; clients cannot see inside |
| ServerStorage | Server-only assets and modules | Maps, NPC templates, data schemas — never downloaded by clients |
| ReplicatedStorage | Remotes folder, shared modules/assets | Exploiters read everything here — constants, types, utils only |
| ReplicatedFirst | Loading screen | Keep minimal; its contents delay everything behind them |
| StarterGui | UI templates | Cloned into PlayerGui per spawn; set ResetOnSpawn = false on persistent screens |
| StarterPlayerScripts | Client controllers | Cloned once at join, survives respawn |
| StarterCharacterScripts | Per-life behavior | Cloned each spawn, destroyed at death — reset-on-death logic belongs here |
| Workspace | The 3D world | No loose Scripts; server code stays out (see Sharp edges) |
RunContext bends container rules: a Script with RunContext = Client runs on every client
from anywhere (workspace-local spinners, ambient FX); RunContext = Server runs server-side
from any container; the default Legacy lets the container decide. LocalScript has no
RunContext — client containers only, always.
The client/server split
- The server owns every gameplay-relevant value: currency, health, inventory, cooldowns, odds. Clients render, predict, and request.
- A client may ask ("use ability 2 on target X"); the server computes the result. A damage
or price number arriving over a remote is already an exploit — payload rules in
rbx-net-remotes. - Client-made world changes stay local unless the server handed that instance's physics to the client via network ownership. "Only I can see it" is the replication model working.
- PlayerGui, Backpack, and PlayerScripts are per-player clones — editing the StarterGui template at runtime does nothing for players already spawned.
The seven foundational patterns
- Thin bootstrapper. One
MainScript server-side, one client-side; each requires and boots modules and stays under ~20 lines. All logic lives in ModuleScripts. - Two-phase startup. Every module gets
init()(wire references, no cross-module calls yet) thenstart()(begin behavior). Startup-order bugs die here. - Centralized remotes. One server script builds every RemoteEvent/RemoteFunction into
ReplicatedStorage/Remotesbefore any client can fire — never scatteredInstance.newacross feature scripts. - One shared Constants + Types pair. Both sides compile against the same numbers and shapes from ReplicatedStorage; no magic values duplicated per script.
- Server owns state; clients mirror it. Mechanics of the mirror:
rbx-state-replication. - Configure, then parent. Set every property first,
.Parentlast.Instance.new("Part", workspace)replicates a half-built part and yields mid-construction. - Events over polling.
.Died,GetPropertyChangedSignal, CollectionService tags — never awhile true do task.wait(0.1)scan doing an event's job.
Sharp edges
- CRITICAL — Server rule logic in ReplicatedStorage: exploiters decompile it and reverse your validation and drop odds. Fix: anything with rules, odds, or secrets moves to ServerScriptService/ServerStorage; ReplicatedStorage keeps only what both sides genuinely share.
- CRITICAL — Server applies client-sent numbers (damage, price, quantity). Fix: the server recomputes from its own state; treat the client's number as a hint at best.
- HIGH — Scripts buried inside Workspace models: exploiter-visible if not server-run, invisible to audits either way. Fix: one script in ServerScriptService, CollectionService tag to find its model.
- HIGH —
RemoteFunction:InvokeClient()from the server: a client that errors or leaves hangs the server thread forever. Fix: one-way RemoteEvent, or client-initiated invoke. - MEDIUM — God script: 500+ lines doing data, combat, and UI. Fix: split along
rbx-module-designboundaries; the entry Script goes back to being a bootstrapper.
Load with
rbx-frameworks (which pattern scales past this foundation), rbx-module-design (boundaries
inside the skeleton), rbx-state-replication (the sync mechanics), rbx-net-remotes (the
remote layer), rbx-comprehend before touching any existing game.
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.

