Custom shaders for Three.js
Describe the effect you want and Claude writes Three.js shaders for moving surfaces, rim glow or dissolves.
See it work
You give it
Use threejs-shaders. Our Santa Cruz surf wax site's hero: a three.js r186 wave. The teal looks darker than elsewhere on the page, GLSL3 broke it, and it's a flat sheet that tilts. Also, add white foam on the crests.
const mat = new THREE.ShaderMaterial({
glslVersion: THREE.GLSL3,
uniforms: { time: { value: 0 }, color: { value: new THREE.Color(0x1fb5a8) } },
vertexShader: `uniform float time; void main(){ vec3 p=position; p.z+=sin(p.x*4.0+time)*0.15; gl_Position=projectionMatrix*modelViewMatrix*vec4(p,1.0); }`,
fragmentShader: `uniform vec3 color; void main(){ gl_FragColor=vec4(color,1.0); }`
});
scene.add(new THREE.Mesh(new THREE.PlaneGeometry(4, 2), mat));
const clock = new THREE.Clock();
You get back
Four separate problems, each with one cause. Here's what's happening, then the whole material rewritten.
What's wrong
Symptom · Cause · Fix
Teal darker than on the page · THREE.Color(0x1fb5a8) converts your hex to linear values, and a ShaderMaterial writes its output exactly as computed. With no conversion back at the end, mid-tones like your teal come out darker than the same hex in CSS or on a built-in material. · End the fragment shader with #include <tonemapping_fragment> and #include <colorspace_fragment>, each on its own line.
Adding GLSL3 broke it · A ShaderMaterial already compiles as GLSL ES 3.00. Setting glslVersion: THREE.GLSL3 only removes the gl_FragColor alias, so a shader that writes gl_FragColor stops compiling. The two includes above also need that alias. · Delete the glslVersion line.
A flat sheet that tilts · PlaneGeometry(4, 2) has one segment each way: four corner vertices and nothing in between. The shader can only move those four corners, so the whole sheet tips instead of rippling. · Subdivide it: PlaneGeometry(4, 2, 160, 80).
new THREE.Clock() · Clock is deprecated as of r183. · THREE.Timer, with timer.connect(document) once and timer.update() at the start of each frame.
First part of a run in Claude (Opus 5.5), Nov 2026
What it does
- Passes values like time and colour into shaders.
- Extends the built-in materials.
- Ports shaders to the newer WebGPU set-up.
What's inside
threejs-shaders/CREDITS.mdthreejs-shaders/LICENSEthreejs-shaders/SKILL.md
How you use it
- Get the skill: one zip file. It comes with every paid plan.
- Add it to Claude. In Claude, open Customize (Plugins on newer screens), then Skills. Press +, then Create skill, then Upload a skill. In Claude Code, unzip it into ~/.claude/skills/ instead.
- Start a new chat and tell Claude what you need, the way the example above does. The skill takes it from there.
- Then ask for the work. Claude reaches for the skill when it fits, or name it: "use threejs-shaders".
Get this skill with a paid plan
The download comes with every paid plan, along with all 204 Claude skills and the rest of the AI toolkit. “Sites that don't look templated” in this folder is free, so you can try one first.