Back to Skills

build123d

verified

CAD modeling with build123d Python library. Use when creating 3D models, exporting to GLB/STEP/STL, or doing boolean operations (union, difference, intersection). Triggers on: CAD, 3D modeling, sphere, box, cylinder, mesh export, GLB, STEP, STL, solid modeling, parametric design, threads, fasteners, bolts, nuts, screws, gears, pipes, flanges, bearings, bd_warehouse, spur gear, helical gear, bevel gear, planetary gear, ring gear, cycloid gear, rack and pinion, gggears, herringbone, gear mesh, gear train.

View on GitHub

Marketplace

vibecad

rawwerks/VibeCAD

Plugin

build123d

Repository

rawwerks/VibeCAD
5stars

plugins/build123d/skills/build123d/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/rawwerks/VibeCAD/blob/main/plugins/build123d/skills/build123d/SKILL.md -a claude-code --skill build123d

Installation paths:

Claude
.claude/skills/build123d/
Powered by add-skill CLI

Instructions

# build123d CAD Modeling

## Zero-Setup with uv

No installation required. Run any build123d script with:

```bash
uvx --from build123d python script.py
```

This automatically downloads build123d and runs your script. First run takes ~30s, subsequent runs are instant.

**Install uv** (if not already installed):
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

## Critical: Imports

All exports are in the **main module**:

```python
from build123d import Sphere, Box, Cylinder, export_gltf, export_step, export_stl
```

**NEVER** use `from build123d.exporters import ...` - this module does not exist.

## Quick Start Example

```python
#!/usr/bin/env python3
from build123d import Sphere, Box, export_gltf, Pos

# Create shapes
sphere = Sphere(radius=20)
box = Pos(15, 0, 0) * Box(10, 10, 10)

# Boolean union
result = sphere + box

# Export to GLB (for web viewers, Three.js)
export_gltf(result, "./model.glb", binary=True)
print("Exported model.glb")
```

Run it:
```bash
uvx --from build123d python my_model.py
```

## Geometry Inspection (Optional)

To inspect geometry properties, add this to your script:

```python
def inspect(shape):
    bbox = shape.bounding_box()
    print(f"Size: {bbox.max.X - bbox.min.X:.1f} x {bbox.max.Y - bbox.min.Y:.1f} x {bbox.max.Z - bbox.min.Z:.1f}")
    print(f"Volume: {shape.volume:.1f}")
    print(f"Faces: {len(shape.faces())}, Edges: {len(shape.edges())}")

inspect(result)
```

A full inspection harness is available in `scripts/harness.py` for advanced use.

## Quick Reference

### Shapes
```python
Box(length, width, height)
Sphere(radius=20)
Cylinder(radius=10, height=25)
Cone(bottom_radius=15, top_radius=5, height=20)
Torus(major_radius=20, minor_radius=5)
```

### Boolean Operations
```python
union = shape1 + shape2           # Fuse
difference = shape1 - shape2      # Cut
intersection = shape1 & shape2    # Common volume
```

### Positioning
```python
from build123d import Pos, Rot
moved = Pos(x, y, z) * shape      # Translate

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4895 chars