Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cesartevisual/threejs-skills --skill threejs-html -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/threejs-html/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/threejs-html/

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

Similar skills

All skills for Frontend and UI →

From the same set24

The whole set →
threejs-accessibility The threejs-accessibility Claude Code skill makes Three.js interactions usable with keyboards and assistive technology. It applies when adding accessibility to 3D scenes and controls. CX Codex +1 644installs threejs-geometry This Claude Code skill creates and refines Three.js geometry. It activates for work on BufferGeometry, procedural meshes, and instanced objects. CX Codex +1 638installs threejs-product-viewer This Claude Code skill guides the creation of interactive Three.js product viewers. It comes into play when a project needs material choices, camera presets, or model hotspots. CX Codex +1 621installs threejs-physics threejs-physics — a skill for Claude Code guides the integration of Three.js with Rapier or other physics engines. It handles colliders, fixed simulation timesteps, and render transform synchronization. CX Codex +1 611installs threejs-spatial-data threejs-spatial-data — a skill for Claude Code helps integrate BIM, GIS, and CAD models into Three.js scenes. Manages large coordinates, clipping planes, and measurement tools without losing GPU floating-point precision. CX Codex +1 587installs threejs-webgpu The threejs-webgpu Claude Code skill helps build or migrate Three.js projects using WebGPURenderer, TSL node materials, and GPU compute. It applies to tasks where renderer backends and device support need explicit testing. CX Codex +1 585installs threejs-audio threejs-audio — a skill for Claude Code guides the setup of Three.js spatial audio. It manages listener attachment, browser autoplay restrictions, and audio lifecycle during scene transitions. CX Codex +1 583installs threejs-deployment Claude Code skill threejs-deployment prepares and verifies Three.js web builds, asset hosting, decoder paths, and caching. CX Codex +1 582installs

Project sponsors

Companies that keep this analytics open