by wrong-nebula
A 1.2 MB pure-Rust rewrite of headless Blender built for AI agents — 3D B-rep modeling engine, CLI, and MCP server
# Add to your Claude Code skills
git clone https://github.com/wrong-nebula/formaLast scanned: 12/3/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-12-03T03:24:46.811Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}forma is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by wrong-nebula. A 1.2 MB pure-Rust rewrite of headless Blender built for AI agents — 3D B-rep modeling engine, CLI, and MCP server. It has 972 GitHub stars.
Yes. forma passed AgentsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/wrong-nebula/forma" and add it to your Claude Code skills directory (see the Installation section above). forma ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
forma is primarily written in Rust. It is open-source under wrong-nebula on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh forma against similar tools.
No comments yet. Be the first to share your thoughts!
Forma is a lightweight pure-Rust headless 3D modeling engine (~1.7 MB native / ~0.8 MB WASM) built for AI agents. It evaluates a compact declarative pipe language (Forma-Pipe) into strict, watertight polyhedral solid geometry in ~5–17 ms with zero GPU required.
Connect forma-mcp (native binary) or npx -y -p forma-3d forma-3d-mcp (zero-install WASM via npm):
{
"mcpServers": {
"forma": {
"command": "npx",
"args": ["-y", "-p", "forma-3d", "forma-3d-mcp"]
}
}
}
Exposed tools (4 tools, 789 o200k tokens total):
eval — Run transactional Forma-Pipe code (strict: true auto-rolls back any non-manifold result) and return a ~100-token spatial diff (WT, NM, g, vol, bbox, size, tags).inspect — Read current scene invariants and bounding boxes without mutating state.tx — Instant copy-on-write state control: checkpoint, rollback, undo, reset.export — Export to .glb, .step, .3mf, .stl, .obj, .svg, .png (4-view studio), or .blend (via optional Blender bridge).Use either the compiled native binary (forma) or the cross-platform npm CLI (npx -y forma-3d):
forma spec # Print ~355-token language reference
forma spec --gbnf # Print GBNF grammar for constrained decoding
forma eval --strict \
--out part.glb \
--render preview.png \
--draw blueprint.svg <<'EOF'
...Forma-Pipe script...
EOF
(0, 0, 0) unless placed with at=(x,y,z) or z0=Z (sets bottom Z; if both at= and z0= are given, z0= overrides the Z coordinate after at= positions X/Y).tx(action="checkpoint", tag="base") before complex cuts/bevels so you can roll back in O(1).Forma-Pipe. Chain operations with |. Intermediate named parts still appear in the spatial diff (parts=N), while the last assigned variable is exported by default (or pass part in MCP export to pick a specific part).--strict / strict: true. Verify the returned spatial diff reports WT=ok and NM=0, plus exact bbox / size / section / clearance..png (--render preview.png) to confirm proportions visually, then export .glb (PBR + triplanar UVs), .step, .3mf, .stl, .obj, .blend (native CLI with Blender installed), or .svg blueprint (--draw blueprint.svg).name = expr | op | op (multi-line | supported; math + - * / sqrt sin cos asin acos abs pi).at=(x,y,z) or at=[(x,y,z), ...] (batch), z0=Z, rot=(rx,ry,rz).| Primitive | Notes |
|---|---|
box(sx, sy, sz, at=, z0=) |
Axis-aligned box |
cyl(r, h, segs=32, axis=x|y|z, at=, z0=) |
Cylinder (axis=x, y, or z unquoted, default z; segs=6 gives hex vertices at k*60°) |
cone(r0, r1, h) |
Frustum / cone |
sphere(r) |
UV sphere |
torus(R, r) |
Major radius R, tube radius r |
pipe(ro, ri, h) |
Hollow cylindrical tube |
extrude2d([(x,y), ...], z0, z1) |
Extrude closed 2D polygon |
revolve([(r,z), ...], segs=32) |
Lathe profile around Z (auto-closes at r=0) |
loft([(z, [(x,y), ...]), ...], segs=24) |
Multi-section smooth loft (segs 8..128; warns if clamped) |
thread(r0, r1, pitch, turns) |
Watertight helical screw thread |
arc_tube(center=(x,y,z), rx=, rz=, start=-90, end=90, r=0.08) |
Curved handle / arc sweep |
tube([(x,y,z), ...], r=0.08) |
Polyline pipe sweep |
text3d("TEXT", height=0.3, depth=0.08) |
Watertight 3D extruded vector text |
load("path.glb|obj|stl") |
Import existing .glb, .obj, or .stl mesh (or uploaded asset key in forma-server) |
add(b, at=), cut(b, at=), intersect(b) — at=[...] runs fast batch CSG.bevel(edges, w, segs=1) — semantic selectors: vertical, top_rim, bottom_rim, outer_rim, sharp, all (never guess integer edge indices).shell(t, open_top=true) — hollow solid with wall thickness t.subsurf(levels=1, crease=false) — Catmull-Clark subdivision (crease=true preserves sharp rims).extrude(faces, d) | inset(faces, amt, depth=0) — face selectors: top, bottom, sides, all.mirror(x|y|z) | pattern_linear(n, step=(dx,dy,dz)) / array(n, step=) | pattern_radial(n, r=, axis=z) / radial(n, r=, axis=z) | decimate(ratio=0.5, faces=) (QEM LOD reduction preserving watertightness)move(x, y, z) | rot(rx, ry, rz) (degrees) | scale(sx, sy, sz)on(base) (rests cleanly on top of base) | align(x|y|z, min|center|max, val) | align_z0(z)mat("name", color=(r,g,b), metallic=0.1, roughness=0.5) | color(r,g,b)section(part, z) — returns 2D cross-section loop count & area at plane Z.clearance(a, b) — returns exact minimum 3D distance between parts a and b.flange = box(4, 2, 0.4)
| mat("brushed_steel", color=(0.55, 0.68, 0.85), metallic=0.9, roughness=0.25)
| cut(cyl(0.5, 1.0))
| cut(cyl(0.25, 1.0), at=[(-1.4,-0.5,0), (-1.4,0.5,0), (1.4,-0.5,0), (1.4,0.5,0)])
section(flange, 0.0)
enclosure = box(3.0, 2.0, 1.0, z0=0)
| bevel(vertical, 0.2, segs=3)
| shell(0.15, open_top=true)
| mat("anodized_teal", color=(0.18, 0.56, 0.60), metallic=0.7, roughness=0.35)
head = cyl(0.7, 0.4, segs=6, z0=0)
shank = thread(0.32, 0.42, 0.16, 6) | align_z0(0.38)
bolt = head | add(shank)
| mat("titanium", color=(0.74, 0.78, 0.84), metallic=0.92, roughness=0.22)
body = cyl(0.5, 1.0, segs=32, z0=0) | shell(0.08, open_top=true)
handle = arc_tube(center=(0.48, 0, 0.5), rx=0.26, rz=0.28, start=-85, end=85, r=0.065)
mug = body | add(handle)
| mat("terracotta", color=(0.72, 0.36, 0.24), metallic=0.0, roughness=0.72)
0.4-thick plate with a 1.0-tall cylinder) to avoid grazing coplanar ambiguity.add() (like a bolt head + thread or mug body + handle), overlap them slightly (0.02 units) rather than kissing at an exact zero-thickness plane.bevel(vertical, w) before shell(t) when hollowing an enclosure so inner and outer walls stay clean and uniform.cut(cyl(r, h), at=[(x1,y1,0), ...]) instead of chaining separate cut() calls — it is faster and produces cleaner topology.--strict (WT=ok NM=0). If a boolean fails, adjust cutter clearance/overlap or roll back with tx(action="undo").A ~1.7 MB native / ~0.8 MB WASM pure-Rust headless 3D polyhedral modeling engine built for AI agents — CLI, WASM, and MCP server.
Forma replaces headless Blender's 3D mesh modeling, boolean, and studio-preview workflow for AI agents with a single pure-Rust binary—trading the 953 MB desktop stack and brittle bpy scripting for a compact declarative pipe language (Forma-Pipe), semantic edge/face selectors, strict-by-default manifold CSG booleans, transactional snapshots, and a built-in zero-GPU studio renderer.
| Metric | Stock Headless Blender 5.3 (bpy) |
Forma | Improvement |
|---|---|---|---|
| Cold-Start Eval + GLB Export | 1,306.8 ms | 16.9 ms (5.4 ms batch flange) |
~77×–89× faster |
| Completion Tokens (12-model avg) | 294,661 total | 84,551 total | 3.49× fewer (up to 15.5×) |
| Pass Rate (12 models / 10 labs) | 79.1% (bpy) |
95.5% – 100% | +16.4 pp |
| Binary / Install Footprint | 953 MB | ~1.7–1.8 MB native (~0.8 MB WASM) | ~530× smaller |
| Peak Memory RSS | 223 MB | ~6–14 MB (6.1 MB macOS / 13.5 MB Linux) |
~16×–36× less RAM |
| MCP Tool Schema Budget | — | 789 o200k tokens (4 tools) |
Strictly < 800 |
Forma-Pipe Language: Chain primitives and ops cleanly (box | bevel | shell | cut) with semantic selectors (vertical, top_rim, bottom_rim, outer_rim, top, sides)—zero fragile integer vertex indices.pipe, loft (segs 8..128), helical thread, sweep, text3d, and pattern_linear/pattern_radial.| on(base), | align(axis, min|center|max, val)), exact 3D clearance(a, b), 2D section(part, z) loop/area queries, and Euler genus (g) diagnostics.Front / Right / Top / Iso) studio PNG renderer with SSAO-lite + depth silhouettes + pure-Rust Deflate compression (~20–75 KB PNG in ~4 ms), plus dimensioned 1200×900 vector SVG technical blueprints (forma draw)..glb (glTF 2.0 Y-up), .obj, and .stl importers (load("item.glb")), topology-preserving QEM mesh decimation (| decimate(0.5)), native .glb (PBR + LSCM/triplanar UVs), faceted ISO 10303-21 .step (watertight planar-face solid; no analytic cylinders/NURBS), .3mf, .stl, .obj, .svg, .png, and .blend (via optional Blender bridge).forma-server): Separate opt-in HTTP/1.1 worker crate (cargo build --release -p forma-server, compact static binary, < 5 MB scratch Dockerfile) with zero impact on the core forma CLI, forma-mcp, or forma-3d npm/WASM bundle.npx -y forma-3d eval --strict --out flange.glb --render flange.png --draw flange.svg <<'EOF'
flange = box(4, 2, 0.4)
| mat("brushed_steel", color=(0.55, 0.68, 0.85), metallic=0.9, roughness=0.25)
| cut(cyl(0.5, 1))
| cut(cyl(0.25, 1), at=[(-1.4,-0.5,0), (-1.4,0.5,0), (1.4,-0.5,0), (1.4,0.5,0)])
section(flange, 0.0)
EOF
git clone https://github.com/wrong-nebula/forma.git
cd forma
cargo build --release
./target/release/forma eval --strict --out flange.glb --render flange.png --draw flange.svg script.forma
Forma is designed for drop-in agent use via MCP, CLI, Agent Skills, or GBNF constrained decoding:
SKILL.mdllms.txtAGENTS.mdgrammar/forma_pipe.gbnf (forma spec --gbnf)forma-mcp / npx -p forma-3d forma-3d-mcp)Add Forma's MCP server (4 tools: eval, inspect, tx, export — 789 o200k tokens total) to any MCP client:
{
"mcpServers": {
"forma": {
"command": "npx",
"args": ["-y", "-p", "forma-3d", "forma-3d-mcp"]
}
}
}
Or invoke directly from any shell-capable agent:
forma spec # ~355-token language reference
forma eval --strict --out out.glb script.forma # transactional eval + ~100-tok spatial diff
forma render --out preview.png script.forma # 4-view studio PNG (~4 ms, zero GPU)
forma draw --out blueprint.svg script.forma # dimensioned vector engineering blueprint
forma-3d)Install or run Forma's zero-dependency WebAssembly engine directly from npm (npmjs.com/package/forma-3d) on macOS, Linux, Windows, or in JavaScript/TypeScript:
npm install forma-3d # JS/TS ESM + WASM library + CLI + MCP server
npx -y forma-3d eval --strict --out part.glb script.forma
npx -y -p forma-3d forma-3d-mcp # stdio MCP server
import { evalPipe, exportMesh, renderPng } from "forma-3d";
const obs = await evalPipe(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, { strict: true });
const glb = await exportMesh(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, "glb");
const png = await renderPng(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, 512);
All models were evaluated head-to-head on stock headless Blender 5.3.0 (bpy) vs Forma (Forma-Pipe) across 6 cross-category exact-dimension tasks (flange_plate, pipe_tee, beveled_enclosure, hex_nut, subdiv_mug, pedestal_bowl), verified independently with trimesh + scipy (Chamfer distance, Hausdorff-99, Generalized Winding Number Volumetric IoU, watertight/0-non-manifold checks, and 16-layer planar sliceability).
low reasoning)| Model | bpy Pass (P@1 / P@3) |
Forma Pass (P@1 / P@3) | bpy Tokens (API / Comp) |
Forma Tokens (API / Comp) | bpy Mean IoU |
Forma Mean IoU | Comp Token Reduction |
|---|---|---|---|---|---|---|---|
anthropic/claude-opus-5.5 |
4/6 · 6/6 | 6/6 · 6/6 | 15,139 / 9,333 | 6,140 / 731 | 0.973 | 0.980 | 12.77× |
anthropic/claude-haiku-5.5 |
4/6 · 5/6 | 3/6 · 6/6* | 36,296 / 25,815 | 18,159 / 8,474 | 0.807 | 0.978 | 3.05× |
google/gemini-4-neon |
4/6 · 6/6 | 5/6 · 6/6 | 28,447 / 20,867 | 12,938 / 7,388 | 0.970 | 0.974 | 2.82× |
google/gemini-4-hydrogen |
3/6 · 5/6 | 5/6 · 6/6 | 27,794 / 18,297 | 10,157 / 5,020 | 0.818 | 0.989 | 3.64× |
openai/gpt-6.2-astra |
4/6 · 6/6 | 4/6 · 6/6 | 9,914 / 5,787 | 6,798 / 950 | 0.970 | 0.978 | 6.09× |
openai/gpt-6.2-sol |
4/6 · 6/6 | 4/6 · 6/6 | 10,333 / 6,239 | 7,126 / 1,243 | 0.968 | 0.972 | 5.02× |
qwen/qwen4-max |
2/6 · 4/6 | 4/6 · 6/6 | 43,265 / 36,827 | 19,161 / 12,133 | 0.651 | 0.965 | 3.04× |
z-ai/glm-5.4 |
5/6 · 6/6 | 3/6 · 6/6 | 9,380 / 6,151 | 11,632 / 2,696 | 0.960 | 0.985 | 2.28× |
x-ai/grok-4.7 |
5/6 · 6/6 | 4/6 · 6/6 | 88,001 / 76,397 | 30,024 / 14,558 | 0.966 | 0.972 | 5.25× |
deepseek/deepseek-v4.1-flash |
1/6 · 1/6 | 3/6 · 4/6 | 61,812 / 56,599 | 37,825 / 29,120 | 0.167 | 0.661 | 1.94× |
tencent/hy4-flash (none) |
1/6 · 1/6 | 3/6 · 5/6 | 52,799 / 22,079 | 10,497 / 1,574 | 0.159 | 0.924 | 14.03× |
mistralai/mistral-large-4-0† |
0/1 · 1/1 | 1/1 · 1/1 | 12,666 / 10,270 | 1,331 / 664 | 1.000 | 1.000 | 15.47× |
| Aggregate (67 paired trials) | 55.2% · 79.1% | 67.2% · 95.5% | 395,846 / 294,661 | 171,788 / 84,551 | 0.768 | 0.944 | 3.49× |
*On subsequent v0.2+ ring-preserving bevel fixes, claude-haiku-5.5 improved to 6/6 (100%) Pass@1 (10,920 API tokens) and all 4 re-tested models hit 24/24 (100%) Pass@2 (0.980 Mean IoU).
†Completed 1 paired task (flange_plate: 1-shot Forma vs 3-turn bpy) before upstream provider returned HTTP 400.
claude-haiku-5.5, gpt-6.2-sol, gemini-4-hydrogen, qwen4-max)| Reasoning Level | Paired Tasks | bpy Pass@3 |
Forma Pass@3 | bpy API / Cost |
Forma API / Cost | bpy IoU |
Forma IoU | Cost Reduction |
|---|---|---|---|---|---|---|---|---|
none |
12 | 83.3% | 91.7% | 53,812 / $0.100 | 22,453 / $0.012 | 0.792 | 0.925 | 8.57× |
low |
24 | 83.3% | 100.0% | 117,688 / $0.402 | 54,603 / $0.132 | 0.811 | 0.976 | 3.05× |
medium |
24 | 83.3% | 100.0% | 178,275 / $0.693 | 56,488 / $0.202 | 0.834 | 0.975 | 3.44× |
high |
24 | 83.3% | 95.8% | 269,423 / $1.285 | 80,107 / $0.326 | 0.864 | 0.941 | 3.95× |
| Metric | Stock Blender 5.3 (bpy) |
Forma (Forma-Pipe) |
Gain |
|---|---|---|---|
| Pass@1 / Pass@3 | 68.8% / 85.4% | 81.2% / 97.9% | **+1 |