r3f-performance-optimization
Use when optimizing React Three Fiber scenes, experiencing frame drops, high draw calls, or implementing 3D performance features - ensures systematic…
Skill by nocksock
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/nocksock-r3f-performance-optimization
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/r3f-performance-optimization
What's inside
- Skill name
r3f-performance-optimization- Description
- Use when optimizing React Three Fiber scenes, experiencing frame drops, high draw calls, or implementing 3D performance features - ensures systematic performance analysis and applies proven optimization patterns for smooth 60fps rendering
- License
- MIT
- Instructions
- 273 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# R3F Performance Optimization Skill
## When This Skill Applies
Use this skill when:
- Frame rates drop below 60fps in R3F scenes
- Draw call count exceeds 500-1000
- Implementing new 3D features that may impact performance
- Scene contains many similar objects (>50 meshes)
- Static scenes render continuously
- Performance varies significantly across devices
- Memory usage grows during scene interaction
## Performance Optimization Checklist
When optimizing R3F performance, complete each step systematically:
### ☐ 1. Measure Current Performance
**Required before any optimization:**
```jsx
import { Stats } from '@react-three/drei'
// or
import { Perf } from 'r3f-perf'
<Canvas>
<Stats /> {/* Basic FPS/memory */}
<Perf position="top-left" /> {/* Advanced: calls, triangles, textures */}
<Scene />
</Canvas>
```
**Record baseline metrics:**
- Current FPS (target: 60fps)
- Draw call count (target: <500, max: 1000)
- Triangle/vertex count
- Memory usage patterns
### ☐ 2. Enable On-Demand Rendering
**For static or mostly-static scenes:**
```jsx
<Canvas frameloop="demand">
{/* Only renders when props change or invalidate() called */}
</Canvas>
```
**With manual control:**
```jsx
const { invalidate } = useThree()
// Before animation starts
invalidate()
requestAnimationFrame(() => {
// Synchronous animation
})
```
**Impact**: Can reduce CPU/GPU usage by 90%+ for static scenes.
### ☐ 3. Apply Instancing for Repeated Objects
**When drawing >50 similar objects:**
Replace individual meshes:
```jsx
// BEFORE: 1000 draw calls
{objects.map(obj => <mesh key={obj.id} geometry={...} material={...} />)}
```
With InstancedMesh:
```jsx
// AFTER: 1 draw call
<instancedMesh args={[geometry, material, 1000]}>
{/* Manage transforms programmatically */}
</instancedMesh>
```
**Impact**: 100-1000x draw call reduction.
### ☐ 4. Implement Level of Detail (LOD)
**For objects at varying distances:**
```jsx
import { Detailed } from '@react-three/drei'
<Detailed distances={[0, 10, 20]}>
<HighPolyMesh /> {/* 0-10 units from camera */}
<MediumPolyMesh /> {/* 10-20 units */}
<LowPolyMesh /> {/* 20+ units */}
</Detailed>
```
**Impact**: Reduces vertex processing for distant objects without visible quality loss.
### ☐ 5. Reuse Geometries and Materials
**Create once, reference many times:**
```jsx
// WRONG: Creates new geometry/material per mesh
function Cubes() {
return cubes.map(cube => (
<mesh>
<boxGeometry />
<meshStandardMaterial />
</mesh>
))
}
// CORRECT: Shared resources
const sharedGeometry = new THREE.BoxGeometry()
const sharedMaterial = new THREE.MeshStandardMaterial()
function Cubes() {From nocksock/superpowers, MIT.
More from nocksock/superpowers
- 0.432score
deep-work-session
nocksock
Use when user explicitly mentions 'deep work' or signals substantial work ('let's build/implement X').
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
holistic-view
nocksock
Use this when given larger tasks, before starting the implementation, or during code reviews.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
jotai-atom-architecture
nocksock
Use when designing Jotai state architecture, setting up atom composition patterns, managing large objects, or debugging re-render issues - ensures proper atom…
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
making-commits
nocksock
Use when ready to commit code changes.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
component-authoring
nocksock
Use this when writing any kind of UI components in any language (heex, react, web components, and so on).
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
session-handoff
nocksock
Use when approaching context limits (75-85%) to write comprehensive handoff documents for session continuity.
SkillDFreshness: D★ 1Claude Code +9 - 0.431score
code-cleanup
nocksock
Use when asked to clean up code, or after introducing a new larger feature.
SkillDFreshness: D★ 1Claude Code +9 - 0.423score
prioritise-todos
nocksock
Use this to rate and prioritise todos
SkillDFreshness: D★ 1Claude Code +9 - 0.423score
elixir-code
nocksock
ALWAYS use this skill, whenever you touch elixir code
SkillDFreshness: D★ 1Claude Code +9 - 0.423score
find-code-todos
nocksock
Use this to find todos in the source code
SkillDFreshness: D★ 1Claude Code +9 - 0.409score
brainstorming
nocksock
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior.
SkillDFreshness: D★ 1Claude Code +9 - 0.407score
finishing-a-development-branch
nocksock
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting…
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 18, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/nocksock/superpowers
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from nocksock
- 0.432score
making-commits
nocksock
Use when ready to commit code changes.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
jotai-atom-architecture
nocksock
Use when designing Jotai state architecture, setting up atom composition patterns, managing large objects, or debugging re-render issues - ensures proper atom…
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
deep-work-session
nocksock
Use when user explicitly mentions 'deep work' or signals substantial work ('let's build/implement X').
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
holistic-view
nocksock
Use this when given larger tasks, before starting the implementation, or during code reviews.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
component-authoring
nocksock
Use this when writing any kind of UI components in any language (heex, react, web components, and so on).
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
session-handoff
nocksock
Use when approaching context limits (75-85%) to write comprehensive handoff documents for session continuity.
SkillDFreshness: D★ 1Claude Code +9
Cite this page
r3f-performance-optimization skill. Agent Mart. https://agentmart.dev/skills/nocksock-r3f-performance-optimization (last updated 2026-10-24)