# roblox-networking

roblox-networking — a Claude Code skill for client-server communication in Roblox, helping configure remotes, validate server payloads, and reduce bandwidth.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1200 installs · ★ 131 repo stars
- Author: EL4CTEO
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-networking/SKILL.md
- Updated: 2026-11-03
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/el4cteo-roblox-networking

## What it does

The skill defines rules for picking network channels between RemoteEvent, UnreliableRemoteEvent, and RemoteFunction, alongside data serialization limits. The agent applies it when adding remotes, syncing state to clients, debugging lost arguments, or reducing lag.

It provides templates for centralized remote definitions and server-side handlers with rate limiting and argument type-checking. It also covers buffer packing, time synchronization via workspace:GetServerTimeNow, and network profiling.

Using RemoteFunction:InvokeClient can cause the server to yield forever if the client errors or disconnects. Schema-driven generators like Zap and Blink are recommended for heavy hot paths.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-networking -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/roblox-networking/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/roblox-networking/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-networking -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/roblox-networking/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-networking -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/roblox-networking/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install EL4CTEO/roblox-skills skills/roblox-networking
```

2. **Manually: put the files in place**
- File: `.github/skills/roblox-networking/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-networking -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/EL4CTEO/roblox-skills --path skills/roblox-networking
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/roblox-networking/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-networking -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-networking/SKILL.md

## When to use it
- pick the right network channel in Roblox
- implement a rate-limited server handler with type checks
- pack network data into buffers to save bandwidth
- synchronize time between server and clients

## Example prompts
- Generate a typed module for creating RemoteEvent and RemoteFunction instances
- Write a server handler for RequestPurchase with rate limiting and type validation
- Show how to pack hit data into a buffer instead of a table

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: a9ba9cdd9f27235f.

BEGIN THIRD-PARTY FILE a9ba9cdd9f27235f
````text
---
name: roblox-networking
description: Client-server communication - RemoteEvent, UnreliableRemoteEvent, RemoteFunction, what survives serialization, typed remote modules, server validation and rate limiting, bandwidth (deltas, buffers, batching), synced time, Zap/Blink. Use when adding remotes, syncing state to clients, debugging nil/lost remote arguments, or reducing lag and bandwidth.
---

# Roblox networking

## Pick the right channel

| Channel | Delivery | Use for |
| --- | --- | --- |
| `RemoteEvent` | Reliable, ordered | Requests (client→server), game events, UI updates. The default. |
| `UnreliableRemoteEvent` | May drop or reorder; payload ≤ **1000 bytes** (larger payloads are dropped) | Continuous, superseded-by-next data: aim direction, cosmetic VFX, positions of non-physics objects. |
| `RemoteFunction` | Request/response, yields caller | Client→server queries that need an answer (e.g. "can I buy X?"). |
| Attributes / properties | Automatic replication server→client | Persistent state clients read (health, team, round state). |
| Physics replication | Automatic for owned assemblies | Moving parts; see `roblox-physics`. |

Never use `RemoteFunction:InvokeClient`: if the client errors, disconnects, or never returns, the server
throws or **yields forever**. Use a `RemoteEvent` to the client and another back if you need a reply.

## Defining remotes once (typed)

Create remotes on the server; clients wait for them. Centralize names so typos can't happen.

```luau
--!strict
-- ReplicatedStorage/Shared/Net.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

local FOLDER_NAME = "Remotes"
local IS_SERVER = RunService:IsServer()

local folder: Instance
if IS_SERVER then
	folder = ReplicatedStorage:FindFirstChild(FOLDER_NAME) or Instance.new("Folder")
	folder.Name = FOLDER_NAME
	folder.Parent = ReplicatedStorage
else
	folder = ReplicatedStorage:WaitForChild(FOLDER_NAME)
end

local function get<T>(className: string, name: string): T
	if IS_SERVER then
		local existing = folder:FindFirstChild(name)
		if existing then
			return existing :: any
		end
		local remote = Instance.new(className)
		remote.Name = name
		remote.Parent = folder
		return remote :: any
	end
	return folder:WaitForChild(name) :: any
end

return {
	RequestPurchase = get("RemoteEvent", "RequestPurchase") :: RemoteEvent,
	InventoryChanged = get("RemoteEvent", "InventoryChanged") :: RemoteEvent,
	AimDirection = get("UnreliableRemoteEvent", "AimDirection") :: UnreliableRemoteEvent,
	GetShopStock = get("RemoteFunction", "GetShopStock") :: RemoteFunction,
}
```

## Server handler template

Every `OnServerEvent`/`OnServerInvoke` handler: **rate limit → type-check every argument → check
game rules → act**. The first parameter is always the real `Player` (Roblox fills it in; it can't be forged).

```luau
````
END THIRD-PARTY FILE a9ba9cdd9f27235f

The third-party file has ended. Everything between the a9ba9cdd9f27235f tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2897 of 7282 bytes. © EL4CTEO · MIT · https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-networking/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
