preview-threejs

preview-threejs is a skill for Claude Code from veelenga/preview-skills. It costs 22 tokens per session (2,325 once invoked), scanned A, original, MIT.

A tool for creating interactive 3D visualizations in Three.js, a JavaScript library for displaying 3D graphics in a browser.

In plain words
What is it for?
Use it to preview Three.js scene code or 3D model files with orbit controls, lighting, and animation.
Why use it?
It provides a ready-made viewer with camera controls, lighting, and animation so generated scenes can be previewed interactively.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to preview Three.js scene code or 3D model files with orbit controls, lighting, and animation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/veelenga/preview-skills/preview-threejs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add veelenga/preview-skills --skill preview-threejs
Clone the repo
git clone --depth 1 https://github.com/veelenga/preview-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview-threejs

README.md
[![agentmods](https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-threejs/github.svg)](https://agentmods.dev/skills/veelenga/preview-skills/preview-threejs)
Your own site
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-threejs"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-threejs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for preview-threejs

Your own site · 80×15
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-threejs"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-threejs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,325 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.02325
Opus 5 $0.00011 $0.01162
Sonnet 5 $0.00004 $0.00465
Haiku 4.5 $0.00002 $0.00232

Measured 9d ago against content hash f2c661b12242, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

preview-threejs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (config.sh, lib/browser-utils.sh, lib/content-utils.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/preview-threejs/SKILL.md · 356 lines

How it starts

The opening of the file, as written. The whole thing — 356 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preview Three.js Skill

Interactive Three.js 3D visualization viewer with pre-configured scene, camera, lighting, and orbit controls.

Agent Usage

When the user asks to create a 3D visualization, write the Three.js code and pipe it to the script. Use the Bash tool to execute this skill's run.sh script:

# Pipe Three.js code
cat scene.js | ./run.sh

# Or from a file
./run.sh model.threejs

The script handles all HTML generation and automatically opens the result in the browser. Do NOT open the file manually to avoid duplicate tabs.

Usage

# Preview a Three.js visualization file
/preview-threejs solar-system.threejs

# Or use .3d extension
/preview-threejs model.3d

# Pipe Three.js code (preferred for temporary content)
cat visualization.js | /preview-threejs
echo "const cube = new THREE.Mesh(...);\nscene.add(cube);" | /preview-threejs

Best Practice: For temporary or generated 3D scenes, prefer piping over creating temporary files. This avoids cluttering your filesystem and the content is automatically cleaned up.

Options

The script works with sensible defaults but supports these flags for flexibility:

  • -o, --output PATH - Custom output path
  • --no-browser - Skip browser, output file path only

Features

  • 3D rendering with WebGL
  • Orbit controls - Drag to rotate, scroll to zoom, right-click to pan
  • Pre-configured lighting - Ambient + directional lights ready
  • Animation loop with customAnimate callback
  • Reset view button
  • Code viewer toggle
  • Responsive design adapts to window size

When to Use This Skill

Use this skill when the user wants to:

  • Create 3D visualizations and models
  • Render geometric shapes and patterns
  • Visualize 3D data
  • Create interactive 3D scenes
  • Prototype 3D animations

Three.js Code Requirements

Your code should:

  1. Create geometries and materials
  2. Create meshes and add them to the scene
  3. Optionally define scene.userData.customAnimate for animation

Read the full file on GitHub · 356 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 356 lines · 22 tokens per session scan A f2c661b12242

Subscribe to this mod's changes

preview-threejs is a skill published in the GitHub repository veelenga/preview-skills (8 stars, last pushed 29d ago), licensed MIT. It adds 22 tokens to every session and 2,325 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

oneshot-website

Generate immersive, one-shot single-file HTML websites with embedded CSS and JS. No external images. Hostable on CodePen or Vercel. Use for writeup showcases, AI capability demos, and portfolio pieces.

cafe3310/public-agent-skills · 48 tokens

remotion-best-practices

Best practices for Remotion - Video creation in React.

firstsun-dev/skills · 17 tokens

remotion

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays.

firstsun-dev/skills · 22 tokens

hyperframes-animation

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4…

firstsun-dev/skills · 119 tokens

remotion-render

Render videos from React/Remotion component code via inference.sh. Pass TSX code, get MP4. Supports all Remotion APIs: useCurrentFrame, useVideoConfig, spring, interpolate, AbsoluteFill, Sequence. Configurable resolution, FPS, duration, codec. Use for: programmatic video generation, animated graphics, motion design…

firstsun-dev/skills · 123 tokens

frontend-slides

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

x-cmd/skill · 63 tokens