Skip to main content
skill CX Codex

r3f-lighting — Claude Code skill: lighting and setup

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.

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-lighting -a claude-code
Open on GitHub

What r3f-lighting does

This skill covers lighting for React Three Fiber scenes: direct sources, environment maps, HDR/EXR assets, Sky, shadows, and materials. It starts by checking the installed Three.js, Fiber, Drei, and renderer versions; its example is aimed at Fiber 9, React 19, and WebGL. The guide includes Canvas shadow settings, shadow-camera bounds, bias, ContactShadows, and AccumulativeShadows.

It also explains how to narrow a shadow frustum, verify castShadow and receiveShadow, compare static and animated captures, and count render passes. RectAreaLight gets a separate WebGL caveat, while moving light targets requires a scene-linked target whose world matrix updates. A detached target can leave the light pointing at an old transform.

What it helps with

  • set up direct and environment lighting for a PBR scene
  • trace acne and detached-shadow artifacts
  • tune the shadow camera bounds and map size
  • measure the cost of contact and point-light shadows

Example prompts for the agent

  • Set up lighting for this React Three Fiber scene with direct lights, an environment, and shadows.
  • Investigate the model’s shadow acne and separation, then tune bias and the shadow-camera settings.
  • Compare static and animated ContactShadows and identify the render passes to measure.

How to install r3f-lighting

1Skills CLI (Vercel)

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

2Manually: put the files in place

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

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

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

Questions about r3f-lighting

How do I install r3f-lighting in Claude Code?

Run npx skills add EnzeD/r3f-skills --skill r3f-lighting -a claude-code, then check ~/.claude/skills/r3f-lighting/SKILL.md.

What does r3f-lighting do?

It guides React Three Fiber lighting work with direct sources, environment lighting, shadows, and material setup. It also covers shadow artifacts and rendering cost.

What should I check before configuring shadows?

Check the installed Three.js, Fiber, Drei, and renderer versions first. Shadowing also needs renderer shadows, a shadow-casting light, casting geometry, and receiving materials.

Similar skills

All skills for Frontend and UI →

From the same set11

The whole set →
r3f-interaction 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,600installs 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-shaders r3f-shaders — a coding-agent skill for custom GLSL and TSL shaders in React Three Fiber. It covers uniforms, vertex deformation, and shader debugging. 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

Project sponsors

Companies that keep this analytics open