three.js-skills

技能包编程

一个精选的 Three.js skill集合,为 AI 提供创建 3D 元素和交互体验的基础知识。

已收录 2 篇关联实践,包括:Three.js Skills 发布!0 门槛上手 Three.js!、Three.js Skills 发布!0 门槛上手 Three.js!。

热度2679Star4.5kUpdate2026-10-19
暂无实践

README

前往 Source

Three.js Skills for Claude Code

Skill files that give Claude Code current, verified knowledge of three.js, so the code it writes runs on the release you actually install.

The skills target three.js r186 (three@0.186), React Three Fiber 9.8 with drei 10.7, and gltf-transform 4.5. Rendering examples use WebGLRenderer, directly or through React Three Fiber; the WebGPU and TSL section in every skill covers WebGPURenderer.

Why

Claude Code knows three.js from its training data, which mixes many releases. A lot changed between r160 and r186: RGBELoader became HDRLoader, Clock gave way to Timer, PostProcessing became RenderPipeline, WebGL 1 support is gone, and the three.js docs now tell LLMs to use WebGPURenderer with TSL for custom shaders and materials. These skills give Claude Code the current API, working examples, and a Common Mistakes list of the outdated patterns models still reach for.

Installation

With the skills CLI:

npx skills add cloudai-x/threejs-skills

Or manually. Claude Code loads skills from ~/.claude/skills/ (all your projects) or .claude/skills/ (one project):

git clone https://github.com/CloudAI-X/threejs-skills.git

# all your projects
mkdir -p ~/.claude/skills && cp -r threejs-skills/skills/* ~/.claude/skills/

# or one project (run from the project root)
mkdir -p .claude/skills && cp -r threejs-skills/skills/* .claude/skills/

Skills Included

SkillCovers
threejs-fundamentalsScene, cameras, renderer setup, animation loop, object hierarchy, transforms
threejs-geometryBuilt-in shapes, BufferGeometry, merging, instancing, BatchedMesh, points, lines
threejs-materialsMaterial types, PBR, blending, stencil, recompiles, node materials
threejs-lightingLight types and physical units, shadows, HDR environments, light probes
threejs-texturesLoading, color spaces, UV channels, texture types, render targets, memory
threejs-animationKeyframes, the animation mixer, skeletal and morph animation, blending
threejs-loadersglTF with Draco, meshopt and KTX2, other formats, HDR, progress, disposal
threejs-shadersShaderMaterial and RawShaderMaterial, shader chunks, TSL and node materials
threejs-postprocessingEffectComposer, built-in renderer effects, the WebGPU RenderPipeline
threejs-interactionRaycasting, camera controls, transform gizmos, drag and box selection
threejs-performanceMeasuring frame cost, draw calls, GPU memory, fill rate, compile stalls
threejs-react-three-fiberReact Three Fiber 9 and a verified set of drei helpers, on WebGL or WebGPU
threejs-asset-pipelinegltf-transform: Draco, meshopt, KTX2, WebP, and the matching loader setup

How It Works

Claude Code loads a skill when your request matches its description. When you ask it to:

  • create a 3D scene → threejs-fundamentals
  • add lights and shadows → threejs-lighting
  • load a glTF model → threejs-loaders
  • write a custom shader or screen effect → threejs-shaders and threejs-postprocessing
  • make a slow scene faster → threejs-performance
  • build the scene with React → threejs-react-three-fiber
  • shrink a glTF before shipping it → threejs-asset-pipeline

Skill File Structure

Every skill follows the same layout:

---
name: threejs-<topic>
description: "What the skill covers. Use when ..."
---

# Three.js <Topic>

Targets three.js r186. Examples use WebGLRenderer; the WebGPU and TSL section uses WebGPURenderer.

## Quick Start          a complete, runnable example
## <topic sections>     the API with working examples
## WebGPU and TSL       the same topic under WebGPURenderer
## Common Mistakes      outdated or wrong code → the r186 fix, with the reason
## See Also             related skills

Verification

The skills were checked against the published three@0.186.1 package and the official Migration Guide, and against @react-three/fiber@9.8.2, @react-three/drei@10.7.9, @gltf-transform/cli@4.5.1 and gltfjsx@6.5.3 where they apply:

  • every three.js, React Three Fiber, drei and gltf-transform import path, and every THREE.* class used in an example, exists in its package
  • every JavaScript block parses as an ES module
  • shader chunk names exist, and no removed or renamed API appears in example code
  • every gltf-transform command and flag exists in the CLI, and every React Three Fiber element maps to a three.js class
  • every skill was reviewed against the library source, with rendering, timing and shader claims measured where possible

If you find something that is wrong on the current release, please open an issue with the skill name, the line and the three.js version you use.

License

MIT, see LICENSE.

Acknowledgments

  • Three.js - the 3D library these skills document

常见问题

three.js-skills 是什么?
three.js-skills 是一个 AI Agent Skill(智能体技能)。一个精选的 Three.js skill集合,为 AI 提供创建 3D 元素和交互体验的基础知识。
three.js-skills 怎么用?
你可以在 Skill Hub 中国下载 three.js-skills 的 SKILL.md 文件,放入你的项目目录中。AI Agent(如 Claude Code)会自动识别并加载该 Skill,按照其中定义的规则和流程来辅助你完成任务。目前已有 2 篇实践案例可供参考。
three.js-skills 有哪些实践案例?
目前 Skill Hub 中国收录了 2 篇 three.js-skills 的实践案例,涵盖真实项目中的使用场景、操作步骤和踩坑记录。你可以在本页面的「热门实践」区域查看完整列表。
three.js-skills 和 ecc-agent-harness-os 有什么区别?
three.js-skills 和 ecc-agent-harness-os 都属于「编程」类别的 AI Skill。three.js-skills 主要用于一个精选的 Three.js skill集合,为 AI 提供创建 3D 元素和交互体验的基础知识。。ecc-agent-harness-os 则侧重于ECC 是一个跨 Claude Code、Codex、Cursor、OpenCode、Gemini 等 harness 。你可以根据具体场景选择最合适的 Skill。