Skip to main content
skill CX Codex

optimize-threejs-games — Claude Code skill: profile Three.js games

A skill that profiles and speeds up Three.js and WebGL games: it finds whether the CPU or the GPU is the bottleneck, then fixes it without breaking gameplay.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MengTo/Skills --skill optimize-threejs-games -a claude-code
Open on GitHub

What optimize-threejs-games does

The skill works in a fixed order: measure first, change second. You pick one deterministic encounter and record the device, viewport, quality level, player position, enemies, active effects, frame-time sample, draw calls, triangles, texture count and warnings. Only identical runs are worth comparing.

Diagnosis comes next. Suspect the CPU when simulation, allocations, React work, pathfinding or per-frame scans grow with the number of actors. Suspect the GPU when resolution, overdraw, shadows, transparent particles, post-processing, draw calls, geometry or texture bandwidth dominate. The skill tells the agent to inspect before optimizing, so quality settings don't get lowered blindly.

Low-risk fixes go first: reuse geometry and materials, pool transient effects, cull inactive and offscreen work, throttle noncritical UI updates, cap particle counts, avoid per-frame allocation, update only changed transforms. Render quality stays explicit and reversible, and decorative effects get cut before combat readability or controls. After every change the skill re-runs the original encounter and checks frame time, visual correctness, collision and contact behavior, memory stability, mobile controls, reduced motion and console health. Temporary servers, benchmarks and browser tabs are closed afterwards.

What it helps with

  • find whether the CPU or the GPU caps the frame rate
  • cut draw calls and texture memory use
  • remove per-frame allocations from the game loop
  • reduce load on mobile without breaking touch controls
  • verify an optimization didn't break collisions or combat readability

Example prompts for the agent

  • profile this scene and tell me what's CPU-bound and what's GPU-bound
  • cut draw calls and particle counts, keep render quality settings reversible
  • re-run the original encounter and check frame time, collisions and the console

How to install optimize-threejs-games

1Skills CLI (Vercel)

npx skills add MengTo/Skills --skill optimize-threejs-games -a claude-code

2Manually: put the files in place

~/.claude/skills/optimize-threejs-games/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/optimize-threejs-games/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about optimize-threejs-games

How do I install optimize-threejs-games in Claude?

Run npx skills add MengTo/Skills --skill optimize-threejs-games -a claude-code. The skill lands at ~/.claude/skills/optimize-threejs-games/SKILL.md.

What does optimize-threejs-games do?

It profiles and improves Three.js or WebGL game performance without regressing gameplay. It measures a scene, locates the limiting side, then edits code.

Which platforms can run this skill?

Besides Claude there are installs for Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. GitHub Copilot uses a different command: gh skill install MengTo/Skills optimize-threejs-games.

Source text

SKILL.md · MIT
---
name: optimize-threejs-games
description: Profile, diagnose, and improve Three.js or WebGL game performance without regressing gameplay. Use for frame-time drops, CPU/GPU pressure, draw calls, texture and geometry budgets, animation loops, adaptive quality, mobile performance, and browser performance verification.
---

# Optimize Three.js Games

Measure before changing behavior, then validate the same gameplay path after every optimization.

## Establish a repeatable scene

Choose a deterministic representative encounter and record device, viewport, quality level, player position, enemies, active effects, frame-time sample, draw calls, triangles, texture count, and warnings. Compare like with like.

## Diagnose the limiting side

- Suspect CPU when simulation, allocations, React work, pathfinding, or per-frame scans grow with actors.
- Suspect GPU when resolution, overdraw, shadows, transparent particles, post-processing, draw calls, geometry, or texture bandwidth dominate.
- Inspect before optimizing; do not lower quality blindly.

## Apply low-risk fixes first

Reuse geometry/materials, pool transient effects, cull inactive/offscreen work, throttle noncritical UI updates, cap particle counts, avoid per-frame allocation, and update only changed transforms. Keep render quality settings explicit and reversible. Degrade decorative effects before combat readability or controls.

## Guard the result

Re-run the original encounter and verify frame time, visual correctness, collision/contact behavior, memory stability, mobile controls, reduced motion, and console health. Close temporary servers, benchmarks, and browser tabs once they are no longer needed.

© MengTo · MIT · MengTo/Skills

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set148

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor