
threejs-dev-setup
Bootstrap and toolchain guidance for three.js applications using npm, Vite/Webpack/Rollup, bare ESM import maps, and TypeScript. Covers canonical import paths for three core versus three/addons/ (examples/jsm re-exports), version alignment with https://threejs.org/docs/, and fixing "module not found" for loaders and controls. Use when scaffolding a new 3D project, migrating bundler, or debugging resolution of addons—do not use for rendering API details (see threejs-renderers) or asset loading logic (see threejs-loaders).
- Installs
- 389
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-dev-setup- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads threejs-dev-setup automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
When to use this skill
ALWAYS use this skill when the user mentions:
- Creating or configuring a new three.js project, Vite/Webpack/Rollup entry, or browser
importmap - Installing the
threepackage, aligning version with documentation, or TypeScript setup (@types/threewhere applicable) - Import errors for
three/addons/...,examples/jsm, ESM vs CJS interop, or bare specifier resolution
IMPORTANT: this skill vs runtime topics
- threejs-dev-setup = install paths, bundler, module graph, and where to import addons from.
- threejs-renderers =
WebGLRenderer/WebGPURenderer, canvas, pixel ratio, render loop—after the project loads. - threejs-loaders =
GLTFLoader,DRACOLoader, progress callbacks—after imports resolve.
Trigger phrases include:
- "vite three.js", "webpack three", "import map", "three/addons", "cannot find module", "jsm"
- "新建项目", "安装 three", "找不到模块", "ESM", "TypeScript three"
How to use this skill
- Confirm delivery model: SPA bundler (Vite/Webpack), Node tooling, or static HTML with
importmap—each affects howthree/addons/resolves. - Pin
threeversion to a release compatible with the docs the user cites; note that addon paths follow the published package layout. - Show canonical imports: core from
three; controls/loaders/effects fromthree/addons/...(mapped toexamples/jsmin source tree). See examples/workflow-scaffold.md. - Minimal loop: create renderer + scene + camera + one mesh;
requestAnimationFrame—enough to verify toolchain without duplicating threejs-renderers depth. - TypeScript: enable
moduleResolutionappropriate for bundler; reference types fromthreepackage typings; avoid duplicating global script tag patterns unless user targets no-bundler HTML. - On failure: distinguish missing dependency vs wrong path vs SSR context (no
window/document). - Deepening: link user to three.js manual first chapter after scaffold works.
Doc map (official)
| Docs section | Representative links |
|---|---|
| Manual (getting started) | https://threejs.org/manual/ |
| Docs index | https://threejs.org/docs/ |
| Package / install context | https://www.npmjs.com/package/three |
Scope
- In scope: npm/install, bundlers, import maps, TypeScript basics for three, addon import paths, minimal verification snippet.
- Out of scope: WebGL theory, full render target or post stack (threejs-renderers, threejs-postprocessing), physics, deployment beyond "build runs".
Common pitfalls and best practices
- Mixing multiple
threecopies in one page breaks singletons; dedupe with bundler aliases. - Importing addons from deep
node_modules/.../examples/jsmpaths is fragile; prefer package exportsthree/addons/...when available. - Always match r152+ style color management docs when giving snippet defaults (output color space)—point to threejs-renderers/textures for details.
- SSR frameworks need dynamic import or client-only components for WebGL context.
Documentation and version
Toolchain and import paths follow the three npm package version the user installs. The Manual and docs are updated with the library; addon paths (three/addons/...) must match the package layout for that release—when in doubt, cite the version number and the exact import line from the current docs.
Agent response checklist
When answering under this skill, prefer responses that:
- Name the bundler or runtime (Vite, Webpack, bare ESM,
importmap) and the intendedthreeversion. - Link https://threejs.org/manual/ and/or https://threejs.org/docs/ for authoritative setup context.
- Distinguish threejs-dev-setup (resolution) from threejs-renderers (runtime API) failures.
- Never assume global script tags unless the user explicitly uses CDN/no-bundler HTML.
- Recommend deduplicating
threeinpackage.json/ lockfile when duplicate singleton issues appear.
References
Keywords
English: three.js, vite, webpack, rollup, import map, typescript, npm, three/addons, examples jsm, module resolution, scaffold
中文: three.js 安装、构建、importmap、模块解析、three/addons、脚手架、Vite、Webpack
FAQ
What does the threejs-dev-setup skill do?
Bootstrap and toolchain guidance for three.js applications using npm, Vite/Webpack/Rollup, bare ESM import maps, and TypeScript. Covers canonical import paths for three core versus three/addons/ (examples/jsm re-exports), version alignment with https://threejs.org/docs/, and fixing "module not found" for loaders and controls. Use when scaffolding a new 3D project, migrating bundler, or debugging resolution of addons—do not use for rendering API details (see threejs-renderers) or asset loading logic (see threejs-loaders).
How do I install threejs-dev-setup?
Run npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-dev-setup in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/threejs-dev-setup/ (personal) or .claude/skills/threejs-dev-setup/ (project).
Which AI agents can use threejs-dev-setup?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is threejs-dev-setup safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains threejs-dev-setup?
It is published by full-stack-skills in full-stack-skills/threejs-skills. It has 389 recorded installs.
More from full-stack-skills/threejs-skills
threejs-postprocessing
full-stack-skills/threejs-skills
Addon screen-space post-processing for three.js using EffectComposer, Pass base class, RenderPass, and stock passes such as UnrealBloomPass, SSAOPass, SSRPass, BokehPass, OutlinePass, FXAAPass/SMAAPass, TAARenderPass, and ShaderPass; references the Shaders addon group for underlying shader modules; contrasts with core PostProcessing class used in node/WebGPU stacks (see threejs-node-tsl and threejs-renderers). Use when building composer chains—not for basic renderer tone mapping alone (threejs-renderers).
threejs-objects
full-stack-skills/threejs-skills
three.js scene graph objects: Object3D transforms and hierarchy, Group, Mesh, InstancedMesh, SkinnedMesh, BatchedMesh, LOD, Line/LineLoop/LineSegments, Points, Sprite, Bone, Skeleton, ClippingGroup; interaction via Raycaster, Layers masks, and EventDispatcher patterns. Merges the former interaction scope—use for picking and layers; for pure vector math without scene graph use threejs-math; for playing skeletal clips use threejs-animation; for frustum culling internals see camera docs.
threejs-materials
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
threejs-animation
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
threejs-renderers
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
threejs-lights
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.