r3f-animation — Claude Code skill: animating Three Fiber objects
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.
npx skills add EnzeD/r3f-skills --skill r3f-animation -a claude-codeWhat r3f-animation does
The skill provides ready-made patterns for animating 3D scenes: damping that returns to rest, synchronization with Rapier physics, playback of authored GLTF clips via Drei. An example with useFrame and MathUtils.damp shows how to smoothly interpolate object position between target values, driven by React state (active, open) independent of frame rate.
The skill clarifies key decisions: when to use useFrame for continuous transforms, when to reach for Drei useAnimations for baked clips, when to hand control to Rapier for physics-driven motion. It covers performance pitfalls: proper use of delta time in velocity integration, vector and quaternion reuse, explicit pause for expensive animation, and respect for reduced-motion preferences.
Requires Fiber 9, Drei, and React 19 or compatible versions. If your project already has a spring library or animation system, the skill suggests checking peer dependencies before adding new tools and avoiding a state manager solely for mesh animation.
What it helps with
- Smoothly move an object between two states without jumps or overshooting
- Play back stored GLTF animations for multiple instances of the same model
- Synchronize mesh movement with the Rapier physics engine instead of fighting the simulation
- Optimize animation: avoid vector allocation every frame, handle varying refresh rates correctly
- Stop expensive animations when an object is hidden or the window loses focus
Example prompts for the agent
- Add damping animation so the object transitions smoothly along the X axis when state changes
- Set up GLTF clip playback for two model instances running different actions independently
- Help sync animation motion with Rapier physics instead of directly changing position
How to install r3f-animation
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-animation -a claude-code2Manually: put the files in place
~/.claude/skills/r3f-animation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/r3f-animation/
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-animation -a codex2Manually: put the files in place
.agents/skills/r3f-animation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-animation -a cursor2Manually: put the files in place
.cursor/skills/r3f-animation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install EnzeD/r3f-skills r3f-animation2Manually: put the files in place
.github/skills/r3f-animation/SKILL.md1Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-animation -a gemini-cli2Platform CLI
gemini skills install https://github.com/EnzeD/r3f-skills --path skills/r3f-animationManually: put the files in place
.devin/skills/r3f-animation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add EnzeD/r3f-skills --skill r3f-animation -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-animation
How do I install r3f-animation in Claude Code?
Run npx skills add EnzeD/r3f-skills --skill r3f-animation -a claude-code, then add the path ~/.claude/skills/r3f-animation/SKILL.md to your Claude Code config.
What does r3f-animation do?
It provides patterns for animating 3D objects via useFrame with damping, playing GLTF clips, and coordinating with physics engines. Includes examples and performance optimization guidance.
What versions of Three Fiber does it require?
Examples target Fiber 9 and React 19. Check your installed versions first; the skill may work with compatible versions but without guarantees for older releases.