agentleFS
MRCalderon3DMRCalderon3D/everything-game-dev-code/skills/web/web-performance/SKILL.md

web-performance

Skill105 starsChanged 8 months agoMITView on GitHub

Keep a browser game inside its frame budget through allocation discipline, pooling, and devtools-driven profiling.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use web-accessibility.

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.
  • hoodiniSkill

    web-accessibility

    Build accessible web applications following WCAG guidelines. Use when implementing ARIA patterns, keyboard navigation, screen reader support, or ensuring accessibility compliance. Triggers on accessibility, a11y, WCAG, ARIA, screen reader, keyboard navigation.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 6

    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:

    Keep a browser game inside its frame budget through allocation discipline, pooling, and devtools-driven profiling.

    line 11
  2. Distinctive:

    read the profile for long tasks, dropped frames, and minor-GC markers.

    line 26
  3. Distinctive:

    remove steady-state allocation from hot paths: reuse scratch vectors and arrays, avoid per-frame closures, string building, and array …

    line 27
  4. Distinctive:

    before/after measurements for each optimization

    line 35
  5. Distinctive:

    every optimization is justified by a profile capture, not intuition

    line 38
  6. Distinctive:

    Keep this skill aligned with the relevant rules layer and current project documentation.

    line 62

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

Web Performance

Purpose

Keep a browser game inside its frame budget through allocation discipline, pooling, and devtools-driven profiling.

Use When

  • the game stutters, hitches, or misses its frame budget on target devices
  • defining performance budgets before heavy content lands
  • reviewing per-frame code for allocation and GC pressure

Inputs

  • frame budget per target (typically 16.7 ms at 60 Hz) split across simulation, rendering, and headroom
  • target device list, including a representative low-end phone
  • current profiler captures, if any
  • list of high-churn entities (bullets, particles, enemies, popups)

Process

  1. set explicit budgets per system and measure before optimizing: capture a browser devtools performance profile during real gameplay, not menus
  2. read the profile for long tasks, dropped frames, and minor-GC markers; use the allocation profiler to find per-frame garbage sources
  3. remove steady-state allocation from hot paths: reuse scratch vectors and arrays, avoid per-frame closures, string building, and array methods that allocate
  4. pool high-churn entities with explicit acquire, release, and reset rules so gameplay spikes do not become GC pauses
  5. cull and throttle: skip offscreen work, cap particle and entity counts, stop or reduce work when the page is hidden, and re-verify on the low-end device after each change

Outputs

  • frame budget table per system and device tier
  • profiling findings with attributed costs
  • pooling and allocation rules for hot paths
  • before/after measurements for each optimization

Quality Bar

  • every optimization is justified by a profile capture, not intuition
  • steady-state gameplay shows near-zero allocation in the heap timeline; GC activity is rare and short
  • pooled entities reset fully on release, so reuse never leaks stale state into gameplay
  • the frame budget holds on the weakest target device, not just the development machine
  • background tabs stop burning CPU and battery

Common Failure Modes

  • optimizing unprofiled code while the actual cost sits in an unbatched draw path or a layout-triggering DOM read
  • per-frame closures, spreads, and temporary arrays creating a sawtooth heap and periodic GC hitches
  • pools that grow without bounds or hand out objects still referenced by live gameplay
  • profiling only on a high-end desktop and shipping a game that drops to 20 fps on mid-range phones
  • death-by-a-thousand-cuts entity logic where per-entity virtual calls and lookups exceed the simulation budget at peak counts

Related Agents

  • performance-reviewer
  • gameplay-programmer
  • web-reviewer

Related Commands

  • perf-budget
  • web-review
  • verify

Notes

  • Keep this skill aligned with the relevant rules layer and current project documentation.
  • Framework internals (renderer batching, tween pools) count against the same budgets; profile through the framework rather than assuming it is free.

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.