threejs-html — Claude Code skill: what it does, how to install
threejs-html — a skill for Claude Code that integrates Three.js canvases into responsive HTML and Next.js apps. It sets up overlays, scroll containers, and multi-view layouts safely.
MIT 597 installs ★ 26 updated 2026-09-10
npx skills add cesartevisual/threejs-skills --skill threejs-html -a claude-codeWhat threejs-html does
This skill guides the agent when embedding Three.js scenes into modern web frameworks. It strictly enforces the client/server boundary: the renderer can only be initialized inside a browser lifecycle, avoiding any access to window or WebGL contexts during server module evaluation.
It requires reserving stable canvas containers in CSS while keeping semantic typography, controls, and form inputs in standard HTML. To keep interaction clean, pointer routing between overlays and the canvas must be explicitly declared, preventing invisible full-page viewports from capturing page links or touch scrolling gestures.
When rendering multiple product previews in a grid, the skill prescribes a single shared renderer with scoped scissor viewports instead of allocating a separate WebGL context per card. It also mandates cleanup logic during asynchronous loading and route changes.
What it helps with
- integrate a Three.js canvas into Next.js components without SSR crashes
- route pointer and scroll events correctly between UI overlays and 3D scenes
- display multiple 3D product previews using a single shared renderer
- project world-space coordinates onto HTML labels with viewport clipping
Example prompts for the agent
- Embed a responsive Three.js canvas inside this Next.js page without breaking SSR
- Route pointer events between this HTML control layer and the underlying 3D scene
- Implement product preview cards using one shared Three.js renderer and scissor test
How to install threejs-html
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-html -a claude-code2Manually: put the files in place
~/.claude/skills/threejs-html/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/threejs-html/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-html -a codex2Manually: put the files in place
.agents/skills/threejs-html/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-html -a cursor2Manually: put the files in place
.cursor/skills/threejs-html/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cesartevisual/threejs-skills skills/threejs-html2Manually: put the files in place
.github/skills/threejs-html/SKILL.md1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-html -a gemini-cli2Platform CLI
gemini skills install https://github.com/cesartevisual/threejs-skills --path skills/threejs-htmlManually: put the files in place
.devin/skills/threejs-html/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-html -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about threejs-html
How to install threejs-html in Claude Code?
Run npx skills add cesartevisual/threejs-skills --skill threejs-html -a claude-code in your terminal.
What does the threejs-html skill do?
It instructs the agent on proper architecture for combining Three.js with HTML frameworks, handling responsive layouts, overlay interactions, and client-only rendering.
How does it handle performance for multiple 3D thumbnails?
The instructions advise using a single shared renderer with scoped viewports and scissor rectangles rather than instantiating an isolated WebGL context for each card.
Source text
SKILL.md · MIT
--- name: threejs-html description: "Integrate Three.js with responsive HTML, Next.js or other frameworks, scroll sections, overlays, and multiple views." --- # Web and Framework Integration Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions. Inspect the framework's client/server boundary, routing lifecycle, stacking contexts, and layout before inserting a canvas. Create the renderer only in a browser lifecycle. Do not access window or WebGL at server module evaluation time. Reserve a stable canvas area in CSS and observe its container. Keep semantic headings, controls, forms, and searchable product information in HTML. Use the existing design system for loading, error, and fallback states. Lazy-load heavy 3D code when it is not needed for the initial view. Define pointer routing explicitly between overlays and the scene. Avoid a full-page invisible canvas intercepting links or touch scrolling. For scene-anchored labels, project world positions and handle behind-camera, occlusion, viewport clipping, and readable placement. For multiple product thumbnails, consider one shared renderer with scoped viewports or static previews instead of a context per card. Scissor rectangles and event coordinates must use the same view bounds. Pause or invalidate offscreen content according to actual motion requirements. Keep route cleanup safe during async loading and development remounts. Verify page scrolling, browser zoom, nested scroll containers, layout shifts, navigation away and back, reduced motion, and content availability when rendering fails. ## API reference Consult the [official documentation](https://threejs.org/manual/) for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.
© cesartevisual · MIT · cesartevisual/threejs-skills