Skip to main content
skill CX Codex

r3f-materials — Claude Code skill: what it does, how to install

Guides the agent in configuring PBR and transparency in React Three Fiber. Prevents texture color space mistakes and unnecessary GPU overhead.

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

What r3f-materials does

The skill outlines guidelines for choosing surface materials in React Three Fiber. It steers the assistant toward the simplest viable option, favoring meshStandardMaterial or unlit meshBasicMaterial before jumping to costly physical shaders. Color management rules are strict: sRGB for color maps, alongside NoColorSpace for roughness and normal data.

Specific guidance covers transparency and glass rendering. Using alphaTest is recommended for cutouts to prevent alpha blending sort bugs. For realistic transmission, it details how Drei helpers like MeshTransmissionMaterial add extra scene passes and require low initial sample counts.

The examples target Fiber 9 and React 19 under WebGL. Drei shader materials will break if ported directly to WebGPU without switching to TSL. Disposing of a material in Three.js also leaves attached textures in GPU memory unless they are released separately.

What it helps with

  • select the least expensive Three.js material for a mesh
  • configure cutout transparency with alphaTest to avoid depth sorting bugs
  • assign correct color spaces to albedo and roughness textures
  • optimize glass transmission passes to keep GPU draw calls down

Example prompts for the agent

  • Configure a realistic rough gold material using meshStandardMaterial and environment lighting.
  • Set up glass transmission in Drei without hurting render performance.
  • Fix the texture color space setup on this imported model.

How to install r3f-materials

1Skills CLI (Vercel)

npx skills add EnzeD/r3f-skills --skill r3f-materials -a claude-code

2Manually: put the files in place

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

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about r3f-materials

How do I install r3f-materials in Claude Code?

Run npx skills add EnzeD/r3f-skills --skill r3f-materials -a claude-code in your terminal.

What does the r3f-materials skill do?

It teaches coding agents how to configure Three.js materials, transparency, and PBR properties cleanly inside React Three Fiber.

Does disposing a material also free its textures?

No. Disposing a material does not dispose of its textures, so you must manage texture lifecycles independently to avoid memory leaks.

Similar skills

Everything for Frontend and UI →

From the same set9

r3f-interaction Configures pointer events, object picking, dragging, and camera controls in React Three Fiber. Helps avoid input conflicts between 3D scene controls and interactive meshes. CX Codex +1 3,300installs r3f-fundamentals 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,100installs r3f-animation 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,000installs 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 1,900installs 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 1,900installs 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 1,800installs r3f-physics Guides an AI coding agent through adding Rapier physics to React Three Fiber. Use it for collision-based movement, sensors, forces, and joints. CX Codex +1 1,800installs r3f-textures Guidance for configuring textures in React Three Fiber, from color spaces and UV channels to video and render targets. Useful when an image looks wrong or texture memory needs attention. CX Codex +1 1,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor