r3f-shaders — React Three Fiber skill for GLSL materials
r3f-shaders — a coding-agent skill for custom GLSL and TSL shaders in React Three Fiber. It covers uniforms, vertex deformation, and shader debugging.
no license 2,200 installs ★ 138 updated 2026-08-31
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a claude-codeWhat r3f-shaders does
The skill lays out two routes: GLSL materials for WebGL through shaderMaterial, and TSL for WebGPU. Before picking one, it tells the agent to check the installed Fiber, Drei, Three.js, and renderer versions, and to keep whatever the project already uses.
It walks through uniforms too. Drei materials expose accessors like material.uTime; a native ShaderMaterial wants material.uniforms.uTime.value. There is a note on coordinate spaces — normals, light directions, and view directions need to share one — plus color handling and the geometry density required for vertex deformation.
A warning sits around onBeforeCompile: it is only worth using when the built-in lighting matters. Shader chunk names shift between Three.js versions, so the skill pushes for a render test after upgrades.
What it helps with
- write a custom GLSL shader for a WebGL scene
- wire uniforms and animate them in
useFrame - sort out color spaces and tone mapping
- decide between
onBeforeCompileand node materials - avoid breaking the shader with backticks in the GLSL string
Example prompts for the agent
- Make an animated wave material for a plane in my scene
- Add a uniform color and time to this GLSL shader
- Why doesn't my shader get lit or cast shadows?
How to install r3f-shaders
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a claude-code2Manually: put the files in place
~/.claude/skills/r3f-shaders/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/r3f-shaders/
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a codex2Manually: put the files in place
.agents/skills/r3f-shaders/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a cursor2Manually: put the files in place
.cursor/skills/r3f-shaders/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install EnzeD/r3f-skills skills/r3f-shaders2Manually: put the files in place
.github/skills/r3f-shaders/SKILL.md1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a gemini-cli2Platform CLI
gemini skills install https://github.com/EnzeD/r3f-skills --path skills/r3f-shadersManually: put the files in place
.devin/skills/r3f-shaders/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about r3f-shaders
How do I install r3f-shaders in Claude Code?
Run npx skills add EnzeD/r3f-skills --skill r3f-shaders -a claude-code. The skill lands in ~/.claude/skills/r3f-shaders/SKILL.md.
What does r3f-shaders do?
It guides the agent through custom GLSL and TSL materials in React Three Fiber: uniforms, vertex deformation, color spaces, and onBeforeCompile.
Does WebGPU need a different approach?
Yes. For WebGPU the skill points to node materials and TSL, since GLSL ShaderMaterial and onBeforeCompile do not port to that renderer.