openscad-cad
Skill17 starsChanged 2 months agoMITView on GitHub
Use when designing a 3D-print object from sketch/dims.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Altern92/openscad-cad-skillstheir own version, first seen Aug 19, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Altern92/openscad-cad-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- 3dprinterSkill
- ai-projectsSkill
- ciberjohn-no-slopSkill
- excalidrawSkill
- gymcoachSkill
- jevSkill
- joplin-brainSkill
- medium-storySkill
- openrouter-image-genSkill
- paperclip-creatorSkill
- proxmox-estateSkill
- short-videosSkill
- skill-writerSkill
- social-posterSkill
- t3mp3st-autonomous-securitySkill
- technical-trainerSkill
- transcribeSkill
- uk-business-consultantSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Ask until every dimension that affects printability is known.
- Distinctive: line 65
When the user supplies a photo of a hand sketch, confirm units (cm vs mm is the classic 10× disaster) and which measurements are critical …
- Very specific: line 70
Start from templates/parametric-part.scad.
- Distinctive: line 72
All dimensions as named variables at the top — never literals scattered in geometry.
- Very specific: line 77
Add assert() statements for sanity bounds (e.g.
- Very specific: line 90
If exporting ASCII for diffing, add --export-format asciistl.
- Distinctive: line 104
Default constraint in the template is a 220 mm-cube bed (Flashforge AD5X).
- Very specific: line 140
Render report is the truth: check Simple: yes and the stderr triangle summary BEFORE previewing — CGAL refuses/silently fixes some …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
openscad-cad — parametric design: sketch + dimensions → printable STL
The DESIGN stage of the print pipeline. Sibling skill 3dprinter (same
3dprinting/ category) handles everything AFTER an STL exists (slice, verify,
upload, print on a Flashforge AD5X). This skill handles everything BEFORE:
turning a sketch, photo, or spoken description with dimensions into a
parametrically-coded, verified, printable STL.
Trigger conditions
- User says "design / make / create an object" (or "can you model X?") and supplies a sketch, annotated photo, or verbal dimensions.
- User hands over a rough sketch / photo with arrows + measurements and expects a dimensional model back.
- Iteration on an existing model: "make it 4 mm wider", "add a hole here".
- A downloaded STL needs dimensioning edits (re-model it here instead of
mesh-sculpting; then continue in
3dprinter/multipart-stl-plates).
Tooling
- OpenSCAD — code-driven parametric CAD: the model is text, dimensions are
named variables, STL export is CLI-only. Ideal for agent-driven design
(chat → .scad → STL), and every model is git-versionable. Install on
Debian/Ubuntu:
On other distros use the official binary from https://openscad.org/downloads.html.sudo apt-get install -y openscad # universe repo; verify with `openscad --version` - CadQuery / build123d (Python, OCCT kernel) — optional. Only reach for it
when geometry is genuinely computed (threads, patterns, math-defined curves)
and OpenSCAD becomes painful.
pip install cadquerypulls ~1 GB of OCCT wheels — ask the user before installing. - Preview renders —
stl_preview.pyfrom sibling skill3dprinter(scripts/) renders iso/front/side/top PNGs with no GPU deps.
Workflow
1. Gather the spec (do not skip)
Ask until every dimension that affects printability is known. Default to a markdown table of named dimensions so the user can correct one value and the rest of the flow stays honest:
| dim | value (mm) |
|-----|-----------|
| width | 40 |
| depth | 25 |
| height | 12 |
| wall | 2 |
| hole Ø | 5 |When the user supplies a photo of a hand sketch, confirm units (cm vs mm is the classic 10× disaster) and which measurements are critical fits.
2. Author the parametric model
Start from templates/parametric-part.scad. Rules:
- All dimensions as named variables at the top — never literals scattered in geometry. Iteration = edit variable + re-render.
- One module per logical feature; assemble in a top-level
union()/difference(). $fn = 64for smooth curves; drop to 6–12 only for stylized/low-poly effects or when triangle count explodes (many holes).- Add
assert()statements for sanity bounds (e.g. wall ≥ 0.8 mm, overall ≤ bed envelope). - Comments: one line per feature naming the dimension it uses.
3. Render to STL (CLI, headless)
openscad -o out.stl --export-format binstl part.scad
# Override a dimension from chat without editing the file:
openscad -o out.stl -D 'width=44' -D 'depth=28' --export-format binstl part.scadBinary STL is the default format for slicers and for the 3dprinter skill.
If exporting ASCII for diffing, add --export-format asciistl.
4. Verify before showing the user
- Manifoldness: OpenSCAD's stderr prints
Simple: yes/noafter rendering (CGAL).Simple: nomeans non-manifold — fix the CSG before slicing. - Well-formed file: assert the binary size:
import struct d = open('out.stl','rb').read(); n = struct.unpack('<I', d[80:84])[0] assert len(d) == 84 + 50*n # header(80) + count(4) + n × 50-byte records - Envelope check: dims must fit the printer bed with ≥ 5 mm margins all
around (Orca rejects plates that hug an edge — see
multipart-stl-plates). Default constraint in the template is a 220 mm-cube bed (Flashforge AD5X). - Visual:
stl_preview.py out.stl preview→ PNGs; inspect them. Vision models MISREAD raw meshes — trust the OpenSCAD source and section analysis over a vision model's guess when they disagree. - Confirm final dims from the model (e.g. re-measure with a mesh reader) match the agreed table before presenting.
5. Hand off
Save the STL under the workspace models dir and hand to sibling 3dprinter
for channels-confirm + slice + print.
FDM printability constraints (0.4 mm nozzle reference)
| Feature | Rule | Why |
| Bed envelope | ≤ 210³ mm usable on a 220 bed (minus margins) | plate-edge rejection, brim |
| Min wall | ≥ 0.8 mm (2 perimeters); 1.2+ mm for functional | 0.4 mm nozzle, strength |
| Min feature / text | ≥ 1.2 mm relief; emboss better than deboss below 2 mm | extrusion fidelity |
| Min hole Ø | ≥ 1.2 mm; countersink/lead-in for screws | droop + first-layer squish |
| Sliding fit clearance | + 0.3–0.4 mm on the shaft | FDM tolerance band |
| Snap / press fits | +0.2 mm / −0.1–0.15 mm interference | PETG flex, PLA snaps brittle |
| Overhang | ≤ 45° unsupported; ≥ 60° or 10 mm bridges need support | droop |
| First-layer critical fits | compensate elephant foot ~0.1 mm (chamfer bottom edge) | layer-1 squish |
| Large flat bases | chamfer corners, avoid huge unsupported flats | warp |
Pitfalls (learned)
- Units: OpenSCAD has NO units — everything is mm by convention. A part modeled in inches is 25.4× too big; sanity-check envelope after first render.
- Boolean slivers:
difference()leaves zero-thickness walls when the cutter touches the outer surface — offset the cutter by ≥ 0.1 mm and never leave a shared-face boolean. - High
$fneverywhere: hundreds of smooth holes → multi-MB STL and slow slicing. Reserve 64 for visible curves; use$fn=6–12cylinders inside hidden cavities. - Render report is the truth: check
Simple: yesand the stderr triangle summary BEFORE previewing — CGAL refuses/silently fixes some degenerate CSG. - Naive chamfers bloat the part: a bottom-edge chamfer built with
minkowski()expands the footprint by the chamfer radius (40×25 declared became 40.5×25.5). Keep the box true to size and let the slicer's elephant-foot compensation handle layer-1 squish.
See also
- Sibling
3dprinter— slice → verify → print pipeline (OrcaSlicer headless, Flashforge LAN API, material channels). - Sibling
multipart-stl-plates— multi-shell STLs, plate packing, binary STL read/write, Orca plate-rejection rc codes. templates/parametric-part.scad— starter skeleton with named dims, asserts, and a printability pre-flight.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

