img2threejs-reconstruction

img2threejs-reconstruction is a skill for Codex from zhuanggenhua/BoardGame. It costs 115 tokens per session (2,284 once invoked), scanned A, original, MIT.

A workflow for turning a reference image into a procedural 3D model prototype using Three.js, a JavaScript library for 3D graphics. The image is treated as a construction guide, not as one texture wrapped around the whole object.

In plain words
What is it for?
Use it to prototype books, boards, cards, card holders, dice towers, and other game props, including their geometry, materials, named parts, pivots, and animation hooks.
Why use it?
It prevents models from becoming generic themed shapes or flat image-covered surfaces that do not match the reference object's parts, materials, and proportions.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to prototype books, boards, cards, card holders, dice towers, and other game props, including their geometry, materials, named parts, pivots, and animation hooks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhuanggenhua/boardgame/img2threejs-reconstruction
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 zhuanggenhua/BoardGame --skill img2threejs-reconstruction
Clone the repo
git clone --depth 1 https://github.com/zhuanggenhua/BoardGame

Made for: 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 img2threejs-reconstruction

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/img2threejs-reconstruction"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/img2threejs-reconstruction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,284 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 94
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00115 $0.02284
Opus 5 $0.00057 $0.01142
Sonnet 5 $0.00023 $0.00457
Haiku 4.5 $0.00012 $0.00228

Measured 12d ago against content hash a50312a5e3f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

img2threejs-reconstruction 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 12d 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.

.spec/skills/img2threejs-reconstruction/SKILL.md · 108 lines

How it starts

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

Img2threejs Reconstruction

这个 skill 用于 BoardGame 项目里把参考图片转成可用的 Three.js 程序化模型原型;只写 BoardGame 的执行边界、临时目录、素材验收和交付口径,不替官方 img2threejs 工具本身背书。

前置锁定

动手前先锁四件事:

  • 问题对象:本轮要做的是哪个游戏资产,例如书本、棋盘、卡牌座、骰塔、道具,不要把临近素材当目标。
  • 真相来源:用户给的参考图、官方案例仓库、项目素材目录、规则图或原始图集;截图/缩略图只可辅助定位。
  • 目标入口:默认先放 temp/<asset>-three-demo/ 或用户指定临时目录;未获明确授权前不要改正式游戏代码或 public/assets/**
  • 验收口径:先约定是用法总结、结构拆解、临时 Three.js 原型、截图验收,还是正式资产候选。

官方/案例读取

当任务提到 img2threejs、官方 showcase、GitHub 案例或“别人生成的效果”时,先读参考仓库,不要凭印象写模型。

  • 优先读用户给定仓库或本地克隆的 README.mdCONTRIBUTING.mdsrc/demos/registry.ts
  • 至少看 2-3 个最终 demo 的 create*Model.ts,观察几何、材质、命名节点、userData.tick、look-dev lights。
  • 总结时用用户能听懂的口径说明:参考图是建模蓝图,不是主贴图;模型主体必须靠 Three.js 几何重建。

参考图拆解

写代码前先产出一份轻量结构拆解,至少包含:

  • 轮廓与比例:主外形、厚度、开合角、重心、可见面、遮挡关系。
  • 部件层级:哪些是主形体,哪些是可动部件、装饰件、贴附件、卡槽、铆钉、接缝、页块等。
  • 材质分区:皮革、纸张、金属、木头、布面、印刷图案、污渍磨损分别在哪里。
  • 几何策略:每个主要部件用 Shape + ExtrudeGeometry、primitive、curve/tube、自定义 geometry、instancing,还是小 mesh 阵列。
  • 贴图策略:CanvasTexture/图片 crop 只能用于 decal、文字、局部图案、bump、roughness 变化;不得用一张图包住主形体来冒充模型。
  • 运行时节点:需要暴露哪些命名节点、pivot、socket、动画钩子,供游戏里旋转、开合、翻页、选中或高亮。

参考图追踪门禁

写模型前必须先建立“参考图区域 -> 模型结果”的追踪表。没有这张表,不得进入建模。

表中至少覆盖:

  • 主体轮廓:参考图哪一张、哪一区域决定整体比例、外轮廓、厚度、开合状态。
  • 主要部件:封面、书脊、页块、扣件、绑带、角件、卡槽等分别来自哪张图的哪个可见证据。
  • 材质与颜色:皮革、纸张、金属、骨饰、污损、印刷内容分别从哪里取色或抽象。
  • 可借鉴但不可直用:哪些图片只提供风格气质,不能作为主体结构依据。
  • 缺源项:参考图没有覆盖的关键部件必须标为“缺参考”,不能用“死灵/法师/旧书”这类主题词脑补成正式结构。

如果用户给的是卡牌贴图、牌背、图标、图集或局部插画,而不是目标资产主体图,必须先说清:这些只能驱动卡牌、徽记、材质/配色或局部浮雕,不能证明书本主体长什么样。此时只能做两种事:

  • 请求或寻找书本主体参考图;
  • 或明确交付“基于当前贴图风格的概念白模”,不得称为参考图重建或 img2threejs 结果。

禁止泛主题生成

参考图重建的最低标准不是“符合题材”,而是“能从截图反推回参考图”。下列做法一律判失败:

  • 只根据题材词生成通用幻想物件,没有说明每个主要部件对应的参考图来源。
  • 只把卡牌贴图放进模型,却让书本封面、书脊、扣件、页块完全来自主观设计。
  • 先做一个看似完整的模型,再事后解释它“风格上参考了贴图”。
  • 验收图无法和参考图并排指出:轮廓、部件、材质、颜色、图案分别哪里相似。

建模规则

默认输出 createXModel(options): THREE.Group 风格的程序化 factory。

  • 主形体必须是几何:用可读的函数拆出封面、书脊、页块、卡槽、底座、边框、扣件、铰链等。
  • 细节必须有体积:边框、浮雕、页层、孔洞、铆钉、卡槽压边、磨损边不能只画在贴图里。
  • 材质要分层:使用 MeshStandardMaterial / MeshPhysicalMaterial 表达 roughness、metalness、clearcoat、bumpMap;不要靠单张 diffuse 图撑质感。
  • 贴图只做局部:卡面、徽记、文字、纹理噪声、磨损斑可以用 CanvasTexture 或裁图;不能把参考图整张铺到平面上。
  • 节点要命名:复杂模型给重要对象设置稳定 name,并在 root.userData.sculptRuntime.nodes 或等价结构里暴露给宿主。
  • 动画要预留:需要开合、翻页、旋转、发光、悬浮时,用 pivot/group 表达,不要靠改世界坐标硬摆。

Read the full file on GitHub · 108 lines

Files

What ships with it

1 file 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. 12d ago First seen · 108 lines · 115 tokens per session scan A a50312a5e3f6

Subscribe to this mod's changes

img2threejs-reconstruction is a skill published in the GitHub repository zhuanggenhua/BoardGame (23 stars, last pushed yesterday), licensed MIT. It adds 115 tokens to every session and 2,284 once invoked, about $0.0006 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

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

motion

How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.

OpenDCAI/GameFactory-3A · 0 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

threejs-exposure-color-grading

Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.

scottstts/Threejs-Awesome-Graphics-Agent-Skills · 60 tokens