Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add EnzeD/r3f-skills --skill r3f-shaders -a claude-code
Open on GitHub

What 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 onBeforeCompile and 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-code

2Manually: put the files in place

~/.claude/skills/r3f-shaders/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/r3f-shaders/

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.

Similar skills

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

From the same set11

The whole set →
r3f-fundamentals r3f-fundamentals — a skill that teaches the agent to build React Three Fiber scenes: Canvas, typed JSX, render-loop hooks, and resource ownership. For scene architecture, not detailed materials. CX Codex +1 2,400installs r3f-postprocessing r3f-postprocessing — a skill that walks the agent through postprocessing in React Three Fiber: glow on chosen meshes, depth of field, SSAO. Useful when the render looks off and you cannot pin down why. CX Codex +1 2,300installs r3f-animation r3f-animation — a skill for smooth animation of 3D objects in React Three Fiber using useFrame, damping, and GLTF clips. Useful for procedural motion, state transitions, and on-demand animation control. CX Codex +1 2,300installs r3f-lighting r3f-lighting is a Claude Code skill for lighting React Three Fiber scenes with direct lights, environments, and shadows. It helps investigate shadow artifacts and render costs. CX Codex +1 2,200installs r3f-materials r3f-materials — a Claude Code skill that picks React Three Fiber materials for a surface and flags the cheaper options. Also runs in Codex, Cursor, Copilot, Gemini CLI and OpenCode. CX Codex +1 2,200installs r3f-geometry r3f-geometry guides an agent through geometry, custom buffers, points, lines, and instancing in React Three Fiber. Useful when shaping objects or reducing draw calls. CX Codex +1 2,200installs r3f-loaders r3f-loaders guides 3D asset loading and reuse in React Three Fiber. Helps set up hooks, preloading, scene cloning, and fallback UI. CX Codex +1 2,100installs r3f-physics r3f-physics is a Claude Code skill for adding Rapier physics to React Three Fiber projects. It comes into play when a scene needs collision-based movement or simulation. CX Codex +1 2,100installs

Project sponsors

Companies that keep this analytics open