/roblox-dev:roblox-architecturefrom roblox-dev
Defines a Roblox project architecture with ModuleScript patterns, client/server/shared layout, bootstrapping, CollectionService managers, remote organization, and Rojo-friendly structure.
Ships in roblox-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A Roblox game that survives growth has: few entry points, modules everywhere, one obvious home for every piece of code, and remotes treated as a typed API boundary. This skill defines that shape.
src/
├── shared/ → ReplicatedStorage/Shared
│ ├── Types.luau (shared type definitions; see luau-strict-typing)
│ ├── Config.luau (tunables: prices, cooldowns, spawn tables)
│ └── Util/ (pure functions usable on both sides)
├── server/ → ServerScriptService/Server
│ ├── init.server.luau (THE server entry point)
│ └── Systems/ (one ModuleScript per system)
│ ├── PlayerData.luau
│ ├── Shop.luau
│ └── Combat.luau
└── client/ → StarterPlayerScripts/Client
├── init.client.luau (THE client entry point)
└── Controllers/ (one ModuleScript per concern)
├── ShopUI.luau
└── CombatFX.luau
Script and one LocalScript (the two init files).
Everything else is a ModuleScript. Many loose Scripts = uncontrolled
execution order and duplicated service lookups.ServerScriptService/ServerStorage — never
in ReplicatedStorage "for convenience"; the client can read all of it
(see roblox-security).shared/Config.luau holds gameplay numbers so designers/balancing touch one
file — but remember the client copy is readable; authoritative checks still
happen server-side.-- init.server.luau
--!strict
local Systems = script.Systems
local loaded: { [string]: any } = {}
for _, child in Systems:GetChildren() do
if child:IsA("ModuleScript") then
loaded[child.Name] = require(child)
end
end
-- deterministic two-phase startup: construct all, then start all
for name, system in loaded do
if typeof(system.init) == "function" then system.init() end
end
for name, system in loaded do
if typeof(system.start) == "function" then task.spawn(system.start) end
end
Two phases matter: init (synchronous, wire dependencies, create remotes)
completes for every system before any start (long-running loops) begins.
This removes an entire class of "system A required system B before it was
ready" bugs without needing a framework. (If the team already uses a framework
with lifecycles, follow it — the phase discipline is the point.)
_G_G/shared create invisible dependencies, defeat the type checker, and
break under require-order changes. Always require explicitly.require-ing a ModuleScript from the Studio command bar creates
a separate instance from the one your running game uses. For live QA
manipulation, use gated cheat remotes instead (see roblox-testing).Shop.ItemPurchased:Connect(...)) rather than having systems reach into
each other's internals. A tiny Signal implementation or a library both work.init time. Roblox does not
error on a cyclic require: both threads hang silently, so a startup that
"just stops" with no output is the symptom.require("./Sibling"),
require("../Shared/Types"), require("@self/Child"),
require("@game/ReplicatedStorage/Shared/Types"). It does not wait for
replication, so on the client WaitForChild the folder first. Match
whichever style the codebase already uses.Create remotes on the server at startup, in one folder, from one list:
-- shared/Remotes.luau (definition both sides require)
--!strict
export type RemoteName = "BuyItem" | "EquipItem" | "StateSnapshot"
local NAMES: { RemoteName } = { "BuyItem", "EquipItem", "StateSnapshot" }
return NAMES
Server creates them; client waits for the folder once. Wrap access in a small
module (Net.fire(name, ...), Net.on(name, handler)) so:
Never let the client create remotes, and never scatter
Instance.new("RemoteEvent") across systems.
For world objects with shared behavior (chests, doors, spawners), don't put a Script inside each model. Tag instances and run one manager:
--!strict
local CollectionService = game:GetService("CollectionService")
local TAG = "Chest"
local function attach(chest: Instance)
-- connect prompts, set up state; register cleanup (see roblox-performance)
end
local function detach(chest: Instance)
-- run the cleanup registered in attach
end
for _, inst in CollectionService:GetTagged(TAG) do attach(inst) end
CollectionService:GetInstanceAddedSignal(TAG):Connect(attach)
CollectionService:GetInstanceRemovedSignal(TAG):Connect(detach)
Practical notes:
chest:GetAttribute("Tier")),
per-instance behavior stays in the manager.| Code | Home |
|---|---|
| Validates, mutates, or stores game state | server/Systems/ |
| Renders state, plays effects, reads input | client/Controllers/ |
| Pure logic both sides run (damage formula, level curve) | shared/Util/ — server result is authoritative; client copy is for prediction/UI only |
| Type definitions crossing the boundary | shared/Types.luau |
| Tunable numbers | shared/Config.luau (client-readable) or server-only config when secret |
| Per-instance parameters | Attributes on the instance |
| Assets (models, sounds) | ReplicatedStorage/Assets (client needs them) or ServerStorage (spawned server-side) |
Types.luau. If a feature needs edits in five unrelated
files, the boundaries are wrong — fix the structure before adding more.When you (Claude) add any new system to a Roblox project, follow this file layout and the two-phase bootstrap, and produce the server module, client controller, shared types, and remote registration together — not just the piece that was asked for, if the rest doesn't exist yet.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ivar-anon/roblox-dev --plugin roblox-dev10 skills in this plugin
/luau-strict-typingLuau strict mode typing patterns — annotations, narrowing Instance? results, forward declarations, typed remotes, generics, and fixing common --!strict type errors. Use when writing Luau code, enabling --!strict, or resolving Luau type-checker warnings in Roblox projects./new-systemGenerate a complete, secure client/server gameplay system for Roblox — shared types, validated server module, client controller, and remote registration in one pass. Use when adding a feature like a shop, inventory, combat ability, quest, or any system that spans client and server./reviewRun a structured security, data-safety, performance and typing review of Roblox/Luau code using the roblox-reviewer agent. Use when asked to review Roblox code, audit a game for exploits or leaks, or before shipping a system.Other plugins' skills for the same job