# roblox-performance

roblox-performance — a skill for Claude Code that diagnoses Roblox game performance, detects memory leaks, and fixes frame rate drops. Used when games lag, stutter, drop FPS, or experience high ping.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1300 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-performance/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-performance

## What it does

Identifies bottlenecks in server computation, rendering, memory, and network using tools such as the MicroProfiler, Script Profiler, and Scene Analysis. Code can be annotated with `debug.setmemorycategory` and profiled using `debug.profilebegin`. It helps optimize Luau hot paths, configure Parallel Luau with Actors, and handle `game.ServerLowMemoryWarning` events on servers.

Targets 60 FPS on mid-range mobile devices while keeping client memory well below 1.5 GB to prevent out-of-memory crashes. Diagnostics rely on the Developer Console via `F9`, the MicroProfiler via `Ctrl+Alt+F6`, and live performance stats via `Ctrl+Alt+F7`.

Before optimizing hot code or during severe frame drops, measure metrics using the built-in profiling tools to identify exact memory and CPU costs.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-performance -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-performance/SKILL.md

## When to use it
- detect memory leaks and unparented instances
- fix client FPS drops and stuttering
- optimize Luau hot paths and loops
- inspect network replication costs
- handle server low memory warnings

## Example prompts
- Diagnose frame rate drops and find heavy scripts
- Find a memory leak in the Luau heap
- Optimize the hot path using Parallel Luau

## 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: 8fbcdd06545236d2.

BEGIN THIRD-PARTY FILE 8fbcdd06545236d2
````text
---
name: roblox-performance
description: Performance diagnosis and optimization - MicroProfiler, Script Profiler, Developer Console, Scene Analysis, Luau heap and memory categories, memory leaks, network/replication cost, rendering and physics cost, streaming, native codegen, Parallel Luau with Actors. Use when a game lags, stutters, drops FPS, crashes on mobile, has high ping, or before optimizing hot code.
---

# Roblox performance

**Measure before optimizing.** Identify whether the bottleneck is server compute, client compute
(CPU/GPU), memory, network, or load time, then use the matching tool.

## Tools

| Tool | Open | Use for |
| --- | --- | --- |
| Developer Console | F9 (in game) | Errors, server/client memory by category, network, script activity. Works in live servers. |
| MicroProfiler | Ctrl+Alt+F6 (⌘⌥F6); Dev Console for server | Per-frame timing; spikes; dump a frame for detail. |
| Script Profiler | Studio / Dev Console | Which functions consume Luau time (sampling). |
| Luau heap snapshots | Dev Console → Memory → Luau Heap | What tables/closures/instances are held and by what (leaks). |
| Scene Analysis | Studio | Script memory, unparented instances (leaks), instance composition, audio/animation memory, triangles. Also `SceneAnalysisService` via Studio MCP. |
| Performance Stats / Debug Stats | Ctrl+Alt+F7 / Shift+Ctrl+F1–F5 | Live CPU/GPU/memory/network overlays. |
| Network Simulator | Studio Device Simulator toolbar | Test with latency, jitter, packet loss (3G/4G/Wi-Fi profiles). |
| Performance dashboard | Creator Hub | Live aggregate FPS, server heartbeat, memory, crash rates by device. |

Label your own code in the MicroProfiler and memory views:

```luau
--!strict
local RunService = game:GetService("RunService")

debug.setmemorycategory("EnemyAI") -- memory allocated by this thread is attributed to "EnemyAI"

RunService.Heartbeat:Connect(function(_deltaTime)
	debug.profilebegin("EnemyAI.think") -- shows as a labeled bar in the MicroProfiler
	-- ... work ...
	debug.profileend()
end)
```

## Targets

- Client: 60 FPS on mid-range phones (≈16.6 ms/frame); many players are on low-end Android.
- Server: heartbeat near 60 Hz; `Stats` (`workspace:GetRealPhysicsFPS()`, Dev Console Server Stats).
- Memory: mobile clients crash from OOM first. Keep client memory well under ~1–1.5 GB on low-end
  devices; watch `PlaceMemory`, `LuaHeap`, `GraphicsTexture`, `Sounds`, `Animation` categories.
- Server OOM: `game.ServerLowMemoryWarning` fires (server only, live servers and Team Test, not Studio
  playtests) when memory leaves normal levels, then every 60 s while it stays high. Use it to free memory
  fast (destroy debris/effects, pause spawning, unload empty map areas) and log it; it frees nothing itself.

```luau
--!strict
game.ServerLowMemoryWarning:Connect(function()
````
END THIRD-PARTY FILE 8fbcdd06545236d2

The third-party file has ended. Everything between the 8fbcdd06545236d2 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 2844 of 7908 bytes. © EL4CTEO · MIT · https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-performance/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
