threejs

threejs is a skill for Claude Code, Codex from kyh/vibedgames. It costs 280 tokens per session (3,865 once invoked), scanned A, original, MIT.

A toolkit for making 3D browser apps and games with Three.js, a JavaScript library for displaying 3D graphics. It covers scenes, objects, lighting, animation, models, physics, cameras, and performance.

In plain words
What is it for?
Use it to build 3D scenes, interactive browser experiences, and games with character movement, collisions, follow cameras, animation, and physics.
Why use it?
It provides patterns for the graphics setup and reusable code for common game systems. It also explains why a rendered 3D scene alone is not yet a working game.

Skill for Claude CodeCodex

Part of the game-engines plugin — 3 skills shipped together

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.

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

Made for: Claude Code, Codex.

Or install game-engines, the plugin that ships this one along with the rest of its 3 skills.

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 threejs

README.md
[![agentmods](https://agentmods.dev/badge/skills/kyh/vibedgames/threejs.svg)](https://agentmods.dev/skills/kyh/vibedgames/threejs)
Your own site
<a href="https://agentmods.dev/skills/kyh/vibedgames/threejs"><img src="https://agentmods.dev/badge/skills/kyh/vibedgames/threejs.svg" alt="Measured on agentmods" height="20"></a>
Per session 280 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00280 $0.03865
Opus 5 $0.00140 $0.01932
Sonnet 5 $0.00056 $0.00773
Haiku 4.5 $0.00028 $0.00386

Measured 4d ago against content hash 6bdb1659bc5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (modules/character-movement.ts, modules/kinematic-resolver.ts, modules/math.ts, …), 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.

plugins/game-engines/skills/threejs/SKILL.md · 393 lines

How it starts

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

Three.js

Build performant 3D browser apps and games with Three.js using modern ES module patterns (r150+). This file covers scene setup inline; physics, controllers, gameplay architecture, and deep topics live in references/.

Core principles:

  1. Scene Graph First: everything added to scene renders. Use Group for hierarchical transforms (parent transforms affect children).
  2. Primitives as building blocks: built-in geometries (Box, Sphere, Torus) cover most simple cases.
  3. Animation as transformation: change position/rotation/scale over time in renderer.setAnimationLoop.
  4. Performance through simplicity: fewer objects, fewer draw calls, reusable geometries/materials.
  5. A scene is not a game: gameplay needs a fixed-timestep loop, a controller driven by input, collision, and a follow camera — see the Reference Files below before building one.

Prebuilt Modules — copy the hard parts, generate the rest

modules/ holds a small set of TypeScript files for the parts of a 3D game that are hard to get right and the same across games: framerate-independent smoothing + a deterministic PRNG (math.ts), Y-up orientation-frame helpers + a grounded character controller (character-movement.ts), and a Rapier kinematic character-collision resolver (kinematic-resolver.ts). Copy these into the project rather than re-deriving them — inverted axes, framerate-dependent smoothing, and mis-wired Rapier controllers are the classic ways this goes wrong.

Everything else — camera rigs, enemy waves, pathfinding, steering, minimaps, input schemes — is not prebuilt on purpose: it differs per game and is cheap to write, so generate it live against the references below. Read modules/summary.md before pulling anything in.

Reference Files

Scene setup is inline below. Read the relevant reference before working on that area:

When you're working on... Read first
Character locomotion / Rapier character collision / smoothing / seeded RNG modules/summary.md
Turning a scene into a playable game (fixed-timestep loop, structure) references/gameplay-systems.md
Physics or collision (Rapier / cannon-es / arcade overlap) references/physics.md
Movement controllers + follow/third-person camera references/controllers-and-camera.md
Loading/caching/normalizing GLTF/GLB models references/gltf-loading-guide.md
Game loop, state machine, object pooling, screen effects references/game-patterns.md
Dropping generated GLB models / SFX into a running scene references/generated-assets.md
Post-processing, shaders, instancing, env maps, color management references/advanced-topics.md
Material values, shader injection (onBeforeCompile), sky, cheap tricks, z-fighting, shadow acne, texture shimmer references/graphics-recipes.md
Black screen, low FPS, mobile issues, memory leaks, physics debugging references/debugging-and-profiling.md
Auditing a scene you didn't write, visual-defect sweeps, React Three Fiber (R3F) references/debugging-and-profiling.md

Read the full file on GitHub · 393 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. 4d ago First seen · 393 lines · 280 tokens per session scan A 6bdb1659bc5c

Subscribe to this mod's changes

threejs is a skill published in the GitHub repository kyh/vibedgames (55 stars, last pushed today), licensed MIT. It adds 280 tokens to every session and 3,865 once invoked, about $0.0014 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-30.

Related

Other skills, from other repositories

trigger-config

Configure Trigger.dev projects with trigger.config.ts. Use when setting up build extensions for Prisma, Playwright, FFmpeg, Python, or customizing deployment settings.

hackerai-tech/hackerai · 34 tokens

emil-design-eng

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

openstatusHQ/data-table-filters · 35 tokens

supabase

Use when doing ANY task involving Supabase: Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues, supabase-js, @supabase/ssr, RLS, schema migrations, CLI, MCP server. Includes security checklist.

martineserios/thebrana · 58 tokens

react-three-fiber

Build declarative 3D scenes with React Three Fiber (R3F) - a React renderer for Three.js. Use when building interactive 3D experiences in React applications with component-based architecture, state management, and reusable abstractions. Ideal for product configurators, portfolios, games, data visualization, and…

12-Studio/Tackl · 71 tokens

framer-motion

Creates smooth animations and micro-interactions using Framer Motion including page transitions, gestures, scroll-based animations, and orchestrated sequences. Use when users request "add animation", "framer motion", "page transition", "animate component", or "micro-interactions".

FilippoDeSilva/skills · 57 tokens

p5js

Use when users request: p5.js sketches, creative coding, generative art, interactive visualizations, canvas animations, browser-based visual art, data viz, shader effects, or any p5.js project.

cyborg-garden/hermes-agent-mt · 20 tokens