Lego 3D Voxel — AI skill for Claude Code
Turn a 3D model (GLB) into a buildable brick set — slice it into courses, one brick per cell, colours from the model own texture.
How to install Lego 3D Voxel
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open liangdabiao/lego-3d-voxel and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Lego 3D Voxel does
Turn a 3D model (GLB) into a buildable brick set — slice it into courses, one brick per cell, colours from the model own texture. A Claude/Codex skill.
Alternatives in AI
- WeKnora — Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, an 26.9k ★
- Free AI Courses — Interactive course teaching Product Managers how to use Claude Code effectively 2.2k ★
- DeepLearning.Ai Courses ClaudeCode — Vibe Genius 团队整理的 DeepLearning.AI 官方课程 'Claude Code: A Highly Agentic Coding Assistant' 学习笔记,由 Andrew Ng 和 Ant 326 ★
README
lego-3d-voxel
**把一个真实的 3D 模型(GLB)按层切开,变成逐层可拼的积木模型。** 给 Claude / Codex 这类 agent 用的 skill:输入一个 `.glb`,输出"每层铺什么砖、什么颜色"的体素数据,再接积木引擎装配成可旋转、可拆装的成品页。
A skill that slices a 3D model into horizontal brick courses — one brick per voxel cell, colours sampled from the model's own texture.

它做什么
| 步骤 | 脚本 | 产出 |
|---|---|---|
| 1. 切片 | scripts/vox.py |
volume.json:每格一个 [x, y, z, 色名] |
| 2. 验收 | scripts/preview.py |
正视 / 侧视 / 背视 + 分层图 |
| 3. 体检 | scripts/probe.py |
颜色分布、正面 ASCII 色图、深度剖面 |
| 4. 缩放(可选) | scripts/downscale.py |
一半 / 四分之一的同款模型 |
| 5. 装配 | scripts/build.mjs |
交给积木引擎,出 set.html / model.ldr / parts.csv |
切片本身**只用 Python + numpy**,不需要任何 3D 软件;第 5 步的装配用的是 [lego-forge](https://github.com/ericfu-tianchi/lego-forge) 引擎(外部依赖,见下文)。
为什么是"真切片",不是"照图建模"
两条路都试过:
- 看图/凭想象建模:形状必然失真,细节靠猜,颜色全错。用户明确否决过。
- 真按层切片:几何与颜色只有一个来源——模型文件本身。模型有凸起就有一层砖,模型是空心的,切片也是空心的。
代价是件数不设上限(一件模型可能几万块砖),换来的是外形忠实。这个 skill 站的是"形体优先"那一边。
安装
skill 就是一个文件夹,放到 agent 能读到的 skills 目录下即可:
# Claude Code(个人级)
git clone https://github.com/liangdabiao/lego-3d-voxel.git ~/.claude/skills/lego-3d-voxel
# 或项目级
git clone https://github.com/liangdabiao/lego-3d-voxel.git /.workbuddy/skills/lego-3d-voxel
`SKILL.md` 头部有 `name` / `description` 的 frontmatter,agent 靠它判断什么时候该用这个 skill。
**依赖**:Python 3.9+、`numpy`、`Pillow`
pip install numpy pillow
用法
# 1) 切片:128 层(推荐先切细,之后要小再缩小)
python scripts/vox.py --glb model.glb --out work/volume.json --courses 128
# 2) 验收:看三视图,确认轮廓不是一根根柱子
python scripts/preview.py --vol work/volume.json --outdir work --px 5 --floors 8
# 3) 体检:颜色分布、正面色图、深度剖面
python scripts/probe.py --vol work/volume.json --stats
python scripts/probe.py --vol work/volume.json --layers 60:80 --cols 20:60
python scripts/probe.py --vol work/volume.json --profile 40,30
# 4) 装配(需要 lego-forge 引擎)
cp scripts/build.mjs work/build.mjs # 只改里面的 title
node /bin/lego.mjs build
node <
Related Skills
Brick Mosaic Skill
把任意图片转换成乐高(LEGO)积木马赛克像素画,使用官方乐高 Art 套装配色,生成预览图、SVG 拼搭说明书和零件采购清单;支持 AI 风格优化(效果不好时用 imageGen 图片编辑强化主体后再生成)。用户提到
3D
Turn a photo or a description into a 3D model file (GLB and more) with a Wiro AI model
Rewind Learning
倒带学习法 · Rewind Learning Method — turn every finished AI-collaboration project into 4 lasting teaching artifact
Threejs To 3D Model
Agent Skill: 用文字描述生成带骨骼动画的 3D 模型(Three.js 代码 → GLB/FBX),直接导入 Unity / Unreal / Godot / Cocos / Web
Agent World
A local, vendor-agnostic voxel-world control room for coding-agent CLIs (Claude Code, Codex, Gemini, opencode,
Blender MCP
The most complete MCP server for Blender 🧊 — 223 tools so any AI agent (Claude Code, Cursor, opencode, Antigr
Related Agents
Asset Pipeline Engineer
Use for the 3D ASSET PIPELINE — optimizing, converting, and integrating models and textures for the web. Cover
Codex Art Director
Codex is the dedicated Art Director & Technical Artist for the studio. Codex owns the visual identity, 3D Voxe
Broll Verifier
Adversarially checks a slice of a broll-brick-layer placement plan - reads the actual frames inside each place