r3f-best-practices
Skill by zebbern
r3f-best-practices is an agent skill with best practice rules for React Three Fiber and the Poimandres ecosystem. It is for developers writing, reviewing, or optimizing R3F code that uses Drei, Zustand, postprocessing, Rapier, or Leva.
Install r3f-best-practices
Built from the published package, never by AI.
git clone --depth 1 https://github.com/zebbern/claude-code-guide /tmp/claude-code-guide && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-guide/skills/r3f-best-practices ~/.claude/skills/r3f-best-practicesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/zebbern/claude-code-guide /tmp/claude-code-guide && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-guide/skills/r3f-best-practices ~/.gemini/antigravity-cli/skills/r3f-best-practicesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
r3f-best-practices is an agent skill that gives an AI assistant guidance on React Three Fiber and the Poimandres ecosystem. It covers @react-three/fiber, @react-three/drei, zustand, @react-three/postprocessing, @react-three/rapier, and leva. The rules are grouped into categories with priority levels, such as performance and re-renders, useFrame and animation, and component patterns.
The skill includes a quick reference listing rule names with one-line summaries, plus critical code patterns. These cover avoiding setState in useFrame, using Zustand selectors, using useGLTF with preloading, and toggling visibility instead of remounting. The source says only seven rule files ship with this copy, so other rules are described only by their summaries. It is aimed at developers writing, reviewing, or optimizing R3F code. The skill is MIT licensed and credits 100 Three.js Tips by Utsubo.
Written from the project's SKILL.md and checked against it.
What it can do
- Performance and re-rendersRules for avoiding unnecessary re-renders, such as never calling setState in useFrame.
- useFrame and animationGuidance on priority, delta time, render-on-demand, and keeping heavy work out of useFrame.
- Component patternsRules for JSX elements, attach, primitive, extend, forwardRef, and dispose handling.
- Canvas and setupGuidance on canvas sizing, camera configuration, WebGL config, shadows, and frameloop modes.
- Drei helpersUsage rules for useGLTF, useTexture, Environment, OrbitControls, Html, Text, and other Drei helpers.
- Loading and SuspenseRules for Suspense, asset preloading, useProgress, lazy loading, and loading errors.
- State managementRules for focused Zustand stores, subscriptions, persistence, and separating concerns.
- Events and interactionRules for pointer events, propagation, cursor changes, raycast filtering, and event data.
- Post-processingRules for EffectComposer, common effects, selective bloom, custom shaders, and performance.
- Physics and LevaRules for Rapier body types, colliders, collision events, and Leva debug GUI usage.
Try asking
- Review my R3F component and flag any setState calls inside useFrame.
- Show me how to use Zustand selectors in a React Three Fiber scene.
- Explain how to preload a GLB model with useGLTF in my Drei project.
Good to know
- Only seven rule files ship with this copy.
- Other rules are available only as one-line summaries.
- The source does not describe a runtime or tool interface.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/r3f-best-practices/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
rules/_sections.md2 KB -
rules/drei-use-gltf.md3 KB -
rules/frame-delta-time.md3 KB -
rules/loading-suspense.md4 KB
Show all 9 files
-
rules/perf-never-set-state-in-useframe.md3 KB -
rules/perf-r3f-perf.md2 KB -
rules/perf-visibility-toggle.md2 KB -
rules/perf-zustand-selectors.md3 KB
Alternatives to r3f-best-practices
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
r3f-best-practices: common questions
What libraries does r3f-best-practices cover?
The skill covers @react-three/fiber, @react-three/drei, zustand, @react-three/postprocessing, @react-three/rapier, and leva. It is written for the Poimandres ecosystem as a whole.
Is r3f-best-practices free to use?
The skill is listed under the MIT license in its SKILL.md metadata. The source does not mention pricing.
Does the skill include full examples for every rule?
No. The source says only seven rule files ship with this copy, and other rules are described by one-line summaries.
How do I install r3f-best-practices?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is r3f-best-practices free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is r3f-best-practices safe to use?
It scores 88 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to r3f-best-practices?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
