SKILL.md--- name: img2threejs description: Turn an object or character reference image into a quality-gated, animation-ready procedural Three.js model built in code. Use for image-to-3D reconstruction, detail-accurate object rebuilds, stylized/likeness-maximized human characters, sculpt specs, and staged code generation. license: Apache-2.0 version: 2.0.1 --- # img2threejs — Image to procedural Three.js Rebuild the object visible in a reference image as a **code-only** procedural Three.js model, gated by a staged sculpting pipeline and an AI-vision self-correction loop. This is reconstruction-by-code, **not** photogrammetry, mesh extraction, or downloaded art packs. That promise governs how the model is *built* — it says nothing about which file formats it can subsequently be *exported* to; an explicitly-selected emission target (`--target <kind>`) is a terminal, whole-artifact transform of the already-built model, verified to its own stated limit, never a second way to build one. Agent-agnostic: works under Hermes, Claude Code, Codex, or OpenCode. Wherever this doc says "agent vision" or "agent browser tool", use whatever the host provides — native image reading, a browser MCP (playwright/chrome-devtools), the project preview, or a user-supplied screenshot. This file is the always-loaded router: it holds the order of operations and every hard rule as one line. The full contract behind each rule lives in the `grimoire/` or `docs/` file that rule names — read the named file at the moment you reach that stage, not before. ## Canonical shared checkout Keep one checkout of this repository and let every host enter it through a symlink, so the hosts execute the same code instead of drifting apart. `npx --yes img2threejs@latest install` does this for the hosts it detects (`hermes`, `claude`, `codex`, `opencode`); it refuses (exit 2) to replace a link it does not manage, so a hand-made link is never silently swapped for a release copy. **Hermes** reads skills per profile: also link `~/.hermes/profiles/<profile>/skills/img2threejs` (the installer writes only `~/.hermes/skills/`). Install, manual symlinks, and troubleshooting: [`docs/INSTALL.md`](docs/INSTALL.md). ## When To Use The user attaches/points to an object image and wants a procedural Three.js model, a reconstruction/animation/destruction plan, a sculpt spec, or code. Also for material studies, action-ready props, game objects, botanical/mechanical parts, and stylized reconstructions. ## Profile preflight (once per run, before `forge/next.py`) Domain knowledge (CS2 skins, animated characters, emission targets) lives in plugins, not in this checkout. Pick the profile from the subject, then confirm this environment can start it: ```bash python3 forge/state.py init --help | grep -- --profile # profiles available here ``` - `generic` / `character` are built in: no harness, no plugin, nothing else to check. - A