agentleFS
CodePhobiiaCodePhobiia/claude-roblox-game-studio/.claude/skills/perf-profile/SKILL.md

perf-profile

Skill9 starsChanged 7 months agoMITView on GitHub

Performance profiling guide — what to measure, how to use MicroProfiler, and common Roblox bottlenecks. Use when debugging performance issues.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use soak-test, team-live-ops and 10 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.
  • lilangMaxSkill

    soak-test

    Generate a soak test protocol for extended play sessions. Defines what to observe, measure, and log during long play sessions to surface slow leaks, fatigue effects, and edge cases that only appear after sustained play. Primarily used in Polish and Release phases.

    Also in 9 projects that use this

  • lilangMaxSkill

    team-live-ops

    Orchestrate the live-ops team for post-launch content planning: coordinates live-ops-designer, economy-designer, analytics-engineer, community-manager, writer, and narrative-director to design and plan a season, event, or live content update.

    Also in 9 projects that use this

  • +10 more from lilangMax

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify the time decreased

    line 104

“Common” is measured: kept by at least 6 in 10 of the 19 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

/perf-profile — Performance Profiling Guide

Delegate to: performance-analyst

When to Use

  • Game feels laggy on mobile
  • Server frame time is high
  • Memory usage growing over session
  • Network bandwidth high
  • Any specific performance concern reported by users

Steps

1. Define the Problem

Ask:

  • "What's the symptom?" (FPS drop, memory growth, lag spike, high network)
  • "When does it happen?" (always, combat, crowded servers, specific action)
  • "What devices?" (mobile, PC, console, specific model)
  • "What was the baseline?" (was this working before a change?)

2. Pick the Right Tool

MicroProfiler (primary tool)

  • Server: Ctrl+F6 in Studio
  • Client: Ctrl+Alt+F6 during playtest
  • Shows per-frame breakdown — find what's eating the frame

Developer Console (F9)

  • Stats tab for general metrics
  • Log tab for errors

Script Profiler (Ctrl+Alt+F5)

  • Per-script CPU usage
  • Heap usage per script

Network Tab

  • Bandwidth breakdown per remote

3. Common Server Bottlenecks

Heartbeat Time > 33ms

Check:

  • Scripts in heavy loops over many instances
  • DataStore calls not yielding
  • Synchronous operations that should be async

Memory Growth

Check:

  • Tables accumulating without cleanup
  • Connections not disconnected
  • Instances created without Destroy()

DataStore Budget Exhausted

Check:

  • Save frequency too high
  • Not debouncing saves
  • Retries running too often on failure

4. Common Client Bottlenecks

FPS Drop on Mobile

Check:

  • Transparency overdraw (stacked transparent parts)
  • Particle rates too high
  • Dynamic lights > 8 visible
  • Post-processing stack (Bloom, DepthOfField)
  • Part count in visible area

Lag Spikes

Check:

  • Tweens starting and stopping (allocations)
  • Large table creations per frame
  • Heavy operations in Heartbeat

Memory Growth (Client)

Check:

  • UI connections not cleaned up on PlayerGui destruction
  • Image/sound caching without eviction
  • Accumulating local state

5. Profiling Walkthrough

Measure Baseline

  1. Open Studio
  2. Play Solo or Team Test
  3. Let game run for 30 seconds
  4. Open MicroProfiler (Ctrl+F6 or Ctrl+Alt+F6)
  5. Note: Heartbeat time, Script time, Render time

Identify the Spike

  1. Trigger the suspected issue (e.g., start combat)
  2. Watch MicroProfiler for the frame time spike
  3. Click on the spike bar to drill down
  4. Find the specific label/category consuming time

Optimize and Re-measure

  1. Apply the fix
  2. Re-run the same test
  3. Verify the time decreased
  4. Document the improvement

6. Output

# Performance Profile: [Problem]

## Environment
- Device: [device]
- Scene: [what was happening]
- Player count: [N]

## Measurements
| Metric | Before | After | Delta |
|--------|--------|-------|-------|
| Server Heartbeat | 45ms | 28ms | -17ms ✅ |
| Client FPS | 22 | 48 | +26 ✅ |
| Memory | 1.8GB | 1.6GB | -200MB ✅ |

## Root Cause
[What was causing the issue]

## Fix Applied
- [File path]: [what changed]

## Remaining Concerns
- [Anything that could improve further]

Present to user. Offer to delegate fix implementation to relevant programmer specialist.

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.