# Three Best Practices

Three.js performance optimization and best practices guidelines.

- Repository: https://github.com/zebbern/claude-code-guide (4691 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add zebbern/claude-code-guide --skill three-best-practices -g -a claude-code -y`
Codex: `npx skills add zebbern/claude-code-guide --skill three-best-practices -g -a codex -y`
Cursor: `npx skills add zebbern/claude-code-guide --skill three-best-practices -g -a cursor -y`
Gemini CLI: `npx skills add zebbern/claude-code-guide --skill three-best-practices -g -a gemini-cli -y`

## Description

Three.js performance optimization and best practices guidelines. Use when writing, reviewing, or optimizing Three.js code. Triggers on tasks involving 3D scenes, WebGL/WebGPU rendering, geometries, materials, textures, lighting, shaders, or TSL.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Three.js Best Practices

Comprehensive performance optimization guide for Three.js applications. Contains 120+ rules across 18 categories, prioritized by impact.

## Sources & Credits

> This skill compiles best practices from multiple authoritative sources:
> - Official guidelines from Three.js `llms` branch maintained by [mrdoob](https://github.com/mrdoob)
> - [100 Three.js Tips](https://www.utsubo.com/blog/threejs-best-practices-100-tips) by [Utsubo](https://www.utsubo.com) - Excellent comprehensive guide covering WebGPU, asset optimization, and performance tips

## When to Apply

Reference these guidelines when:
- Setting up a new Three.js project
- Writing or reviewing Three.js code
- Optimizing performance or fixing memory leaks
- Working with custom shaders (GLSL or TSL)
- Implementing WebGPU features
- Building VR/AR experiences with WebXR
- Integrating physics engines
- Optimizing for mobile devices

## Rule Categories by Priority

The rest: https://github.com/zebbern/claude-code-guide/blob/HEAD/skills/three-best-practices/SKILL.md
