r3f-geometry — Claude Code skill for React Three Fiber geometry
Guides an agent through geometry, custom buffers, points, lines, and instancing in React Three Fiber. Useful when shaping objects or reducing draw calls.
npx skills add EnzeD/r3f-skills --skill r3f-geometry -a claude-codeWhat r3f-geometry does
The skill explains when JSX geometry is enough and when to use BufferGeometry, point buffers, or instancing. It compares Drei Instances and Merged with actual geometry merging, and covers attributes, normals, UVs, and object bounds.
It also addresses buffer updates, raycasting, and resource cleanup. For sets that change often, the guidance points to native instancing because declarative instances add React overhead. Check the installed Three.js, Fiber, and Drei versions before applying examples: constructor arguments and helper properties vary between versions.
What it helps with
- choose a geometry representation for an object shape
- reduce draw calls for repeated objects
- update buffer attributes after changing vertices
- configure normals, UVs, and geometry bounds
- check raycast hits and shared resource cleanup
Example prompts for the agent
- Show me how to build this shape with JSX geometry in React Three Fiber.
- Explain how to instance repeated objects and reduce draw calls.
- How should I update
BufferGeometryafter changing vertices while keeping its bounds correct?
How to install r3f-geometry
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-geometry -a claude-code2Manually: put the files in place
~/.claude/skills/r3f-geometry/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/r3f-geometry/
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-geometry -a codex2Manually: put the files in place
.agents/skills/r3f-geometry/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-geometry -a cursor2Manually: put the files in place
.cursor/skills/r3f-geometry/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install EnzeD/r3f-skills r3f-geometry2Manually: put the files in place
.github/skills/r3f-geometry/SKILL.md1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-geometry -a gemini-cli2Platform CLI
gemini skills install https://github.com/EnzeD/r3f-skills --path skills/r3f-geometryManually: put the files in place
.devin/skills/r3f-geometry/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-geometry -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-geometry
How do I install r3f-geometry in Claude Code?
Run npx skills add EnzeD/r3f-skills --skill r3f-geometry -a claude-code. The skill file is at ~/.claude/skills/r3f-geometry/SKILL.md.
What does r3f-geometry do?
It guides an agent in building React Three Fiber geometry, custom buffers, and instanced objects. It also covers attribute updates and checking object bounds.
Does Drei Merged combine arbitrary geometry?
No. Merged builds instancing abstractions from meshes; it does not join arbitrary BufferGeometry objects. For actual merging, the skill points to mergeGeometries in three/addons/utils/BufferGeometryUtils.js.