r3f-animation

r3f-animation is a skill for Claude Code, Codex from zebbern/claude-code-guide. It costs 43 tokens per session (5,938 once invoked), scanned A, original, MIT.

A guide to animating 3D scenes made with React Three Fiber, a React library for building scenes with Three.js. It covers frame-by-frame updates, imported model animations, keyframes, springs, and physics-based motion.

In plain words
What is it for?
Use it to rotate or move meshes, play GLTF model animations, create keyframe or spring motion, and add procedural or physics-based movement.
Why use it?
It gives developers the patterns needed to make 3D objects move over time instead of remaining static. It also explains how to connect animation timing and state to scene objects.

Skill for Claude CodeCodex

About the project

Claude Code Guide is a reference collection for configuring and using Claude Code, Anthropic’s command-line coding agent. Developers use it to learn commands, skills, agents, MCP, automation, security, integrations, and troubleshooting. Its catalogue add-ons provide many of the documented skills and agents.

zebbern/claude-code-guide · 4,600 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/zebbern/claude-code-guide/r3f-animation
Any agent
npx skills add zebbern/claude-code-guide --skill r3f-animation
Clone the repo
git clone --depth 1 https://github.com/zebbern/claude-code-guide

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for r3f-animation

README.md
[![agentmods](https://agentmods.dev/badge/skills/zebbern/claude-code-guide/r3f-animation.svg)](https://agentmods.dev/skills/zebbern/claude-code-guide/r3f-animation)
Your own site
<a href="https://agentmods.dev/skills/zebbern/claude-code-guide/r3f-animation"><img src="https://agentmods.dev/badge/skills/zebbern/claude-code-guide/r3f-animation.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.05938
Opus 5 $0.00022 $0.02969
Sonnet 5 $0.00009 $0.01188
Haiku 4.5 $0.00004 $0.00594

Measured 5d ago against content hash 7f92c4d4eb45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

r3f-animation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/r3f-animation/SKILL.md · 1,007 lines

How it starts

The opening of the file, as written. The whole thing — 1,007 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Three Fiber Animation

Quick Start

import { Canvas, useFrame } from '@react-three/fiber'
import { useRef } from 'react'

function RotatingBox() {
  const meshRef = useRef()

  useFrame((state, delta) => {
    meshRef.current.rotation.x += delta
    meshRef.current.rotation.y += delta * 0.5
  })

  return (
    <mesh ref={meshRef}>
      <boxGeometry />
      <meshStandardMaterial color="hotpink" />
    </mesh>
  )
}

export default function App() {
  return (
    <Canvas>
      <ambientLight />
      <RotatingBox />
    </Canvas>
  )
}

useFrame Hook

The core animation hook in R3F. Runs every frame.

Basic Usage

import { useFrame } from '@react-three/fiber'
import { useRef } from 'react'

function AnimatedMesh() {
  const meshRef = useRef()

  useFrame((state, delta) => {
    // state contains: clock, camera, scene, gl, mouse, etc.
    // delta is time since last frame in seconds

    meshRef.current.rotation.y += delta
  })

  return (
    <mesh ref={meshRef}>
      <boxGeometry />
      <meshStandardMaterial color="orange" />
    </mesh>
  )
}

State Object

useFrame((state, delta, xrFrame) => {
  const {
    clock,           // THREE.Clock
    camera,          // Current camera
    scene,           // Scene
    gl,              // WebGLRenderer
    mouse,           // Normalized mouse position (-1 to 1)
    pointer,         // Same as mouse
    viewport,        // Viewport dimensions
    size,            // Canvas size
    raycaster,       // Raycaster
    get,             // Get current state
    set,             // Set state
    invalidate,      // Request re-render (when frameloop="demand")
  } = state

  // Time-based animation
  const t = clock.getElapsedTime()
  meshRef.current.position.y = Math.sin(t) * 2
})

Render Priority

// Lower numbers run first. Default is 0.
// Use negative for pre-render, positive for post-render

function PreRender() {
  useFrame(() => {
    // Runs before main render
  }, -1)
}

function PostRender() {
  useFrame(() => {
    // Runs after main render
  }, 1)
}

function DefaultRender() {
  useFrame(() => {
    // Runs at default priority (0)
  })
}

Read the full file on GitHub · 1,007 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 1,007 lines · 43 tokens per session scan A 7f92c4d4eb45

Subscribe to this mod's changes

r3f-animation is a skill published in the GitHub repository zebbern/claude-code-guide (4,600 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 5,938 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ad-creative

../../../marketing-skill/skills/ad-creative/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

composio-community/awesome-claude-plugins · 63 tokens

midjourney-replicate-flux

Generate highly detailed, Midjourney-style image prompts optimized for the FLUX 1.1 Pro model on Replicate. Transform basic user descriptions into rich, cinematic prompts with professional photography qualities, dramatic lighting, and editorial-quality aesthetics. Use when users request image generation, need prompt…

rawveg/skillsforge-marketplace · 83 tokens

figlet-text-converter

This skill processes files containing figlet tags and replaces them with ASCII art representations. It detects and preserves comment styles (forward slash forward slash, hash, double-dash, forward slash asterisk), automatically manages Node.js dependencies, and supports 400+ fonts (defaulting to the standard font).…

rawveg/skillsforge-marketplace · 98 tokens

remotion-best-practices

Best practices for Remotion - Video creation in React.

ratnesh-maurya/cursor-claude-personas · 17 tokens

weather-svg-creator

Creates an SVG weather card showing the current temperature for Dubai. Writes the SVG to orchestration-workflow/weather.svg and updates orchestration-workflow/output.md.

shanraisshan/claude-code-best-practice · 36 tokens