agentleFS
luumenlabsluumenlabs/luau-skills/skills/roblox/roblox-networking/SKILL.md

roblox-networking

Skill12 starsChanged 8 months agoMITView on GitHub

Use for Roblox multiplayer communication across the client-server boundary: designing RemoteEvent, UnreliableRemoteEvent, and RemoteFunction flows; validating client requests; handling replication-aware gameplay; applying rate limits and anti-exploit checks; reasoning about network ownership, server-authority patterns, Input Action System use in authoritative gameplay, and streaming-sensitive multiplayer correctness.

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use roblox-physics, roblox-audio and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • szlaySkill

    roblox-physics

    Use when building Roblox vehicles, ragdolls, projectiles, elevators, constraints, forces, or other physics-driven gameplay.

    Also in 5 projects that use this

  • szlaySkill

    roblox-audio

    Use when implementing Roblox audio playback, spatial sound, music, sound effects, SoundGroups, or dynamic audio effects.

    Also in 4 projects that use this

  • sentinelcoreSkill

    roblox-monetization

    Use when developing Roblox games or experiences and need to earn Robux through Game Passes, Developer Products, UGC avatar items, or Premium Payouts — covers both Studio scripting and Creator Hub dashboard setup.

    Also in 4 projects that use this

  • sentinelcoreSkill

    roblox-security

    Use when writing Roblox game scripts that handle player actions, currencies, stats, damage, or any RemoteEvent/RemoteFunction communication. Use when reviewing code for exploitable patterns, implementing anti-cheat logic, validating client requests on the server, or setting up rate limiting.

    Also in 4 projects that use this

  • +6 more from szlay
  • +1 more from sentinelcore

The file

Show its rules and text

We split this skill into the rules it gives an agent

31 rules. 0 are common, 25 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 25

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the task is primarily about multiplayer communication, replication, or trust boundaries in a Roblox experience:

    line 10
  2. Distinctive:

    Do not use this skill when the task is mainly about:

    line 21
  3. Distinctive:

    Use this skill if the main question is "how should client and server communicate safely and correctly?"

    line 29
  4. Distinctive:

    Use this skill when a feature depends on remotes, replication timing, ownership of simulated parts, or server validation.

    line 30
  5. Very specific:

    Prefer RemoteEvent for one-way signals and state notifications.

    line 31
  6. Distinctive:

    Treat the server as the authority for shared game state, rewards, combat outcomes, movement permission, and any action that affects other …

    line 32
  7. Distinctive:

    If a client can request an action, validate permission, context, type, structure, value range, and frequency on the server before mutating …

    line 33
  8. Very specific:

    If the task is mostly about where scripts live, core services, attributes, bindables, or basic runtime structure without a strong …

    line 34
  9. Very specific:

    If the task is mainly about data persistence or cross-server state, hand off to roblox-data.

    line 35
  10. Very specific:

    If the task is mainly about exhaustive class/member lookup, hand off to roblox-api.

    line 36
  11. Distinctive:

    If a request mixes networking with out-of-scope systems, answer only the multiplayer and trust-boundary portion and explicitly exclude the …

    line 37
  12. Distinctive:

    When unsure, omit material that would drift into persistence, cloud auth, or broad API catalog guidance.

    line 38
  13. Distinctive:

    Start by classifying each piece of information:

    line 42
  14. Distinctive:

    Keep remote contracts explicit and small:

    line 51
  15. Distinctive:

    Prefer stable argument order and dictionaries with string keys.

    line 52
  16. Distinctive:

    Do not rely on metatables, function values, mixed tables, non-replicated instances, or table identity surviving a network hop.

    line 53
  17. Distinctive:

    Avoid remotes where the client directly declares rewards, damage, inventory changes, or unrestricted instance mutations.

    line 58
  18. Distinctive:

    Treat server-to-client rebroadcasts as privileged operations:

    line 64
  19. Distinctive:

    Never act as a blind relay from one client to other clients.

    line 65
  20. Distinctive:

    Keep the callback fast and deterministic.

    line 69
  21. Very specific:

    Avoid InvokeClient() for critical flows because the server can hang or fail if the client errors, disconnects, or never returns.

    line 70
  22. Very specific:

    Use WaitForChild(), replication-aware design, tags, or model streaming controls instead of assuming presence.

    line 74
  23. Distinctive:

    Treat network ownership as a performance tool with security cost:

    line 75
  24. Distinctive:

    Keep gameplay-critical physics server-owned unless the responsiveness tradeoff is worth the validation burden.

    line 78
  25. Distinctive:

    Prefer a server-authority mindset where the server is the source of truth and the client primarily contributes input.

    line 80
  26. Distinctive:

    Use the Input Action System for inputs that affect the core authoritative simulation.

    line 81
  27. Distinctive:

    Keep simulation state separate from local rendering and effects.

    line 82
  28. Distinctive:

    When discussing examples, stay inside scope:

    line 83
  29. Distinctive:

    Do not expand into persistence architecture, cloud APIs, or general-purpose API catalogs.

    line 85
  30. Distinctive:

    No persistence architecture, Open Cloud, OAuth, or broad API catalog material is included.

    line 112
  31. Distinctive:

    Do not use this pattern for inventory, damage, scoring, or one-time transactions.

    line 152

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

roblox-networking

When to Use

Use this skill when the task is primarily about multiplayer communication, replication, or trust boundaries in a Roblox experience:

  • Designing or reviewing RemoteEvent, UnreliableRemoteEvent, and RemoteFunction usage.
  • Deciding what the client is allowed to send versus what the server must derive or verify.
  • Choosing safe remote payload shapes, validating arguments, and handling replication timing.
  • Protecting server logic from spam, malformed payloads, impossible requests, or exploit-driven abuse.
  • Building interactions where the client initiates an action but the server remains authoritative.
  • Reasoning about network ownership, client-predicted physics, or Touched-related exploit risk.
  • Applying server-authority ideas, prediction, rollback-aware structure, or input routing for competitive or authoritative gameplay.
  • Designing multiplayer logic that must remain correct when streaming affects what the client can currently see or access.

Do not use this skill when the task is mainly about:

  • Persistent data architecture, save formats, trading storage, or DataStore and MemoryStore design.
  • Broad engine API lookup as the primary task.
  • Open Cloud, OAuth, or external web integrations.

Decision Rules

  • Use this skill if the main question is "how should client and server communicate safely and correctly?"
  • Use this skill when a feature depends on remotes, replication timing, ownership of simulated parts, or server validation.
  • Prefer RemoteEvent for one-way signals and state notifications; prefer UnreliableRemoteEvent only for disposable, continuously changing data; prefer RemoteFunction only when a synchronous reply is truly required.
  • Treat the server as the authority for shared game state, rewards, combat outcomes, movement permission, and any action that affects other players.
  • If a client can request an action, validate permission, context, type, structure, value range, and frequency on the server before mutating state or broadcasting results.
  • If the task is mostly about where scripts live, core services, attributes, bindables, or basic runtime structure without a strong networking/security angle, hand off to roblox-core.
  • If the task is mainly about data persistence or cross-server state, hand off to roblox-data.
  • If the task is mainly about exhaustive class/member lookup, hand off to roblox-api.
  • If a request mixes networking with out-of-scope systems, answer only the multiplayer and trust-boundary portion and explicitly exclude the rest.
  • When unsure, omit material that would drift into persistence, cloud auth, or broad API catalog guidance.

Instructions

  1. Start by classifying each piece of information:
    • Client input intent.
    • Server-derived authoritative state.
    • Replicated presentation or notification.
    • Disposable telemetry or cosmetic updates.
  2. Choose the narrowest network primitive that matches the job:
    • RemoteEvent for async one-way communication.
    • UnreliableRemoteEvent for frequent data where dropped or out-of-order updates are acceptable.
    • RemoteFunction only for short, bounded request-response flows where yielding is acceptable and server ownership of the decision is clear.
  3. Keep remote contracts explicit and small:
    • Prefer stable argument order and dictionaries with string keys.
    • Do not rely on metatables, function values, mixed tables, non-replicated instances, or table identity surviving a network hop.
    • Pass identifiers, compact values, or validated replicated instances instead of arbitrary object trees.
  4. Design remotes around intent, not outcome:
    • Client says "I pressed interact on this target" or "I attempted to fire from here toward this hit point."
    • Server decides whether the action is legal and computes the result.
    • Avoid remotes where the client directly declares rewards, damage, inventory changes, or unrestricted instance mutations.
  5. Validate every client-triggered request on the server:
    • Permission/context: is the player alive, in range, in the right state, and allowed to do this now?
    • Type/shape: are the arguments the expected kinds, sizes, and instance classes?
    • Value sanity: reject impossible numbers, NaN, inf, out-of-range vectors, or unknown ids.
    • Timing: apply per-player rate limits or cooldowns before expensive work or broadcast fan-out.
  6. Treat server-to-client rebroadcasts as privileged operations:
    • Never act as a blind relay from one client to other clients.
    • Validate first, then broadcast only the minimal safe data needed for presentation.
  7. Use RemoteFunction conservatively:
    • Expect the caller to yield.
    • Keep the callback fast and deterministic.
    • Avoid InvokeClient() for critical flows because the server can hang or fail if the client errors, disconnects, or never returns.
  8. Reason about replication explicitly:
    • A remote arriving does not guarantee a related instance or property has already replicated to the client.
    • With streaming enabled, clients may not currently have distant workspace content.
    • Use WaitForChild(), replication-aware design, tags, or model streaming controls instead of assuming presence.
  9. Treat network ownership as a performance tool with security cost:
    • Client-owned physics can feel responsive.
    • Client-owned physics can also be abused, and Touched-based server logic becomes especially risky.
    • Keep gameplay-critical physics server-owned unless the responsiveness tradeoff is worth the validation burden.
  10. For authoritative or competitive gameplay:
  • Prefer a server-authority mindset where the server is the source of truth and the client primarily contributes input.
  • Use the Input Action System for inputs that affect the core authoritative simulation.
  • Keep simulation state separate from local rendering and effects.
  1. When discussing examples, stay inside scope:
  • Focus on multiplayer communication, validation, ownership, authority, and streaming correctness.
  • Do not expand into persistence architecture, cloud APIs, or general-purpose API catalogs.

Using References

  • Open references/remote-events-and-callbacks.md for remote selection, directionality, argument-shape limits, and safe payload design.
  • Open references/client-server-runtime.md for replication timing, latency expectations, and side ownership of gameplay responsibilities.
  • Open references/security-and-defensive-design.md for the security mindset, defensive design, and rate-limiting patterns.
  • Open references/client-server-boundary-guidance.md for concrete validation layers, secure rebroadcast patterns, and protection of client-triggered interactions.
  • Open references/network-ownership.md when physics responsiveness, client-owned parts, or Touched validity are part of the problem.
  • Open references/server-authority-model-and-techniques.md for authoritative simulation, prediction, rollback-aware structure, and latency-conscious design.
  • Open references/input-action-system.md when networked or authoritative gameplay depends on action-oriented, cross-platform input routing.
  • Open references/streaming-and-replication-behavior.md when correctness depends on streamed workspace content, replication focus, or models that may not be locally present.

Checklist

  • The client-server contract is defined in terms of player intent, not client-declared outcomes.
  • The chosen remote primitive matches the required reliability and response behavior.
  • Remote payloads use stable, replication-safe shapes.
  • The server validates permission, context, type, structure, and values before mutating shared state.
  • The server applies rate limits or cooldowns to abuse-prone entry points.
  • Server-to-client broadcasts happen only after validation and never as blind relays.
  • RemoteFunction use is justified and bounded.
  • Replication timing assumptions are explicit, especially when remotes reference freshly created or streamed content.
  • Network ownership choices are deliberate and paired with server-side validation where needed.
  • Touched, proximity, click, or drag interactions are not trusted just because the engine fired them.
  • Authoritative gameplay uses client inputs and server-owned state rather than trusting client simulation results.
  • Input guidance stays focused on networked or authoritative use of the Input Action System.
  • No persistence architecture, Open Cloud, OAuth, or broad API catalog material is included.

Common Mistakes

  • Letting the client tell the server who was damaged, what reward was earned, or which state change already happened.
  • Using RemoteFunction for convenience when an async RemoteEvent plus server-side state would be safer.
  • Broadcasting one client's payload to every other client without validating it first.
  • Passing mixed tables, metatable-backed objects, huge payloads, or sender-only instances across remotes.
  • Forgetting to reject NaN, inf, oversized strings, or spoofed instance references.
  • Assuming a remote means an associated part, attribute, or model has already replicated.
  • Relying on client cooldowns without server-side rate limiting.
  • Treating client-owned physics or Touched events as authoritative proof of contact.
  • Using unreliable channels for state that must arrive in order.
  • Mixing core authoritative simulation logic with local-only animation, camera, or VFX code.

Examples

Design a secure client-triggered interaction

-- Client: request an interaction attempt, not the reward itself.
InteractRemote:FireServer(targetId)
-- Server: verify range, state, and target validity before applying effects.
InteractRemote.OnServerEvent:Connect(function(player, targetId)
    -- Validate player state, target existence, distance, cooldown, and permissions.
    -- Then mutate shared state on the server.
end)

Use unreliable remotes only for disposable updates

-- Suitable for frequent cosmetic aim or camera direction updates.
AimDirectionRemote:FireServer(lookVector)
  • Accept dropped or out-of-order packets.
  • Do not use this pattern for inventory, damage, scoring, or one-time transactions.

Keep authoritative simulation separate from rendering

-- Core state changes live in shared/server-side simulation logic.
-- Local VFX and sounds react to the synchronized state afterward.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.