skills/react-three-fiber/SKILL.md
You are an expert in React Three Fiber (R3F), the React renderer for Three.js that lets developers build 3D scenes using JSX components. You help teams create interactive 3D websites, product configurators, data visualizations, games, and immersive experiences — using React patterns (hooks, state, props, suspense) instead of imperative Three.js code, with full access to the Three.js ecosystem.
npx skillsauth add tusosos/manus-knowledge-base react-three-fiberInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in React Three Fiber (R3F), the React renderer for Three.js that lets developers build 3D scenes using JSX components. You help teams create interactive 3D websites, product configurators, data visualizations, games, and immersive experiences — using React patterns (hooks, state, props, suspense) instead of imperative Three.js code, with full access to the Three.js ecosystem.
import { Canvas } from "@react-three/fiber";
function App() {
return (
<Canvas
camera={{ position: [0, 2, 5], fov: 50 }}
dpr={[1, 2]} // Adaptive pixel ratio
gl={{ antialias: true, alpha: true }}
shadows // Enable shadow maps
>
<ambientLight intensity={0.4} />
<directionalLight position={[5, 5, 5]} castShadow />
<mesh position={[0, 1, 0]} castShadow>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color="orange" />
</mesh>
<mesh rotation={[-Math.PI / 2, 0, 0]} receiveShadow>
<planeGeometry args={[10, 10]} />
<meshStandardMaterial color="#444" />
</mesh>
</Canvas>
);
}
import { useFrame, useThree, useLoader } from "@react-three/fiber";
import { useRef } from "react";
import * as THREE from "three";
function SpinningBox() {
const meshRef = useRef<THREE.Mesh>(null);
const { viewport, camera } = useThree(); // Access Three.js internals
// Runs every frame (60fps game loop)
useFrame((state, delta) => {
if (meshRef.current) {
meshRef.current.rotation.y += delta; // Frame-rate independent
// Hover effect: follow mouse
meshRef.current.position.x = THREE.MathUtils.lerp(
meshRef.current.position.x,
(state.pointer.x * viewport.width) / 2,
0.1,
);
}
});
return (
<mesh ref={meshRef}>
<boxGeometry />
<meshStandardMaterial color="hotpink" />
</mesh>
);
}
import { useGLTF, useAnimations } from "@react-three/drei";
import { useEffect } from "react";
function Character({ animation = "idle" }) {
const { scene, animations } = useGLTF("/models/character.glb");
const { actions } = useAnimations(animations, scene);
useEffect(() => {
actions[animation]?.reset().fadeIn(0.3).play();
return () => { actions[animation]?.fadeOut(0.3); };
}, [animation, actions]);
return <primitive object={scene} scale={1.5} />;
}
useGLTF.preload("/models/character.glb");
function InteractiveBox() {
const [hovered, setHovered] = useState(false);
const [clicked, setClicked] = useState(false);
return (
<mesh
scale={clicked ? 1.5 : 1}
onClick={() => setClicked(!clicked)}
onPointerOver={() => setHovered(true)}
onPointerOut={() => setHovered(false)}
>
<boxGeometry />
<meshStandardMaterial color={hovered ? "hotpink" : "orange"} />
</mesh>
);
}
// R3F raycasts pointer events automatically — same API as DOM events
npm install three @react-three/fiber
npm install @react-three/drei # Essential helpers
npm install @react-three/postprocessing # Visual effects
requestAnimationFrame; useFrame integrates with R3F's render loop@react-three/drei for OrbitControls, Environment, Text, Html, loaders; saves weeks of work<Canvas> children in <Suspense fallback={...}> for loading states.glb format; compress with Draco (npx gltfjsx model.glb --draco); preload with useGLTF.preload<AdaptiveDpr> and <PerformanceMonitor> from Drei; degrade quality on slow devicesonClick, onPointerOver work like DOM events on any mesh<Instances> or <InstancedMesh> for 100+ identical objects (trees, particles, stars)tools
Download video and audio from YouTube and other platforms with yt-dlp. Use when a user asks to download YouTube videos, extract audio from videos, download playlists, get subtitles, download specific formats or qualities, batch download, archive channels, extract metadata, embed thumbnails, download from social media platforms (Twitter, Instagram, TikTok), or build media ingestion pipelines. Covers format selection, audio extraction, playlists, subtitles, metadata, and automation.
development
Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
development
Use when you have a spec or requirements for a multi-step task, before touching code