amnafarzy/ravie/threejs-motion-performance
Claude Code and agent skill by amnafarzy/ravie
- community
Checking that the SKILL.md file is still in the repository.
Use this whenever the work involves Three.js, WebGL, canvas rendering, shaders, or GPU-heavy effects — adding, reviewing, or optimizing frame rate, bundle impact, fallbacks, or memory cleanup. NOT for CSS/JS UI transitions — use animation-motion.
Install
npx vskill@latest install amnafarzy/ravie/threejs-motion-performanceSKILL.md
The same SKILL.md was published earlier as amnafarzy/ravie/threejs-motion-performance.
threejs-motion-performance
Three.js and WebGL performance discipline. Bundle impact, mobile fallbacks, GPU budget, reduced motion, memory management.
Purpose
Ship WebGL/3D content that's fast on real devices, has proper fallbacks, doesn't leak memory, and respects user preferences.
Process
0. Read the UI rule reference first
Before UI work or review, read rules/ui.md and apply the project’s responsive, accessibility, component-state, and design-token expectations.
1. Bundle impact
Three.js is ~150kb gzipped. Import only what you use:
2. Mobile fallback
Always provide a static fallback for devices without WebGL support or insufficient GPU power. Detect and downgrade:
3. GPU budget for mobile
- Draw calls: under 100
- Triangles: under 100k
- Use instanced rendering for repeated objects
- Dispose geometries, materials, textures on component unmount
4. Frame rate monitoring
If fps drops below 30 for 3+ seconds, automatically reduce quality (fewer particles, simpler shaders, lower resolution).
5. Reduced motion
For prefers-reduced-motion: reduce: stop all animation, show a static frame.
Output format
Hard rules
- Always dispose Three.js resources on unmount (memory leaks are silent killers)
- Always provide non-WebGL fallback
- Always test on a low-end mobile device or GPU-throttled DevTools
- Never ship a 3D scene without frame rate monitoring
Connects to
animation-motion— for non-WebGL motion guidelinesui-quality— 3D scenes need responsive handling toodeploy-ready— bundle size is part of deploy readiness
Common failure modes
Memory leaks — Three.js doesn't garbage collect. Geometries, materials, textures need explicit .dispose() on unmount.
Mobile GPU meltdown — 60fps on MacBook, 5fps on iPhone SE. Always test low-end.
Orphaned render loop — requestAnimationFrame keeps running after the component unmounts because nobody called cancelAnimationFrame. The scene is invisible but still burns GPU and battery. Store the RAF id and cancel it in the cleanup function alongside .dispose().
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/threejs-motion-performance/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amnafarzy/ravie/threejs-motion-performance)