threejs-development

threejs-development is a skill for Claude Code, Codex from robcost/gameforge. It costs 46 tokens per session (1,536 once invoked), scanned A, original, MIT.

A development guide for building Three.js 3D games with TypeScript. Three.js is a JavaScript library for displaying 3D scenes in a web browser.

In plain words
What is it for?
Implementing or modifying a Vite-based 3D game, including its render loop, keyboard input, physics, camera, lighting, and HUD.
Why use it?
It provides a consistent structure for scenes, game settings, movement physics, controls, cameras, lighting, and on-screen displays.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Implementing or modifying a Vite-based 3D game, including its render loop, keyboard input, physics, camera, lighting, and HUD.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/robcost/gameforge/threejs-development
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 robcost/gameforge --skill threejs-development
Clone the repo
git clone --depth 1 https://github.com/robcost/gameforge

Made for: Claude Code, Codex.

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-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/robcost/gameforge/threejs-development/github.svg)](https://agentmods.dev/skills/robcost/gameforge/threejs-development)
Your own site
<a href="https://agentmods.dev/skills/robcost/gameforge/threejs-development"><img src="https://agentmods.dev/badge/skills/robcost/gameforge/threejs-development/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 threejs-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/robcost/gameforge/threejs-development"><img src="https://agentmods.dev/badge/skills/robcost/gameforge/threejs-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,536 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.00046 $0.01536
Opus 5.5 $0.00018 $0.00614
Sonnet 5.5 $0.00009 $0.00307
Haiku 4.5 $0.00005 $0.00154

Measured 1mo ago against content hash 0b1f68114f63, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

threejs-development 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 1mo ago.

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.

apps/orchestrator/src/agents/skills/threejs-development/SKILL.md · 194 lines

How it starts

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

Three.js 3D Game Development Patterns

Project Structure

The Three.js game project uses Vite + TypeScript with this layout:

src/
  config.ts           - Game constants (VIEWPORT, CONTROLS, plus everything from GDD)
  main.ts             - DOM entry point, gets canvas element, calls startGame()
  scenes/
    BootScene.ts      - Creates WebGLRenderer, initializes MainScene, starts loop
    MainScene.ts      - Scene, Camera, Lights, animate loop, reset key - all gameplay here

Config-Driven Design

  • All game constants (dimensions, speeds, colors, physics values) go in src/config.ts
  • Scenes import from config - never hardcode values in scene files
  • Colors are hex numbers (e.g. 0x4fc3f7) for Three.js materials

Scene Architecture

  • MainScene is a class with a Three.js Scene, PerspectiveCamera, and WebGLRenderer
  • The animate loop uses requestAnimationFrame with delta time
  • Input is tracked via a keysPressed Set - use isKeyDown(code) to check
  • Camera and lighting are pre-configured in the template - modify as needed
// Typical MainScene structure
class MainScene {
  scene: THREE.Scene;
  camera: THREE.PerspectiveCamera;
  renderer: THREE.WebGLRenderer;
  keysPressed: Set<string>;

  animate(time: number) {
    const delta = (time - this.lastTime) / 1000;
    this.lastTime = time;
    this.update(delta);
    this.renderer.render(this.scene, this.camera);
    requestAnimationFrame((t) => this.animate(t));
  }
}

Creating Game Objects (Geometric Primitives)

  • Use THREE.BoxGeometry, THREE.SphereGeometry, THREE.CylinderGeometry for entities
  • Wrap in THREE.Mesh with THREE.MeshStandardMaterial for lit appearance
  • Add to scene: this.scene.add(mesh)
// Create a colored box
const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshStandardMaterial({ color: 0x4fc3f7 });
const cube = new THREE.Mesh(geometry, material);
cube.position.set(0, 0.5, 0);
this.scene.add(cube);

// Create a sphere
const sphereGeo = new THREE.SphereGeometry(0.5, 16, 16);
const sphereMat = new THREE.MeshStandardMaterial({ color: 0xff5722 });
const sphere = new THREE.Mesh(sphereGeo, sphereMat);
this.scene.add(sphere);

Read the full file on GitHub · 194 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 194 lines · 46 tokens per session scan A 0b1f68114f63

Subscribe to this mod's changes

threejs-development is a skill published in the GitHub repository robcost/gameforge (5 stars, last pushed 7mo ago), licensed MIT. It adds 46 tokens to every session and 1,536 once invoked, about $0.0002 per session on Opus 5.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

phaser-pixi-2d-games

Use when building a 2D web game with Phaser (3.x/4.x) or PixiJS 8 in TypeScript - framework vs renderer, Phaser scenes/game objects/arcade physics/groups as pools/scale manager/loader, scene shutdown cleanup, PixiJS 8 async init, Assets bundles, ticker units and destroy, and keeping rules in plain TS modules.

makifbaysal/tasktrooper · 86 tokens

pn-godot-dev

Guides Godot Engine 4.x development: GDScript, GDExtension (C++), multiplayer, VisualShader/shader code, export/platform config, autoloads, Resource serialization, InputMap, headless CI, AnimationPlayer/Tree, 2D/3D workflows, physics, PCG, and Blender pipeline. Use when developing Godot 4.x projects.

perniemann/pnCore · 86 tokens

ecs-component-patterns

Advanced ECS component design patterns including tag components, singleton components, shared data, and component pools.

bullish0x/GameStudio · 23 tokens

ecs-architecture

Design and implement Entity Component System architecture with TypeScript for game development.

bullish0x/GameStudio · 17 tokens

pn-unreal-dev

Guides Unreal Engine development: C++, Blueprints, asset naming, build config, plugin development, programmatic asset creation, live uasset creation, Python automation, UAT/BuildGraph, Editor Utility Widgets, Data Validation, Materials, Niagara, PCG, and performance. Use when developing Unreal Engine projects.

perniemann/pnCore · 68 tokens

pn-unity-dev

Guides Unity development: C#, 2D Animation package, URP, asset pipelines, and scripting. Use when developing Unity projects, especially 2D games and animation workflows.

perniemann/pnCore · 42 tokens