# Three.js Skills: current three.js r186 knowledge for Claude Code (CloudAI-X/threejs-skills) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-05 against commit 0e18186.
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/cloudai-x/threejs-skills/

## Explain it to a non-programmer
Thirteen reference guides that teach your AI assistant today's three.js, the library behind 3D graphics on web pages. Your assistant writes scenes, models, lights, effects and React scenes with the names of the current release. Each guide also lists old code that models still write, with the fix.

## Who it is for
- You ask Claude Code to build 3D scenes, product viewers or visual effects for a website
- Your assistant's three.js code fails because it uses names from older releases
- You load 3D models (glTF files) and want them smaller and quicker to load
- You build 3D inside a React app with React Three Fiber
- Not for: Your project stays on an older three.js release: every example follows r186
- Not for: You don't make 3D graphics for the web

## What it is
- Kind: knowledge
- License: MIT
- Repository: https://github.com/CloudAI-X/threejs-skills

## What it does
- Pins the assistant to one release: three.js r186, React Three Fiber 9.8 with drei 10.7, gltf-transform 4.5
- Every guide has the same parts: a complete runnable Quick Start, the topic with working examples, a WebGPU and TSL section, Common Mistakes and See Also
- Common Mistakes lines replace outdated code with the r186 version and say why (for example Clock becomes Timer, requestAnimationFrame becomes renderer.setAnimationLoop)
- Covers the whole path of a web 3D project: scene setup, shapes, materials, lights, textures, animation, loading files, shaders, screen effects, input, speed, React and shrinking models
- Teaches the newer WebGPU renderer with TSL next to the classic WebGL renderer, including where custom GLSL shaders stop working

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| threejs-fundamentals | plain language ("Create a 3D scene with ...") | yes | Sets up a 3D scene: camera, renderer, the animation loop, resizing and cleanup |
| threejs-geometry | plain language | yes | Builds shapes, 3D text, point clouds, lines and many copies of one object |
| threejs-materials | plain language | yes | Chooses and tunes how surfaces look: matte, shiny, glass-like, cartoon |
| threejs-lighting | plain language | yes | Adds lights and shadows, and lights a scene from an HDR photo of a real place |
| threejs-textures | plain language | yes | Puts images on 3D surfaces with the right colours, and keeps their memory use down |
| threejs-animation | plain language | yes | Plays and blends animations from model files, moves bones and face shapes |
| threejs-loaders | plain language | yes | Loads 3D models, images and HDR environments, shows progress and frees memory |
| threejs-shaders | plain language | yes | Writes custom shader effects, in GLSL for WebGL or in TSL for WebGPU |
| threejs-postprocessing | plain language | yes | Adds screen effects: glow, depth of field, ambient shading, colour grading |
| threejs-interaction | plain language | yes | Lets people click, drag, select and orbit around objects with mouse, touch or keys |
| threejs-performance | plain language | yes | Finds why a scene is slow by measuring first, then cuts the cost |
| threejs-react-three-fiber | plain language | yes | Builds the same 3D scenes as React components with React Three Fiber and drei |
| threejs-asset-pipeline | plain language | yes | Shrinks 3D model files before you ship them, then sets up the matching loading code |

### threejs-performance
- Asks for: A scene that is slow, stutters or runs out of memory
- Gives: Frame numbers read from renderer.info: draw calls, triangles, geometries, textures, shader programs
- Gives: Fixes for draw calls, memory, fill rate, per-frame work and shader compile stalls
- Say: "My scene drops frames on a laptop, find out why and fix it"

### threejs-asset-pipeline
- Asks for: A glTF or GLB model file
- Asks for: What matters more: download size, or memory on the graphics card
- Gives: An inspect report before and after: where the bytes are
- Gives: A compressed copy of the model (model.opt.glb in its examples)
- Gives: The loader code that the compressed file needs
- Gives: With gltfjsx: a React component file for the model
- Say: "Shrink model.glb before I put it on my site, and update the loading code"

## Know before installing
- It is written for three.js r186. If your project uses an older release, some of the current names will not exist there.
- The guides switch on by themselves: Claude Code picks one when your request matches its description.
- The model guide has your assistant run gltf-transform and gltfjsx through npx. npx downloads those tools from npm, and they write new model files next to the original.
- gltfjsx with --transform writes Model.jsx and a rewritten copy of your model (model-transformed.glb).
- Pages without a build step load three.js 0.186.0 from the jsDelivr CDN through an import map, so the page needs the internet.
- The manual install for all projects copies all 13 guides into ~/.claude/skills; the project install uses .claude/skills.

## Install (official commands)
- Any agent (skills CLI): `npx skills add cloudai-x/threejs-skills`
- Claude Code (all projects): `git clone https://github.com/CloudAI-X/threejs-skills.git` && `mkdir -p ~/.claude/skills && cp -r threejs-skills/skills/* ~/.claude/skills/` Remove: `delete the threejs-* folders from ~/.claude/skills/`.
- Claude Code (one project): `git clone https://github.com/CloudAI-X/threejs-skills.git` && `mkdir -p .claude/skills && cp -r threejs-skills/skills/* .claude/skills/` — Run the copy from the project root. Remove: `delete the threejs-* folders from .claude/skills/`.

## What runs on the user's machine
- Code on the machine: no
- Network: none
- Install: Thirteen markdown files. No hooks, no scripts, no plugin manifest.
- threejs-asset-pipeline at work: Tells your assistant to run gltf-transform and gltfjsx through npx (downloaded from npm), which write compressed model files and, with gltfjsx, Model.jsx in your project.
- Pages it writes without a bundler: The browser loads three.js 0.186.0 from cdn.jsdelivr.net through an import map.
- React pages using useGLTF: The guide notes that drei loads the Draco decoder from a pinned gstatic URL in the visitor's browser.

## Examples (from the pack's own files)
- A Common Mistakes line: output format defined in skills/threejs-fundamentals/SKILL.md

## Author's numbers (as reported, not run by AgentGid)
- Checked against three@0.186.1, @react-three/fiber@9.8.2, @react-three/drei@10.7.9, @gltf-transform/cli@4.5.1 and gltfjsx@6.5.3: import paths and classes exist, every JavaScript block parses, no removed API in examples (The author's checks against the published packages and the official three.js Migration Guide). Source: CloudAI-X/threejs-skills/README.md

## How to tell it works
Ask Claude Code: "Create a 3D scene with a spinning cube and a camera I can orbit." With the skills, the code uses renderer.setAnimationLoop and THREE.Timer, not requestAnimationFrame and THREE.Clock. Those names show the guide was used.
