/threejs-skills:threejs-scene-doctorfrom three.js Skills
Runtime diagnosis of a running three.js or R3F app: draw calls, triangles, GPU memory leaks, missing lights, color spaces, stuck mixers. Use when an app is slow, leaks or renders wrong and the model file is fine. Hands off to `threejs-performance`.
Ships in three.js Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
threejs-model-inspect checks the file; this checks the app. The doctor captures the app's renderer, scenes and
animation mixers through three.js's official __THREE_DEVTOOLS__ hook, so it needs no changes to the app and works
with React Three Fiber.
Paths: <this-skill-dir> is the directory containing this SKILL.md; replace it with that absolute path. The script
needs Node 22+, a Chrome-family browser, and threejs-model-inspect installed next to this skill.
Start the app (dev server or a built index.html) and run the doctor against it:
node "<this-skill-dir>/scripts/doctor.mjs" http://localhost:5173
node "<this-skill-dir>/scripts/doctor.mjs" dist/index.html --wait 8000 # served from its folder
node "<this-skill-dir>/scripts/doctor.mjs" http://localhost:5173 --click "#start" --screenshot shot.png
node "<this-skill-dir>/scripts/doctor.mjs" http://localhost:5173 --json
node "<this-skill-dir>/scripts/doctor.mjs" http://localhost:5173 --watch 10 # leak check
It finds the app's main scene even behind post-processing (the largest scene rendered recently, not the
composer's full-screen quad). A single snapshot cannot prove a leak, because render targets, shadow maps and
thumbnail scenes hold GPU resources too, so surplus counts are only info. --watch N measures GPU memory
over N idle seconds; growth there is the real leak signal.
--wait covers loading (raise it for heavy scenes); --click gets past a start button or loading gate.
Read the findings. error means broken (no light at all, a mixer that never advances); warn means a visible or
measurable problem; info is a lead. The stats line gives draw calls, triangles, shader programs, GPU memory,
and the scene's materials, textures and lights.
Act on the finding, not on fps. Headless browsers render on the CPU, so frame times there are only indicative.
Counts are exact: fix draw calls with instancing or merging, leaks with dispose(), black scenes with lights or
an environment, washed-out textures with colorSpace. threejs-performance covers the techniques in depth.
To watch memory over time or check an interaction in a real browser, load the snippet before the app and use the console:
<script src="scene-doctor.js"></script> <!-- copied from <this-skill-dir>/assets/, before the app's scripts -->
then await threejsDoctor.report() and const stop = threejsDoctor.watch(5000); GPU memory that keeps growing
while the scene stays the same is a leak. When the snippet loads after three.js, pass the objects instead:
threejsDoctor.report({ renderer, scene, camera }).
Re-run the doctor after each fix and compare the stats.
watch() is for.error findings, and each warn is fixed or explained.Next: threejs-performance for deeper optimization of what the doctor found.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub emiliodominguez/threejs-skills --plugin threejs-skills28 skills in this plugin
/threejsMap of the threejs-* skills for three.js and React Three Fiber work: 3D models, scenes, materials, lighting, animation, shaders, performance and model generation. Use when a 3D web task spans several areas or the right skill is unclear. Routes to `threejs-model-inspect` and the rest of the suite./threejs-animationKeyframe, skeletal and morph-target animation, procedural motion and clip blending, on WebGL or with WebGPU and TSL. Use when animating objects, playing glTF animations, posing bones, driving morph targets, or mixing and crossfading clips./threejs-asset-pipelineShrinking glTF assets for three.js with gltf-transform: inspect, validate and optimize commands, Draco, meshopt and quantization, KTX2, WebP and AVIF textures, the loader setup each output needs, and gltfjsx for React. Use when compressing, optimizing or validating 3D models before loading them./threejs-assetsFinding and downloading 3D models, HDRIs and textures with licenses recorded: Poly Haven, Sketchfab, Kenney, Quaternius, Mixamo. Use when a project needs a model, environment map or material it lacks. Hands off to `threejs-model-inspect`./threejs-fundamentalsThree.js scene setup: scenes and fog, cameras, the renderer and tone mapping, the animation loop, object hierarchies, transforms, core math and cleanup, on WebGL or with WebGPU and TSL. Use when creating a scene from scratch, configuring a camera or renderer, handling resize, or arranging objects./threejs-geometryCreating and shaping three.js geometry: built-in shapes, 3D text, vertex buffers and attributes, merging, instancing, batching, point clouds and lines, on WebGL or with WebGPU and TSL. Use when building 3D shapes or text, custom vertex data, custom meshes, instanced meshes, or point clouds.