Three.js Builder Skill

SkillAI & models

Three.js app builder: imperative, React Three Fiber, and WebGPU in 4 phases.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Three.js Builder Skill skill

What this skill tells your AI

The instructions your AI receives, as published by notque/vexjoy-agent in skills/frontend/threejs-builder/SKILL.md and read by ahel’s review.

Overview

This skill builds complete Three.js web applications using a Phased Construction pattern with four phases: Design, Build, Animate, Polish. It supports three paradigms — imperative Three.js, React Three Fiber (R3F), and WebGPU — detected automatically from project context. Only the relevant paradigm's reference is loaded.

Scope: Use for 3D web apps, interactive scenes, WebGL/WebGPU visualizations, R3F declarative 3D, and product viewers. For game engines, 3D model creation, VR/AR experiences, or CAD workflows, use a more specialized skill.


Reference Loading Table

SignalLoad These FilesWhy
@react-three/fiber, r3f, drei, useFrame, <Canvas>, <mesh>, React project with 3Dreact-three-fiber.mdReact Three Fiber
WebGPURenderer, TSL, tsl, compute shader, wgsl, node material, WebGPU mentionedwebgpu.mdWebGPU
Standalone HTML, CDN imports, new THREE.Scene(), no React, vanilla JS/TSadvanced-topics.md (load as needed)`Imperative
Game project: EventBus, GameState, player controller, enemies, scoring, multiple game systemsgame-patterns.md (alongside paradigm reference)`Game architecture
GLTF/GLB model loading, .glb files, animated characters, skeletal rigs, model importgltf-loading.md (alongside paradigm reference)`GLTF loading
references/build-recipes.mdbuild-recipes.mdPhase 2/3 build, error diagnosis
references/advanced-topics.mdadvanced-topics.mdImperative paradigm
references/react-three-fiber.mdreact-three-fiber.mdR3F paradigm
references/webgpu.mdwebgpu.mdWebGPU paradigm
references/visual-polish.mdvisual-polish.mdVisual quality signal
references/gltf-loading.mdgltf-loading.mdGLTF/GLB model loading signal
references/game-patterns.mdgame-patterns.mdGame project signal
references/game-architecture.mdgame-architecture.mdGame project signal
references/shader-patterns.mdshader-patterns.mdCustom GLSL / visual effects
references/performance-patterns.mdperformance-patterns.mdPerformance / many objects
references/advanced-animation.mdadvanced-animation.mdAnimation systems / skeletal rigs

Instructions

Phase 1: DESIGN

Goal: Detect the paradigm, understand what the user wants, and select appropriate components.

Core Constraints:

  • Build only what the user asked for — no speculative features or "while I'm here" additions
  • Detect the paradigm before selecting components — imperative, R3F, and WebGPU have fundamentally different patterns; using the wrong one is the #1 source of bugs
  • Structure through the scene graph — use Group for logical groupings and maintain proper hierarchy
  • Vary style by context — portfolio/showcase use elegant muted palettes; games use bright colors; data viz uses clean lines; backgrounds use subtle slow movement; product viewers use realistic PBR lighting
  • Read repository CLAUDE.md before building — ensure compliance with local development standards

Step 0: Detect paradigm

Scan the user's request, existing project files (package.json, imports), and stated requirements to identify which paradigm applies:

SignalParadigm / ContextReference to Load
@react-three/fiber, r3f, drei, useFrame, <Canvas>, <mesh>, React project with 3DReact Three Fiberreferences/react-three-fiber.md
WebGPURenderer, TSL, tsl, compute shader, wgsl, node material, WebGPU mentionedWebGPUreferences/webgpu.md
Standalone HTML, CDN imports, new THREE.Scene(), no React, vanilla JS/TSImperativereferences/advanced-topics.md (load as needed)
Game project: EventBus, GameState, player controller, enemies, scoring, multiple game systemsGame architecturereferences/game-architecture.md + references/game-patterns.md (alongside paradigm reference)
GLTF/GLB model loading, .glb files, animated characters, skeletal rigs, model importGLTF loadingreferences/gltf-loading.md (alongside paradigm reference)

If ambiguous (e.g., user says "3D scene" with no project context), ask which paradigm — don't guess, because imperative Three.js patterns actively conflict with R3F patterns (OrbitControls setup, animation loops, component lifecycle).

Game and GLTF references load alongside the paradigm reference — they are complementary, not alternative. A game project using R3F loads both react-three-fiber.md and the relevant game references.

After detecting paradigm: Read the corresponding reference file. The reference contains paradigm-specific patterns, failure modes, and component selection guidance that override the generic steps below.

Additional reference loading signals (visual-polish, shader-patterns, performance-patterns, advanced-animation) are listed in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 1: Additional Reference Loading Signals).

Step 1: Identify the core visual element

Determine from the user request:

  • What is the primary 3D content? (geometric shapes, loaded model, particles, terrain)
  • What interaction is needed? (none, orbit, click, mouse tracking)
  • What animation brings it to life? (rotation, oscillation, morphing, physics)
  • What is the context? (portfolio, game, data viz, background, product viewer)

Step 2: Select components

See the Scene Plan template in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 1: Scene Plan Template).

Step 3: Document visual style

Record the visual direction for this scene (e.g., "elegant minimal portfolio style", "vibrant interactive game", "clean data visualization"). Use this to guide material colors, lighting warmth, and animation pacing.

Gate: Scene plan documented with geometry, material, lighting, animation, and controls selected. Proceed only when gate passes.

Phase 2: BUILD

Goal: Construct the scene with proper structure and modern patterns.

Paradigm-specific build instructions: If you loaded a paradigm reference in Step 0, follow its build patterns instead of the imperative defaults. R3F uses JSX components and <Canvas>, not manual renderer setup. WebGPU uses WebGPURenderer with different initialization. The reference file is authoritative for its paradigm.

Core constraints for the imperative paradigm (single HTML, resize handling, CONFIG object, modular setup functions, three-point lighting, renderer.setAnimationLoop()) are in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 2: Core Constraints).

Step 1: Create HTML boilerplate

See the HTML boilerplate in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 2: HTML Boilerplate).

Step 2: Build scene infrastructure

See the scene infrastructure code (CONFIG object, scene/camera/renderer setup, resize handler) in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 2: Scene Infrastructure).

Step 3: Add lighting, geometry, and materials per scene plan

Build each component from the Phase 1 plan. Create geometry once and reuse where possible (avoid allocating new geometries in animation loops). Use Group for hierarchical transforms and logical scene organization.

Gate: Scene renders without errors. All planned geometry, materials, and lights are present. Proceed only when gate passes.

Phase 3: ANIMATE

Goal: Add motion, interaction, and life to the scene.

Paradigm-specific animation: R3F uses useFrame hooks (never requestAnimationFrame or setAnimationLoop). WebGPU may use compute shaders for GPU-driven animation. See the loaded paradigm reference for patterns.

Core constraints for the imperative paradigm (no geometry/material allocation in the loop, time parameter usage, OrbitControls default, transform-only-per-frame) are in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 3: Core Constraints).

Step 1: Set up animation loop

See the animation loop pattern in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 3: Animation Loop).

Step 2: Implement planned animations

Apply transforms per frame. Time-based animation follows the pattern shown in references/build-recipes.md.

Step 3: Add interaction handlers

Wire up mouse/touch events, orbit controls, or raycasting per the scene plan.

Gate: Animations run smoothly. Interactions respond correctly. No console errors. Proceed only when gate passes.

Phase 4: POLISH

Goal: Ensure quality, performance, and completeness.

Core constraints (remove debug helpers / commented code, handle window resize, ensure visible lighting, match visual style) and the four verification steps (responsive behavior, visual quality, output testing, cleanup) are in ${CLAUDE_SKILL_DIR}/references/build-recipes.md (Phase 4: Core Constraints + Polish Verification Steps).

Gate: All verification steps pass. Output is complete and ready to deliver.


Error Handling

See ${CLAUDE_SKILL_DIR}/references/build-recipes.md for error cases: black screen / nothing renders, OrbitControls not defined, model loads but is invisible or tiny.


References

ReferenceWhen to LoadContent
references/build-recipes.mdPhase 2/3 build, error diagnosisHTML boilerplate, CONFIG + scene/camera/renderer setup, animation loop, error handling (black screen, OrbitControls, model scale)
references/advanced-topics.mdImperative paradigmGLTF loading, post-processing, shaders, raycasting, physics, InstancedMesh, TypeScript
references/react-three-fiber.mdR3F paradigmDeclarative patterns, Drei helpers, camera pitfalls, post-processing, Zustand, performance
references/webgpu.mdWebGPU paradigmWebGPURenderer, TSL shaders, compute shaders, version-specific changes, device loss
references/visual-polish.mdVisual quality signalMaterial recipes, dramatic lighting, post-processing stacking, HDR environments, shadow quality
references/gltf-loading.mdGLTF/GLB model loading signalCoordinate system contract, SkeletonUtils.clone, model caching, auto-centering, bone hierarchy, asset manifest
references/game-patterns.mdGame project signalAnimation state machine, camera-relative movement, delta capping, mobile input, player controller
references/game-architecture.mdGame project signalEventBus, GameState singleton, Constants module, restart-safety, pre-ship checklist
references/shader-patterns.mdCustom GLSL / visual effectsShaderMaterial vs RawShaderMaterial, vertex displacement, fragment effects (holographic, dissolve, chromatic aberration), EffectComposer postprocessing pipeline
references/performance-patterns.mdPerformance / many objectsInstancedMesh, BufferGeometry typed arrays, draw call batching, LOD, KTX2 textures, dispose patterns
references/advanced-animation.mdAnimation systems / skeletal rigsAnimationMixer morph targets, bone manipulation, procedural IK, spring physics, GSAP integration, particle animation

Signals

GitHub stars
419
Forks
44
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
threejs-builder
Source
github.com/notque/vexjoy-agent