code-built-3d

code-built-3d is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 258 tokens per session (2,207 once invoked), scanned A, original, MIT.

A code-based 3D scene system built with Three.js, a JavaScript library for displaying 3D graphics in a web page. It constructs objects from parts, renders them, lets users inspect or explode them, and can generate an endless seeded scene.

In plain words
What is it for?
Use it to build technical 3D illustrations, isometric environments, interactive cutaways, exploded views, and an endlessly generated building or city scene.
Why use it?
It avoids using images or external scene assets when the scene must be generated from code. The shared part data supports both assembling an object and showing its components separately.

Skill for Claude CodeCodex

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

Good fit Use it to build technical 3D illustrations, isometric environments, interactive cutaways, exploded views, and an endlessly generated building or city scene.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/code-built-3d
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 majiayu000/spellbook --skill code-built-3d
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

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 code-built-3d

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/code-built-3d/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/code-built-3d)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/code-built-3d"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/code-built-3d/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 code-built-3d

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/code-built-3d"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/code-built-3d.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 258 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,207 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.00258 $0.02207
Opus 5.5 $0.00103 $0.00883
Sonnet 5.5 $0.00052 $0.00441
Haiku 4.5 $0.00026 $0.00221

Measured 3d ago against content hash 03489f377115, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-built-3d 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 3d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (assets/kit.js, assets/tower.js, assets/vendor/BufferGeometryUtils.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/code-built-3d/SKILL.md · 84 lines

How it starts

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

代码搭 3D 场景

这个 skill 做两件事:从零件把一个东西搭出来,再把它拆开。两件事用同一套零件数据。

环节 怎么做 在哪
零件 每个物件是一个函数,往 Assembly 里加 box / cyl / cone / ball / line。每个零件带名字、角色(shell 是能降下去的外壳)、尺寸,可选爆炸方向 assets/kit.js 的 Assembly
画法 面的明暗按朝向分三档(顶面最亮,朝镜头的两面依次暗一档),每条边描细黑线;离焦点越远(竖向距离或深度)越融进白色 createLook(),一个着色器
镜头 正交相机。镜头 = 目标点、缩放、方位角、仰角,换镜头时用 smootherstep 连续过渡,缩放按对数插值。不硬切 Director
去壳 外壳按 y 方向缩到 0,像墙沉进地板。看房间时,上面的楼层整体抬起 setShell(),demo 里的 LIFT
拆开 把选中的部分改成逐零件建模,零件分层往上升,水平方向不超出给定范围;manifest() 给出零件清单(名字、尺寸、位置) exploder()、Assembly.manifest()
交互 悬停显示包围框和标签,点击切到对应镜头;DOM 气泡钉在 3D 点上,被雾吞掉时自动隐藏 picker()、outline()、labels()
无限 以一个移动的坐标为中心,只保留前后若干块,出范围的块回收;同一个种子永远生成同一座城 streamer()、rng(seed)

文件

  • assets/kit.js:引擎(ES 模块)。
  • assets/tower.js:演示用的零件库,包括人、椅子、桌子、灯、植物、空调外机、7 种房间、楼层、电梯轿厢、邻楼分段(5 种立面)、连廊、电缆。
  • assets/demo.html:无尽楼。一份 import map 指向 vendor/。
  • assets/vendor/:three.js r184 的 three.module.min.js、three.core.min.js、BufferGeometryUtils.js,以及 MIT 许可证 THREE-LICENSE。不依赖 CDN。
  • scripts/serve.mjs:静态服务器。ES 模块不能从 file:// 加载,必须用它打开。
  • scripts/check.mjs:验收脚本,通过页面上的 window.__scene 驱动。

本地打开演示:

node scripts/serve.mjs assets 8765   # 在本 skill 目录下运行

然后打开 http://127.0.0.1:8765/demo.html。

步骤

  1. 先列零件,再写代码。把要搭的东西拆成层级:场景 → 块 → 物件 → 零件。每个零件写清名字、大概尺寸、属于外壳还是内部。这份清单就是拆解线的部件清单,manifest() 会原样输出。
  2. 写零件函数。一个物件一个函数,参数放位置、朝向和随机数。照着 tower.js 的 person / chair / table / acUnit 写。尺寸用真实比例,比如人约 1.7、门约 2、层高 3.4,画面才会显得可信。
  3. 决定哪些合并、哪些单独建模。远处和不交互的整块合并,只占 2 次绘制。要拆、要点选的部分用 build({ separate: true }),等需要时再改成单独建模,用完合并回去。
  4. 定镜头。至少要有:远景、跟拍主角、进入内部、换一个角度。巡游按时长轮换;用户点了以后停止巡游,按 Esc 回到巡游。
  5. 加去壳和拆开。外壳零件统一标 role: 'shell'。拆开时给 bounds,防止零件穿出墙外。
  6. 接无限生成。块的大小要大于一屏的高度或宽度;前后保留的范围要覆盖远景能看到的范围,否则会看见楼顶或楼底。
  7. 暴露 window.__scene(形状见 demo),然后验收:node scripts/check.mjs <目录> --out <截图目录>,全部 ✓ 后再看截图。

硬规则

  • 零图片:不加载任何贴图或图片文件。窗户、文字以外的细节全部用几何体表现。气泡里的表情用内联 SVG 画。验收会拦截图片请求,以及任何离开所在目录的请求。
  • 只学手法:参考作品的题材、角色设定和文案不照搬。
  • 颜色克制:只有白、灰两档和黑色点缀,不加任何彩色。描边只用一种墨色。
  • 镜头不硬切:所有换景都要连续过渡。减少动态效果时不自动巡游,换镜头直接跳到位。
  • 逻辑和画面分开:楼层、焦点、是否已拆开这些状态在 JS 里,画面跟着状态走;advance(sec) 能不等真实时间直接推进模拟,测试靠它。
  • 性能:远处的东西合并成大块;单独建模只给当前在看的那一块。

Read the full file on GitHub · 84 lines

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. 3d ago First seen · 84 lines · 258 tokens per session scan A 03489f377115

Subscribe to this mod's changes

code-built-3d is a skill published in the GitHub repository majiayu000/spellbook (290 stars, last pushed 2d ago), licensed MIT. It adds 258 tokens to every session and 2,207 once invoked, about $0.0010 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-11-03.

Related

code-built-3d compared with skills from other repositories

code-built-3d next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-built-3dmajiayu000/spellbookSkill2902d agoMITA258Claude Code, Codex
cao-session-managementawslabs/cli-agent-orchestratorSkill1.5kyesterdayApache-2.0B83Claude Code
workflowzhinkgit/embeddedskillsSkill78517d agoMITA88Claude Code
pneuma-sessionpandazki/pneuma-skillsSkill161yesterdayMITA127Claude Code, Codex
fast-resumeangristan/fast-resumeSkill190yesterdayMITA50Claude Code, Codex
lov-organize-storagelovstudio/skillsSkill723d agoMITA58Claude Code
lov-finder-actionlovstudio/skillsSkill723d agoMITA36Claude Code