Skip to content

armgit / viz3d

Public Imported from GitHub
0

An AI agent skill that turns any subject into a 3D film or app

Add visualize-in-3d skill as a Claude Code plugin marketplace

Nguyen Xuan An2664306870c3
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
new file mode 100644
index 0000000..e0c256b
--- /dev/null
+++ b/.claude-plugin/marketplace.json
@@ -0,0 +1,15 @@
+{
+ "name": "codepawl",
+ "description": "Agent skills from CodePawl",
+ "owner": {
+ "name": "CodePawl",
+ "url": "https://codepawl.com"
+ },
+ "plugins": [
+ {
+ "name": "visualize-in-3d",
+ "source": "./plugins/visualize-in-3d",
+ "description": "Turn hard-to-picture places, systems and events into a 3D world you can watch or click through"
+ }
+ ]
+}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0a4925c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+.env
+*.key
+*.pem
+.DS_Store
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..ea755f9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 CodePawl
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7e54e47
--- /dev/null
+++ b/README.md
@@ -0,0 +1,73 @@
+# CodePawl skills
+
+Agent skills we use to build things with Claude Code. Each skill is a folder with a `SKILL.md` entry point and the
+references it reads.
+
+## visualize-in-3d
+
+Some things are hard to understand from text, a spreadsheet or a two-hour documentary. How does an airport turn a plane
+around in 45 minutes? What does an ER do with ten arrivals at once? How does a metro keep trains two minutes apart, or
+a toll gantry charge a truck at full speed? Why did a reactor explode at 01:23?
+
+This skill has your agent turn questions
+like these into a 3D world you can watch or click through. The world is built from researched facts and from models
+made to real dimensions.
+
+It has two modes:
+
+- **Live app**: a three.js app with a dashboard around a 3D world of the place. A seeded simulation moves the units and
+ the numbers. The agent records a 30 s film by driving the app with real clicks on a virtual clock.
+- **Documentary film**: a 2 to 4 minute film of an event, told in order. It is built from a sourced fact file, a map,
+ block-built scenes and flat glowing figures. Captions are timed for reading, and the score changes with the story.
+
+There are four looks: toy isometric, point-cloud survey, photoreal terrain and dark documentary.
+
+### Install
+
+In Claude Code, add this repository as a plugin marketplace and install the plugin:
+
+```text
+/plugin marketplace add codepawl/skills
+/plugin install visualize-in-3d@codepawl
+```
+
+From a shell, the same two steps are:
+
+```bash
+claude plugin marketplace add codepawl/skills
+claude plugin install visualize-in-3d@codepawl
+```
+
+For Claude Code, Codex, Cursor and other agents that read skill folders, use the [skills CLI](https://github.com/vercel-labs/skills):
+
+```bash
+npx skills add codepawl/skills
+```
+
+To install by hand, copy `plugins/visualize-in-3d/skills/visualize-in-3d` into your agent's skills folder (for Claude
+Code, `~/.claude/skills/`).
+
+### Use
+
+Ask for what you want to see, for example:
+
+- "Visualize how a container port works."
+- "Show how a city metro keeps its trains apart."
+- "Make a documentary-style 3D film of the 1906 San Francisco earthquake."
+
+The agent writes a topic file first, then builds the models, then the app or the film. It checks its own film on
+contact sheets before it shows you anything.
+
+### What you need
+
+- Node 20 or later, with Playwright and Chromium for recording.
+- ffmpeg on your PATH.
+- A GPU that runs WebGL2 at 1080p.
+- [Blender](https://www.blender.org/download/) 5.x is optional. It gives much better models. Without it the skill builds
+ the models in three.js and tells you the quality is lower.
+
+The skill asks before it downloads anything, such as elevation data, map data or reference images.
+
+## License
+
+MIT
diff --git a/plugins/visualize-in-3d/.claude-plugin/plugin.json b/plugins/visualize-in-3d/.claude-plugin/plugin.json
new file mode 100644
index 0000000..d76e4d7
--- /dev/null
+++ b/plugins/visualize-in-3d/.claude-plugin/plugin.json
@@ -0,0 +1,13 @@
+{
+ "name": "visualize-in-3d",
+ "version": "0.1.0",
+ "description": "Turn hard-to-picture places, systems and events into a 3D world you can watch or click through: a live three.js app with a dashboard, or a documentary film, with models built in Blender from real references.",
+ "author": {
+ "name": "CodePawl",
+ "url": "https://codepawl.com"
+ },
+ "homepage": "https://github.com/codepawl/skills",
+ "repository": "https://github.com/codepawl/skills",
+ "license": "MIT",
+ "keywords": ["3d", "visualization", "three.js", "blender", "documentary", "simulation"]
+}
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.md b/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.md
new file mode 100644
index 0000000..4a8a21f
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.md
@@ -0,0 +1,59 @@
+---
+name: visualize-in-3d
+description: Make things that are hard to picture visible as a 3D world people can watch or play with - an operation (airport, data center, port, factory, hospital), a system, an event spreading over real land (wildfire, flood), or a story in time (a historical event, a case). Builds a live three.js app with a dashboard and a 30 s film, or a shot-by-shot documentary film, with models made in Blender from real references (or in three.js when Blender is missing). Use for "visualize how X works", "show this event on a 3D map", "a live 3D dashboard of how X runs", "a documentary-style 3D explainer".
+license: MIT
+---
+
+# Visualize in 3D
+
+Some things are hard to understand from text, tables or a long video: how an airport turns a plane around in 45
+minutes, what an ER does with ten arrivals at once, where a data center's power goes, how a warehouse ships an order,
+how a case unfolded across a county, why a reactor exploded at 01:23. This skill turns them into a 3D world you can
+watch or click through, so the parts, the order and the cause can be seen at a glance. Two modes share one toolkit (models from real references, a
+deterministic virtual clock, contact-sheet checks):
+
+- **Live app**: a system or an operation. A real dashboard around a 3D world, a seeded simulation moving units and
+ numbers, and a 30 s film recorded by driving the app with real clicks. Steps below; briefs in `references/brief.md`.
+- **Documentary film**: an event, a case or a piece of history told in order. A fact file, a map, block-built scenes
+ with flat glowing figures, captions timed for reading, sound and a score by section. See
+ `references/documentary.md`.
+
+Pick the look in `references/looks.md` (toy isometric, point-cloud survey, photoreal terrain, dark documentary).
+Paths use `{{WORK_DIR}}` for the folder where projects live (the current directory unless the user names one) and
+`{{SKILL_DIR}}` for this skill's folder. Write paths with forward slashes on every platform.
+
+## Before you start
+
+1. **Blender:** run `blender --version` (or look for it in the usual install folder). If it is missing, tell the user
+ it gives much better models and is a free download from blender.org, and ask whether to wait for the install or
+ go on without it. Without Blender, build the models in three.js as `references/no-blender.md` describes and say
+ in the report that model quality is lower.
+2. **Node and a browser for recording:** Node 20+ and Playwright with Chromium. ffmpeg for encoding and checks.
+3. **Subagents:** where the harness has them, hand each pass to a fresh subagent with its brief (each pass stays
+ inside a sane budget). Where it does not, run the passes one after another in this session, finishing and
+ checking one before starting the next, and re-read the topic file at the start of each.
+4. **Downloads** (elevation, map data, reference images, recorded sounds): name the source, count and rough size and
+ get the user's OK first.
+
+## Live app steps
+
+1. **Write the topic file** `{{WORK_DIR}}/TOPIC-<slug>.md` in the shape of the files in `examples/` (airport ramp,
+ AI data center, agent office, wildfire valley): folder and port, sites, the world (real parts of the place and what
+ moves), data (units, tasks, fields), four KPIs, what the bottom timeline follows, made-up names, and the look (toy isometric when the user names none).
+ Research the real operation first and list the real object types the main assets stand for.
+2. **Pass 1, assets** with the Pass 1 brief (`references/brief.md`), or `references/no-blender.md` without Blender.
+3. **Pass 2, app and film** with the Pass 2 brief, once pass 1 is checked.
+4. **Check before showing anyone:** contact sheets of the film (`scripts/contact-sheet.sh`, sheets newer than the
+ video) and the screenshots, against the faults in `references/film.md` and the brief's checks.
+5. **Final polish:** what you or the user find goes into one more pass with "everything else is approved, change
+ nothing else", then re-record the film.
+
+## Rules
+
+- Original designs only: no real brands, logos, liveries or characters.
+- Every main asset is modelled from a reference sheet of the real thing (`references/real-objects.md`); models from
+ memory read as toys. This holds without Blender too.
+- A live app's film is driven by real input on a virtual clock; a documentary film is scripted shot by shot. Both
+ follow `references/film.md`.
+- Real people and real harm: facts from sources, victims named with respect, no gore (`references/documentary.md`).
+- Reference images and videos are for study only: never ship them in the app or the film.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/examples/agent-office.md b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/agent-office.md
new file mode 100644
index 0000000..57e4813
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/agent-office.md
@@ -0,0 +1,2 @@
+Your folder: {{WORK_DIR}}/viz-agent-office (create it). Port 5422.
+Subject: an AI agents office, the "workers" of a desktop app called Orglet (by CodePawl), shown as a little isometric office where each AI agent is a character. Before designing, read what Orglet really does from its public repository, https://github.com/codepawl/orglet (read only: its README files and docs), and show only real features and concepts from it (for example agents, tasks, tools, approvals, if that is what the docs say). Sites are teams or workspaces. The world: desks, rooms such as a research corner, a coding room, a review room and a mailroom; agent characters walk between rooms carrying task cards; a manager desk where tasks arrive; approval stations where a human signs off. Data: agents (name, role, current task, tool in use, tokens spent), tasks with stages, approvals waiting. KPIs that fit the real product. Characters are original simple chunky low-poly figures, not any existing character. If something you would like to show is not in Orglet's docs, leave it out and list it in your report.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/examples/ai-datacenter.md b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/ai-datacenter.md
new file mode 100644
index 0000000..cd64c83
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/ai-datacenter.md
@@ -0,0 +1,2 @@
+Your folder: {{WORK_DIR}}/viz-datacenter (create it). Port 5421.
+Subject: an AI data center operations app. Sites are data halls on a campus. The world: rows of server racks with glowing GPU trays whose colour follows temperature, hot and cold aisles, overhead cable trays, cooling units and chillers outside, power substations and battery rooms, robot carts that swap failed drives and GPUs, technicians walking. Data: training and inference jobs (progress, GPUs used, tokens per second), rack temperature and power draw, alerts (a GPU failing, a cooling unit degrading), maintenance tickets. KPIs: tokens per second, GPUs busy, PUE, power in megawatts. The bottom timeline follows one training run's stages. Use plausible, clearly made-up numbers and names; no real company or model names.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/examples/airport-ramp.md b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/airport-ramp.md
new file mode 100644
index 0000000..1a1fe69
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/airport-ramp.md
@@ -0,0 +1,2 @@
+Your folder: {{WORK_DIR}}/viz-airport (create it). Port 5423.
+Subject: an airport ground operations app. Sites are terminals. The world: terminal buildings with gates and jet bridges, aircraft taxiing, parking and pushing back, baggage tugs with carts, fuel trucks, catering trucks, a control tower, runways with lights. Data: flights (gate, status, delay, turnaround progress), ground vehicles (task, battery or fuel), baggage loads, gate availability. KPIs: on-time departures, turnaround time, gates in use, bags handled. The bottom timeline follows one aircraft's turnaround stages (arrive, deboard, clean, refuel, board, push back). Use made-up airline names and logos, no real airlines.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/examples/wildfire-valley.md b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/wildfire-valley.md
new file mode 100644
index 0000000..0e923cf
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/examples/wildfire-valley.md
@@ -0,0 +1,2 @@
+Your folder: {{WORK_DIR}}/viz-wildfire (create it). Port 5424.
+Subject: a wildfire analysis tool over real terrain (photoreal terrain look). Pick one well-documented fire with public perimeter data (agency incident reports and published fire-perimeter files by date); get the user's OK before downloading elevation and perimeter data, and record the sources. Sites are the fire's divisions or the valleys it crossed. The world: real elevation with a painted ground texture (dry grass, rock, burned ground), instanced trees, roads and the towns the fire threatened, long mountain shadows and haze. What moves: the fire front as a glowing line advancing perimeter by perimeter, smoke plumes, air tankers and helicopters flying drop runs, engines on roads. Data: perimeters by date and time, acres burned, containment percent, resources assigned, evacuation zones and their status, weather (wind speed and direction, humidity). KPIs: acres burned, containment, structures threatened, resources on scene. The bottom timeline scrubs the fire from ignition to containment; every overlay, chart and the key-events list follow it. Clicking an aircraft opens its camera feed in a thermal palette. Use the real fire's public facts for the timeline and made-up names for crews and aircraft; no agency logos.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md
new file mode 100644
index 0000000..ece31a6
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md
@@ -0,0 +1,97 @@
+# Briefs for the live app passes
+
+Two passes, one after the other, each pointed at the same topic file: hand each to a fresh subagent where the
+harness has them, or run them in sequence in one session. Copy each brief, replace `{{SKILL_DIR}}` (where this skill lives), `{{FOLDER}}`,
+`{{PORT}}` and `{{TOPIC}}` (the topic file's path), and change nothing else. The topic file's first line names the
+folder and the port; use those. Without them use `{{WORK_DIR}}/viz-<slug>` and a free port from 5420 up. If the topic
+names no look, use toy isometric and write that into the topic file first. Paths use forward slashes on every platform. Without Blender, replace Pass 1 with {{SKILL_DIR}}/references/no-blender.md.
+Reading map: Pass 1 (assets), Pass 2 (app and film).
+
+## Pass 1: Blender asset pack
+
+```
+Build the 3D asset pack for a live 3D app that shows how a complex place or system works. The subject, its world and
+its data are in {{TOPIC}}; read it first. The topic names a look; read that look's section in
+{{SKILL_DIR}}/references/looks.md, and its reference files if the topic folder has any, before
+modelling. Make your own designs; no real brands, logos, liveries or existing characters.
+
+Model from real references, never from memory: follow
+{{SKILL_DIR}}/references/real-objects.md. For every main asset write its
+reference sheet in blender/refs/ (real type, dimensions with sources, proportions, parts list, 3 to 6 reference
+images with source and licence) before modelling it, block out at real size against the reference views, and check
+the compare renders. If the user has not approved downloading reference images, write each sheet from what you
+know, mark the numbers "verify", and use a dimension blockout drawn from the sheet as the left side of the compare.
+Say so in the report. If the topic is a real place, fetch its elevation as that file says (the topic file states
+whether the user approved the download).
+
+Work only in {{FOLDER}}: Blender scripts in blender/, GLBs in app/public/assets/. Run Blender 5.x
+headless (--background --factory-startup --python) at low priority, one Blender at a time (wait if one runs).
+Blender gotchas: --factory-startup still loads the default cube, camera and light, so start each script with
+bpy.ops.wm.read_factory_settings(use_empty=True). Model each vehicle facing Blender -Y; the glTF exporter turns that
+into +Z, so lookAt works in three.js. Write the facing into ASSETS.md.
+
+Model every asset procedurally with proper bevels and rounded edges, panel lines and small real details (vents,
+bolts, windows, wheels with hubs, lights, signage plates), clean topology with smooth shading and hardened edges,
+UVs, PBR materials (small procedurally baked textures are fine), emissive where things glow. Anything the app switches (signals, lamps, screens) gets its own named emissive
+material per state, so the app can toggle it. Two to four variants of anything that repeats more than about five
+times (vehicles, people, trees, buildings); one model is fine for unique structures. Moving parts are separate named objects or bones with their pivot at the
+origin (wheels, doors, fans, lifts, booms, bridges, character limbs); characters and animals get an armature with
+named clips. Keep the total under about 40 MB, one GLB per asset family so repeats can be instanced.
+
+Verify: blender/preview.py renders a contact sheet per GLB (a few angles, back-face culling on, a 1.8 m figure block
+beside each asset for scale) to blender/previews/. For 3 to 6 main assets, also a compare sheet: reference (or
+dimension blockout) and render in the same orthographic view and scale with a 1 m ruler, side by side, or stacked for
+long objects; look at every sheet and fix wrong
+scale, wrong proportions, missing parts, bad normals, holes, floating parts. Write
+blender/ASSETS.md listing every GLB, its nodes, pivots, clips, real-world scale and where it goes. Rules:
+check GPU memory before GPU renders and use Workbench or CPU when it is full, no personal data. Write pass1_started_at.txt and
+pass1_finished_at.txt (UTC). Budget about 80 tool calls. Report the asset list with sizes, what you looked at, gaps.
+```
+
+## Pass 2: the app and the film
+
+```
+Build a live 3D app in the browser that makes a complex place or system easy to see, on the subject in {{TOPIC}}
+(read it first), using the GLB asset pack in {{FOLDER}}/app/public/assets (read blender/ASSETS.md). Render the
+world, skin the UI and shape the film as the look named in the topic says (its section in
+{{SKILL_DIR}}/references/looks.md, and its reference files). In every look: a
+world with things moving on their own; pins and selection rings over objects; a real dashboard around the
+scene (top bar with search, site switcher, live clock and user; KPI cards top left; a detail card on the right that
+opens for any clicked object with live fields and a progress bar; a timeline strip at the bottom; tabs of lists at
+the bottom right; zoom and camera buttons). Make your own name, logo and data; do not copy the reference's name,
+logo, text or exact layout. Never call it a game in the UI.
+
+Work only in {{FOLDER}}/app. Stack: Vite + React + React Three Fiber (+ drei), pinned exact versions, serve on port
+{{PORT}}. A plain data model (sites, units, tasks, events) drives everything; the 3D view and the dashboard both read
+it, and a small seeded simulation advances it in real time so things move, statuses change and numbers tick. Load the
+GLBs with instancing for repeats, drive every moving part and clip from the simulation. Clicking an object selects it
+and opens its card; clicking a list row flies the camera to it (and follows it if it moves); switching sites changes
+the world. Soft shadows, ambient occlusion, gentle bloom on lights, smooth camera moves. 60 fps at 1920x1080 on a
+mid-range GPU such as an RTX 3060.
+
+UI rules: no small uppercase eyebrow labels above headings, no coloured left-border callouts, no divider lines
+between rows (spacing and subtle fills instead), every status starts with an icon whose shape differs per state, tabs
+are quiet text buttons, a card closes by clicking empty ground or Esc (no X on side panels).
+
+Verify with Playwright (Chromium with --enable-gpu --ignore-gpu-blocklist, plus --use-angle=d3d11 on Windows) at 1920x1080: the overview, a selected object with its card, a second site, a
+close-up, plus close-ups of each main asset type. Look at every one and fix clipping, overlapping UI, unreadable
+text, z-fighting, floating or sunken objects, broken picking, anything that looks like programmer art. Measure fps.
+
+Film: 30 s 1920x1080 30 fps at shots/film.mp4 with a deterministic virtual clock (override requestAnimationFrame,
+performance.now and Date.now in an init script, advance 1/30 s per captured frame; drive the app only through real
+clicks, drags and wheel events with a visible cursor), encoded at below-normal priority, H.264 yuv420p crf 18
+faststart, plus a copy under 25 MB. Shape: 0-5 s slow orbit over the whole site with things moving; 5-12 s click a
+moving unit, its card opens and updates live while the camera follows; 12-18 s click a list row and the camera flies
+there; 18-24 s switch to another site; 24-30 s pull back to a wide shot where the site still fills most of the frame.
+mpdecimate must show no repeated frames; look at stills.
+Film traps that earlier builds had to fix: the opening so far out that units are specks (open close
+enough that dozens of moving units read); a beat that waits on the simulation and shows nothing (pre-roll the
+virtual clock so the followed event lands 2-3 s into its beat); a follow camera that ends inside a structure (keep a
+minimum distance and a height above the tallest model); selection rings far wider than the object (fit the
+footprint, an ellipse for long things, at most about 1.3x); bare white or grey ground (give every surface a real
+material: asphalt, lane paint, verges, floors); a last shot where the site is small in a sea of empty ground.
+
+Write README.md, pass2_started_at.txt and pass2_finished_at.txt (UTC). Budget about 100 tool calls. Report: what was
+built, how to run it, screenshot and film paths, checks with numbers, honest gaps, and a one-line caption suggestion
+("Claude built a live <place>, every <main assets> modeled in Blender and running in three.js").
+```
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/documentary.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/documentary.md
new file mode 100644
index 0000000..9957ebd
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/documentary.md
@@ -0,0 +1,81 @@
+# Documentary film mode
+
+For an event, a case or a piece of history told in order: a 2-4 minute film in the dark documentary look (or
+another look the subject suggests), made from a fact file, a real map, block-built scenes and flat glowing figures.
+It was built first for a 1950s criminal case and then generalized. Reading map: Fact file, Respect rules, Project
+shape, Script, Scenes, Maps, Sound, Render and checks, Passes.
+
+## Fact file
+
+Write `{{WORK_DIR}}/<slug>/facts.md` before anything is built, and build only from it.
+
+- Every fact has a date, a place, a source and a confidence label: `[2S]` two independent sources, `[1S]` one
+ source, `[D]` sources disagree (give both), `[SEC]` only secondary or derivative. Prefer dated primary sources
+ (newspapers of the day, court records, official reports); archived copies (the Wayback Machine) count.
+- Places get coordinates and the source of each; distances say how they were measured (straight line or by road).
+- A "do not state" list: popular claims that are wrong or unsupported, so the script never repeats them.
+- Quotes only when read verbatim in a primary source; otherwise paraphrase without quotation marks.
+
+## Respect rules
+
+Write them at the top of the fact file and treat them as binding for every pass:
+
+- Victims and their families are people with names and dates, never props. No remains, wounds, weapons in use or
+ gore; violence is shown by a red light pool or a red mark on the map, never by bodies.
+- No nicknames the press invented to sell the story; the person's name is enough.
+- Something only suspected is captioned as suspected or as the official finding ("ruled asphyxiation").
+- Keep private family suffering to one plain line.
+
+## Project shape
+
+A Vite + React + React Three Fiber app with a `film.html` page that plays the film on a virtual clock:
+
+- `script.js`: the shot list. Each shot has a scene name, a caption (and an optional title line for date and place),
+ a camera for 16:9 and one for 9:16 (`from`/`to` position and target, optional depth-of-field pull), and sound cues
+ `[kind, start, duration, gain]`. Shot length is computed from its text (see `film.md`, Pacing).
+- `scenes.jsx`: one component per scene, built from blocks and the GLB kit; `Mannequin.jsx` for figures; a map scene
+ that draws roads, marks, routes and labels from the data file.
+- `tools/film.mjs`: renders frames with Playwright on the virtual clock (both layouts), with `FROM`/`TO` seconds to
+ re-render one range; `tools/sfx.py` and a mix step for sound; an encode step for a master and a web copy.
+
+## Script
+
+- Chronological, one idea per shot, 3-7 s each. Open on the place, close on the place.
+- A title line carries the date ("29 DEC 1945"); the caption is one plain sentence of fact.
+- Every few shots, return to the map to show where the next thing happens and how far it is.
+- Plan the camera move for each shot from the list in `film.md` so no two neighbours move the same way.
+
+## Scenes
+
+- Exteriors: the real building types of the period at real size, with trim, sills, chimneys, porches and signage
+ plates; the building the shot is about outlined in the highlight colour.
+- Interiors the story mentions (a shop, a bar, a courtroom, an interview room, a ward): a few block-built pieces, two
+ or three practical lights and small moving details.
+- Figures: one colour per role (the subject warm amber, authorities blue, townspeople grey, the person in focus
+ white), joined silhouettes with bloom, period clothing shapes; poses for walking, sitting, standing still, carrying.
+- Doors open onto a cut-out doorway with a lit vestibule behind it; figures walk through, never into walls.
+
+## Maps
+
+- Road and water lines from open data (OpenStreetMap extracts, national road files such as US Census TIGER/Line) or
+ traced from a public-domain historical map of the period; thin light lines on black.
+- The map extent covers every place the film names; extend the data rather than leave an empty frame.
+- Marks: glowing red X for events, a pin for other places; routes draw on in red; labels on dark plates.
+
+## Sound
+
+Follow `film.md`, Sound: real CC0 recordings for footsteps (placed on footfalls), doors, cars and ambience; no
+constant noise bed; a score in sections (for example childhood, losses, the event, the aftermath, the end).
+
+## Render and checks
+
+- Render both layouts, mix, encode, then make contact sheets and open every one. Check against `film.md`, Checks,
+ and against the fact file: every caption must match a fact and its confidence.
+- Fix in one round, re-render only the changed ranges, and check those ranges again.
+
+## Passes
+
+1. Research and fact file (no code).
+2. Map, scene kit and figures, with a contact sheet of every scene.
+3. Script, cameras, sound and the full render.
+4. Review against the fact file and `film.md`; one polish pass.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md
new file mode 100644
index 0000000..b48e828
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md
@@ -0,0 +1,64 @@
+# Film craft
+
+Rules learned from fixing real films made with this skill. They apply to every look; the dark documentary look
+leans on them most. Reading map: Pacing and text, Camera, Figures and places, Maps, Sound, Checks.
+
+## Pacing and text
+
+- Every caption stays fully visible for at least 1.2 s + 0.07 s per character, with 0.3 s fades in and out. Compute
+ shot lengths from the text the shot carries; a shot cut before its caption can be read is the most common fault.
+- Cut hard between shots. Keep dips to black for real breaks in time (three or so in a three-minute film); a fade on
+ every cut reads as sluggish and cheap.
+- Dates and places go in a short title line above the caption ("29 DEC 1945"), not inside the sentence.
+
+## Camera
+
+- Give each shot its own move: truck, crane, pedestal, tilt, pan, orbit, rack focus. A film where every shot pushes
+ in feels like one long zoom. Save the push-in for the one moment that needs it.
+- A rack focus must resolve: pull to the subject within about a second and hold it sharp. A shot that stays soft
+ reads as a rendering bug.
+- Keep figures and key objects clear of the caption area in both layouts (16:9 and 9:16 frame differently).
+
+## Figures and places
+
+- People are flat, emissive silhouettes in one colour per role, with gentle bloom. Limbs and joints are one joined
+ shape; visible gaps at elbows, knees or fingers read as broken dolls.
+- Seated figures sit on something: chair, bench, bed. Check the seat is under them for the whole shot.
+- A figure never vanishes into a wall. Give the building a real door, cut the opening out of the wall (clipping
+ planes or a boolean) with a shallow lit vestibule behind it, swing the leaf open before the figure arrives, hide
+ the figure only once it is past the threshold, and close the door after.
+- An open door shows a room or a hallway behind it, never the wall, glass or window quad the model keeps there. Glass
+ sits inside a frame and muntins; a door that is all glass reads as a mistake.
+- Vehicles face their direction of travel. Check the model's forward axis once and derive heading from motion.
+- Buildings get enough detail to read at the closest shot (trim, sills, chimneys, signage plates), and the one the
+ shot is about is outlined or lit in the highlight colour.
+- Interiors the story mentions are worth building (a courtroom, an interview room, a ward, a bar): a few block-built
+ pieces, two or three practical lights and small moving details (a flickering sign, dust, embers) carry a shot.
+
+## Maps
+
+- Labels sit on dark plates (about 85% opacity, a 1 px light border) so they read over roads.
+- Frame each map shot on the marks, routes and labels it is about, with every label inside the frame and a margin.
+ Large empty regions mean the camera or the map extent is wrong; extend the map data rather than leave black.
+- Routes draw on over time with a soft sound; marks land with a low thump; distance labels tick in.
+
+## Sound
+
+- No constant noise bed. Brown-noise "air", tape hiss and synthesized wind gusts read as an annoying whoosh across
+ the whole film. Use quiet real ambience per shot (CC0 recordings from Freesound), fading in and out on cuts, and let
+ interiors be nearly silent.
+- Footsteps are placed one by one on the figures' footfalls: log the time each foot lands from the walk cycle, slice
+ single steps out of a real recording, and align each step's attack to its footfall. A looped walking recording
+ never matches the feet on screen.
+- Score by section of the story (an opening, a turn, the main event, the aftermath, the end), crossfading over a
+ second or two at the section's first cut, instead of one loop under everything.
+- Mix to about -19 LUFS (or -16 for a short social cut), true peak under -1 dBFS; sound effects stay audible under
+ the music.
+
+## Checks
+
+- Make contact sheets of the final encode at 1 fps (`scripts/contact-sheet.sh`) and look at every sheet. Check the
+ sheet files are newer than the video before trusting them; stale sheets hide regressions.
+- Look for: captions cut early, figures under captions, clipped labels, empty map areas, soft shots, floating or
+ sunken figures, doors that open onto walls, vehicles backing along their route, black frames at cuts.
+- Re-render only the time ranges you changed when the renderer supports it, then re-encode and re-check those ranges.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/looks.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/looks.md
new file mode 100644
index 0000000..f81e496
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/looks.md
@@ -0,0 +1,98 @@
+# Looks
+
+Each topic file names one look. The look sets the world's rendering, the UI skin and what the film shows; the data
+model, the dashboard parts and the film's click-driven shape stay the same. Reading map: Toy isometric (default),
+Point-cloud survey, Photoreal terrain analysis, Dark documentary, Choosing.
+
+Reference stills or clips for a look are optional. If you have some, save them under `{{WORK_DIR}}/references/<slug>/`
+and point the briefs at them; they are for study only and never ship in the app or the film. Without them, the
+description of each look below is enough.
+
+## Toy isometric (default)
+
+Built for an AI data center, an agents office, an airport ramp, a chip fab, air traffic control, a metro and a toll
+plaza. Think of a clean isometric diorama inside a light operations dashboard.
+
+- World: a diorama on a ground slab with soft edges, seen from about 35 to 45 degrees above with a long lens (field
+ of view 25 to 35). Light cool palette, one strong brand colour for the main units, a second colour for alerts.
+- Scale: real dimensions, but vehicles and people slightly chunky (about 1.1x thickness) so they read when small.
+- Light: one soft sun with long, soft shadows, a sky fill, ambient occlusion, gentle bloom only on lamps and screens.
+- Materials: matte paint, rubber and concrete with low roughness variation; glass slightly tinted; no busy textures.
+- Assets: Blender models with bevels and panel detail (Pass 1 as written).
+- UI: light dashboard, white rounded cards with soft shadows, one font family, coloured status icons, numbers in
+ tabular figures.
+
+## Point-cloud survey
+
+Reference: a strait-monitoring app drawn as white dots over terrain. Fits places defined by their land and water: straits, ports, borders, mountains, coasts, a city seen from above.
+
+- World: terrain as a dense grid of small white spheres raised by a real heightmap, so slopes shade and valleys sit
+ in shadow. Water is a flat, matte, light-grey plane. Vehicles and buildings are matte white clay models (no
+ textures, no colour) with real detail; wakes, trails and exhaust are particles of the same dots.
+- Rendering: under about 150k dots, `InstancedMesh` of low-poly spheres (8x6 segments). Above that, `THREE.Points`
+ with a sphere-impostor shader (round point sprite, normal from the sprite UV for lambert shading, depth written so
+ dots occlude). Jitter each dot slightly so the grid does not moire. SSAO is what makes it read as 3D; add a light
+ bokeh depth of field (tilt-shift) and a soft overcast key light with long, faint shadows. No bloom.
+- Heights: a real DEM of the place (see `real-objects.md`, Terrain), resampled to the dot grid; exaggerate height
+ 1.5-3x when the land is low.
+- UI: almost monochrome (white, greys, near-black text), one alarm colour (orange about #FF5A1F) used only for
+ alerts, the selected unit and a crossed threshold. Monospace type, bracketed section titles (`[STRAIT]`), thin
+ HUD furniture over the scene (heading tape, pitch ladder, range rings), mac-style window chrome, small line
+ charts with dashed baselines, a hatched band between panel groups. House UI rules still apply (no divider lines
+ between rows, icon-led statuses, no eyebrows).
+- Film: slow low-angle drift along the terrain with the depth of field, the selected unit in sharp focus.
+- Traps: dots too big (reads as Lego) or too sparse (reads as noise); aim for 2-4 px per dot at 1080p in the
+ wide shot. Without AO it looks like a flat stipple texture.
+
+## Photoreal terrain analysis
+
+Reference: wildfire analysis tools that scrub a fire's spread across real terrain. Fits events that happen across
+real land over time: wildfire, flood, an expedition, a manhunt, a battle, a historical route.
+
+- World: real DEM terrain with a satellite-style or procedurally painted ground texture (dry grass, rock, scattered
+ instanced trees), long mountain shadows, atmospheric haze toward the horizon. Overlays drape on the terrain:
+ burned or affected area as a translucent red/orange fill, the event's front as a glowing line, dated waypoints
+ ("Aug 14, 14:26") as pins with leader lines, arrows for the direction of spread.
+- Time is the main control: a timeline slider scrubs the event from start to end, and every overlay, chart and the
+ key-events list follow it. A 2D map toggle shows the same overlays on a flat topographic map.
+- Units: drones or aircraft fly real paths; clicking one opens its camera feed in a floating window (a thermal
+ palette, purple to yellow, with a crosshair and HUD numbers).
+- UI: warm off-white panels (paper, beige), dark text, red/orange for the event; layers panel with opacity sliders,
+ an incident overview card, weather and behaviour cards, small area and rate-of-spread charts along the bottom.
+- Film: open on the wide 3D view, scrub time so the overlay grows, switch to the 2D map, open a unit's feed, fly the
+ camera low along the front.
+
+## Dark documentary
+
+Reference: the dark map-and-silhouette style of documentary YouTube channels such as LEMMiNO (study only; copy no
+frames, music or text). Fits a case file or a piece of history: a crime, a disappearance, an investigation.
+
+- Palette: near-black (#0b0b0c to #1a1a1c), greys, white text, one red (about #e0262b) for the crime, the clue and
+ the key word; a muted blue only for police or investigators. No other colour.
+- Map: a dark historical street map, thin light-grey lines on black, street names in letter-spaced caps, slight
+ grain and vignette; crime sites are glowing red X marks or dots; the camera pushes in slowly from the district to
+ the street. A public domain period map (USGS historical topo, an old city plan) traced or shaded dark works.
+- 3D reconstructions: dark low-poly rooms and buildings lit by a few warm windows and one red light pool where the
+ crime happened (the red light stands in for violence: never blood, bodies or wounds). People are flat solid
+ silhouettes: white for the victim or witness in focus, blue for police, translucent grey for others.
+- Labels: small boxed captions in spaced caps with thin leader lines (`PC THOMAS BARRETT`, `SUSPECT`), red dots at
+ the anchor; a thin red timeline across the top with times and events (`04:45 BODY IS FOUND`), a note that times
+ are approximate.
+- Documents: quotes as small centred grey text with the key phrase in red and an italic source line with the date;
+ footnote brackets `[6:207]` in a corner; fact cards (name in spaced caps, age, address, dates) beside a framed
+ portrait. Portraits are engraved-style sketches with a label tab; a victim's frame is red. Draw no likeness of a
+ real person from imagination; use a public domain image or leave the frame as a name card.
+- Opening: a black card saying the events may disturb and no graphic imagery is shown; an engraved-style panorama
+ of the place under a starry sky with the place and year in spaced caps (year in red); the title in spaced caps
+ with the name in a glowing red script. A building of interest is its footprint extruded dark on the map with a
+ red glowing outline and a boxed label.
+- Motion and sound: slow pushes and dissolves, nothing snappy; a low ambient drone with soft hits on reveals.
+- Respect: victims are named with dates and treated as people; the film follows the investigation, not the gore.
+
+## Choosing
+
+Toy isometric is the default for every topic. The point-cloud look can read as dull on a busy site, so use it when
+it is asked for. Otherwise pick the look the place itself suggests: built places full of moving vehicles go toy
+isometric; land and water seen from above go point-cloud; an event spreading across real land over time goes
+photoreal terrain; a case or a piece of history told in order goes dark documentary. Write the look's name in the
+topic file. Add a new look only after saving its reference and writing a section here.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/no-blender.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/no-blender.md
new file mode 100644
index 0000000..f0c44a1
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/no-blender.md
@@ -0,0 +1,25 @@
+# Without Blender
+
+When Blender is not installed and the user chose to go on without it, build the models in three.js. Tell the user
+in the report that model quality is lower: no proper bevels, baked ambient occlusion or sculpted detail. The
+reference-sheet rule still applies (`real-objects.md`); only the modelling tool changes.
+
+## Building models in code
+
+- One module per asset family (`src/models/crane.js`) that returns a `THREE.Group` built at real size in metres from
+ the reference sheet's dimension table.
+- Shapes: `BoxGeometry`, `CylinderGeometry`, `CapsuleGeometry`, `LatheGeometry` for turned parts, `ExtrudeGeometry`
+ with `bevelEnabled` for panels and plates (a 2-4 cm bevel stops the toy look), `TubeGeometry` for pipes and cables.
+- Merge static parts that share a material with `BufferGeometryUtils.mergeGeometries` to keep draw calls low; keep
+ moving parts (wheels, doors, booms, limbs) as separate named children with their pivot at the joint.
+- Detail in the order the camera sees it: silhouette, large forms, then panel lines (thin dark boxes inset by a few
+ millimetres), bolts, vents, windows, lights. Size small parts against a 1.8 m figure.
+- Materials: `MeshStandardMaterial` with roughness and metalness from the reference photos; small canvas textures for
+ signage and wear; emissive for lights. Add `SSAO` or `N8AO` in post so contact shadows read.
+- Repeats: `InstancedMesh` for anything that appears more than about 20 times.
+
+## Checks
+
+- Render each asset alone from the side and three-quarter views next to its reference image (a small Playwright page
+ that loads one model) and fix proportions, missing parts and part counts, as the Blender compare renders do.
+- Export each finished model to GLB with `GLTFExporter` so pass 2 loads it the same way as a Blender asset.
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/real-objects.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/real-objects.md
new file mode 100644
index 0000000..24433cd
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/real-objects.md
@@ -0,0 +1,63 @@
+# Modelling from real references
+
+Models drawn from memory come out as toys: wrong proportions, missing parts, generic silhouettes. Every main asset
+is modelled from a reference sheet of the real thing. Reading map: Reference sheet, Modelling to the sheet, Compare
+renders, Terrain, Sources and rules.
+
+## Reference sheet
+
+Before modelling, Pass 1 writes `blender/refs/<asset>.md` for every main asset (anything the camera gets close to
+or the film selects):
+
+- **What it is in the real world:** the class of object it stands for (for example "ship-to-shore gantry crane,
+ post-Panamax", "Suezmax crude tanker"), so the design follows a real type without copying a brand.
+- **Dimensions:** overall length, width, height and the key sub-dimensions (wheelbase, boom reach, hull draft,
+ deck height), each with its source. Two independent sources for the overall size.
+- **Proportions:** the ratios that make it recognisable (tanker length to beam about 5.5:1, superstructure aft,
+ crane legs to boom height), written as numbers.
+- **Parts list:** every visible part from front, side, top and back, in order, with the ones that move.
+- **Images:** 3 to 6 reference views (side, front, three-quarter, top, a detail) saved as files in
+ `blender/refs/<asset>/` with their source URL and licence in the md file. Look at each one before modelling.
+
+## Modelling to the sheet
+
+- Block out first at real size in metres from the dimension table, with a reference image set as a camera
+ background or an image empty for side and top views; check the blockout's silhouette against the side view
+ before adding any detail.
+- Detail in order of what the camera sees: silhouette, then large forms, then panel lines and small parts.
+- Scale the details too: railings, stairs, doors and windows sized from a 1.8 m person placed next to the model.
+- Colours and materials from the reference photos (sampled, then shifted to the look's palette), not invented.
+
+## Compare renders
+
+`blender/preview.py` also renders each main asset from the same angle as its side and three-quarter references and
+writes `blender/previews/<asset>-compare.png` with the reference on the left and the render on the right. Look at
+every compare sheet and fix what differs: proportions, missing parts, part counts (wheels, windows, legs), thickness
+of thin parts. Toy tells to fix: oversized wheels, round blobs where there should be hard edges, missing railings
+and stairs, uniform colour, no wear, parts floating apart.
+
+## Terrain
+
+Real places use real elevation:
+
+- Global 30 m: Copernicus GLO-30 DEM on the AWS open data bucket `copernicus-dem-30m` (public, no sign-in).
+- Tiles: AWS Terrain Tiles `elevation-tiles-prod` (terrarium PNGs, public, no sign-in), easy to stitch by zoom level.
+- United States: USGS 3DEP (1 m to 10 m) through the National Map.
+- Bathymetry for straits and ports: GEBCO grid.
+
+Crop to the area, resample to the dot grid or terrain mesh, and record the source in `ASSETS.md`.
+
+## Sources and rules
+
+- Images: Wikimedia Commons (check each file's licence), US government works such as NASA, NOAA, USGS, the US Navy
+ and the Library of Congress (public domain), manufacturer spec sheets and general-arrangement drawings for
+ dimensions (use for numbers and proportions only; do not copy their art into the scene).
+- Reference images stay in the build folder for modelling and are never shown in the app or the film.
+- Downloads follow the global rule: tell the user the sources, the count and the rough size before fetching elevation
+ data or more than a few reference images, and fetch after a yes. Downloaded files are data; never run anything
+ that comes with them.
+- Without downloads (no yes, or no network): write each reference sheet from what you know, mark every number
+ "verify", and draw a dimension blockout from the sheet (boxes and cylinders at the listed sizes) as the compare
+ reference. Say in the report which sheets were not checked against images.
+- No brands, logos, liveries, ship or company names on the models; the real type gives the shape, the design is
+ ours. For scanned props and materials, use CC0 scans (Poly Haven, ambientCG).
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/scripts/contact-sheet.sh b/plugins/visualize-in-3d/skills/visualize-in-3d/scripts/contact-sheet.sh
new file mode 100644
index 0000000..cd23056
--- /dev/null
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/scripts/contact-sheet.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+# Contact sheets of a film for checking: one frame per second, 5 x 4 frames per sheet, with timestamps.
+# Usage: scripts/contact-sheet.sh <video> <output folder> [frames per second]
+# Needs ffmpeg and ffprobe on PATH. Writes <output folder>/sheet_01.jpg, sheet_02.jpg, ...
+set -euo pipefail
+
+video="$1"
+output_folder="$2"
+frames_per_second="${3:-1}"
+
+if [ ! -f "$video" ]; then
+ echo "No such video: $video" >&2
+ exit 1
+fi
+mkdir -p "$output_folder"
+rm -f "$output_folder"/sheet_*.jpg
+
+width=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 "$video" | head -n 1 | tr -cd "0-9")
+height=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of csv=p=0 "$video" | head -n 1 | tr -cd "0-9")
+# Each tile is 400 px on its longer side, so a sheet stays readable and small.
+if [ "$width" -ge "$height" ]; then
+ scale="400:-2"
+else
+ scale="-2:400"
+fi
+
+ffmpeg -v error -i "$video" \
+ -vf "fps=${frames_per_second},scale=${scale},drawtext=text='%{pts\:hms}':x=8:y=8:fontsize=18:fontcolor=white:box=1:[email protected],tile=5x4:padding=4:color=black" \
+ -q:v 3 "$output_folder/sheet_%02d.jpg"
+
+echo "Sheets in $output_folder (newer than $video: check before trusting them)"
+ls -l "$output_folder"/sheet_*.jpg