img2threejs
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.
Install / Use
npx skills add anbeime/skill --skill img2threejsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of img2threejs
img2threejs scores 95/100 on our quality scale, 311th of 2,860 Automation skills we index (top 11%).
Its SKILL.md is 31 KB long, well organised into 19 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
With 7,172 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 39 days ago, so img2threejs is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
img2threejs compared with similar skills
All 4 of these similar skills score higher than img2threejs; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| img2threejs (this skill)by anbeime | 95 | 7.2k | 39d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 108.3k | 2d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 107.8k | 1d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 92.4k | today | MCP Server |
| LocalAIby mudler | 100 | 50.1k | today | MCP Server |
Frequently asked questions
- How do I install img2threejs?
- Run
npx skills add anbeime/skill --skill img2threejs. The install tabs above show the steps for each supported agent. - Which AI agents does img2threejs work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is img2threejs safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is img2threejs still maintained?
- The repository was last updated 39 days ago, so img2threejs is actively maintained.
Skill content
View source on GitHubname: 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: 1.5.2
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.
Agent-agnostic: works under 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 Claude and Codex execute the same code instead of drifting apart:
~/.claude/skills/img2threejs -> <your checkout>
~/.codex/skills/img2threejs -> <your checkout>
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.
Core Promise
Sculpt from a photo, in order — never one-shot a mesh:
- Run
python3 forge/next.py --state .img2threejs/state.json [<spec>]first, at every start, resume, and before every correction iteration. It reports the ordered checklist, exact next command, evidence status, and bounded correction-loop status; it never replaces the spec/pass gates. Obey a hard stop; never continue from memory. - Validate the image is a suitable 3D target (
grimoire/intake/validation_rubric.md). - Assess object class + complexity, then write a
qualityContractbefore any code. - Spec it: component hierarchy, materials, lighting, pivots, sockets, action anchors.
- Build pass-by-pass from blockout → structure → form → material → lighting → interaction → optimization.
- Verify each pass with a screenshot compared against the reference; fail a pass if an identity-defining feature is wrong even when the global score looks fine.
State explicitly when output is approximate/stylized/low-poly. A single image cannot reveal hidden sides or guarantee exact geometry — say so instead of faking confidence.
Mandatory Local State Gate
Conversation context is disposable; .img2threejs/state.json is the local checklist authority.
Initialize once per reconstruction, then gate every step through it:
python3 forge/state.py init --state .img2threejs/state.json --reference <img> --profile <generic|cs2|character|animated-character> --spec object-sculpt-spec.json
python3 forge/next.py --state .img2threejs/state.json [object-sculpt-spec.json]
python3 forge/state.py mark <step-id> --state .img2threejs/state.json --evidence <path>
next.pyprints the current step, pass, incomplete mandatory steps, exact next command, andloop/max. Exit code 3 orstatus=stoppedis a hard stop: report the reason and request input. Never bypass it by reconstructing progress from chat history.- Every completed step needs evidence; mark a non-applicable step
skippedonly with--reason— silent omission is forbidden. Loop counts derive fromreviewHistoryactions (refine-spec/refine-code), not agent memory. Defaults: 3 corrections per pass, 6 total. - Profiles add mandatory gates without changing the core order:
cs2requires classification, manifest, and a machine-readable CS2 review before AI review;characterrequires the character contracts and landmark evidence;animated-characteradds all ofcharacterplus the nine Stage R steps (grimoire/readiness/animation_contract.md). Pick it whenever the rig must MOVE — oncharacterthe Stage R gates are absent and the build completes without ever running them, which is how animation used to ship broken. Its order is load-bearing: repair the mesh, freeze it, bind additively, then verify parity. Every profile records suitability, projection applicability, and material-evidence applicability. The state file is a resumability index, not visual evidence: renders, specs, review history, and deterministic gates remain the authoritative artifacts.
Required Inputs
- one image path / screenshot / URL / attached image (if missing or unreadable, ask)
- intended use: prop, game object, hero render, playable/destructible object, animation rig (default: real-time browser prop with interactive performance)
- for a CS2 request, an authoritative classification record (family/subtype and evidence refs) or an explicit request for the user/vision provider to supply one; heuristic detection alone is not enough to select a geometry adapter
The Loop (scripts do enforcement; agent vision does judgment)
Run scripts from the skill root (forge/...). Pure Python 3.10+ stdlib, no pip installs.
Full flags: grimoire/scripts.md. Never let a script score visuals — that is the agent's job.
- Analyze the image first (agent vision, before any script): work the layered observation
protocol in
grimoire/intake/image_analysis.md— identify/classify, decompose macro→meso→micro, map part relationships, name materials in PBR terms, list identity-defining features, and flag what the single view hides. Observation before inference; controlled 3D vocabulary; 3D object-space not 2D image-space. Then probe local images:forge/stage1_intake/probe_image.py <image>(metadata only, not a visual check). 1a. Local Spec Search — after image analysis, before writing or refining a spec, pull local domain evidence (anatomy/PBR/wear/geometry/runtime/physics) rather than inventing it:python3 forge/stage2_spec/new_pre_spec_assessment.py "Name" --image <img> --out assessment.json(auto-runs BM25, auto-pickscs2/core_3dcollection, writes alocalSpecSearchbundle thatnew_sculpt_spec.py --assessmentcarries into the spec). Full query-expansion recipe (bilingual terms, focusedsearch_specs.pyretrieval, cache rules):grimoire/intake/local_spec_search.md. MUST read it before retrying an incomplete or domain-specific query. 1b. CS2 intake manifest — for a CS2 request, create and validatecs2-intake.jsonbefore pre-spec authoring (admission, heuristic signal, classification, family/route resolution). MUST readgrimoire/intake/cs2_intake_contract.mdcompletely before creating the manifest or running pre-spec assessment. 1c. Optional fidelity evidence adapters — only when they improve an observed weak point; the stdlib core remains authoritative. Thin/complex masks → local SAM2; character face/pose → MediaPipe; weak front/back cues → Depth Anything V2 (forge/stage1_intake/run_vision_adapter.py <segment|landmarks|depth> ...; every adapter emits provenance; monocular depth is relative only). MCP-only scene mutations never count as implementation — write the proven change back to the spec or TypeScript, rebuild, recapture. Full adapter + MCP routing and authority boundaries:docs/integrations/reference_fidelity_tooling.md. - Pre-Spec Assessment Gate — classify + score complexity + write the quality contract:
forge/stage2_spec/new_pre_spec_assessment.py "Name" --image <img> --complexity <simple|moderate|complex|ultra-complex> --out assessment.json. Rules:grimoire/intake/quality_contract.md. SetobjectClass.primaryDomain(object|character|hybrid) and fill the seededdetailInventory(itstargetMinDetailsscales with complexity). Supported CS2 knife skins and Glock-18 assets: always pass--cs2, which defaults the complexity tier toultra-complex(targetMinDetails16, floor 9) — the finish/wear/hardware is the item, so CS2 is held to the top fidelity bar. Author procedural GEOMETRY but route the FINISH through the projection path in step 2c — a procedural finish for a patterned skin (Doppler/Gamma/Marble/Fade) reads visibly wrong against the reference. Finish routes + rulebook:grimoire/build/cs2_finishes.md; optional exact-texture acquisition:grimoire/intake/cs2_texture_acquisition.md. 2b. Detail inventory (do not skip for detailed subjects) — scan zones and enumerate every identity-defining small detail (gloss, bevel, fasteners, linework, contours, stains):forge/stage1_intake/build_detail_inventory.py <image> --mode grid-3x3 --out-dir <dir> --out di.json. Each detail MUST map to acomponent.localFeaturesormaterial.localOverridesentry — never prose only. Taxonomy + 3D-term recipes:grimoire/intake/detail_inventory.md. 2c. Projection-first fidelity (characters AND reference-matched surfaces — supported CS2 skins, decals, painted patterns) — when the goal is matching a specific reference's surface, put the photo's own pixels on the mesh instead of approximating them procedurally. This is the single biggest fidelity lever; a procedural material for a patterned surface is the #1 reconstruction failure. Recipe (grimoire/character/likeness_maximization.md— its two levers generalize past characters): solve the camera (stage1_intake/solve_camera_pose.py→referenceCamera), de-light the reference (stage1_intake/delight_albedo.py, hard requirement — de-lighting is what makes projection safe), then project the de-lit crop and bake it into UVs (stage3_build/bake_projected_texture.py --mesh-id <id>). For a CS2 skin the projected de-lit crop IS the finish — no procedural Doppler material. For characters, first capture landmarks (stage1_intake/extract_landmarks.py --out anatomy.json), fillpreSpecAssessment.anatomy, routegrimoire/character/reconstruction.md. A single view cannot show hidden sides — report per-region confidence and request more views when it matters. Character sub-routes, in order — decide what parts exist before shaping any, and shape the head before the hair that sits on it:- Parts —
grimoire/character/structure_decomposition.md - Head —
grimoire/character/head_construction.md(what the likeness gate reads against) - Hair —
grimoire/character/stylized_hair_threejs.md+ parameter contract ingrimoire/character/threejs_hair_parameter_contract.json. Lock topology only after the silhouette review passes: material tuning cannot repair wrong lock topology. 2d. Reference-free humanoid — a generic figure with no reference image has nothing to measure, so fill anatomy from public canon:forge/stage2_spec/humanoid_proportions.py <spec> --style-heads 8 --in-place. It writesanatomy.source: "canon-table"so canon is never mistaken for measurement, refuses to run when the spec names a reference image, and names anything the corpus does not supply rather than interpolating it.
- Parts —
- Author the spec from the assessment:
forge/stage2_spec/new_sculpt_spec.py "Name" --image <img> --assessment assessment.json --manifest cs2-intake.json --out object-sculpt-spec.json. Replace generic starterfeatureReviewTargetswith the object's real identity-defining systems (≤5 critical, ≤3 important per pass); for characters addanatomy-proportion,face-landmark-placement,pose-silhouette,outfit-and-palette. Use 3D-graphi
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
108.3kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
107.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Scrapling
92.4k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
LocalAI
50.1kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
