openscad-cad
Skill0 starsChanged 3 months agoMITView on GitHub
Drive OpenSCAD directly from the CLI to write, render, visually verify, and export parametric 3D models — without opening OpenSCAD''s GUI. Use whenever the user mentions OpenSCAD, .scad files, parametric CAD, Gridfinity bins/baseplates/inserts, enclosures, brackets, or wants a "3D printable part," even if they just describe dimensions and don''t name the tool. Also use this skill when the user wants to modify an existing .scad file, generate STL/3MF for 3D printing, or batch-generate several sizes of the same design. ALSO USE when the user asks to delete/remove a part, change a joint/magnet interface, rename a module, or archive obsolete versions — §4.6 impact analysis (dependents + callers + archive-first) is mandatory before any such change. MULTI-PART assemblies (2+ interacting parts that must fit: racks, gearboxes, enclosures with panels): ALSO load the scad-modeler skill — it adds gated planning, engineering calculations before geometry, and automated validation; openscad-cad alone is NOT enough there.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ciberjohn/Hermes-Skillstheir own version, first seen Sep 4, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ciberjohn/Hermes-Skills★ 17same 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 repository2 other files it gives its agents.
- openscad-organicSkill
- scad-modelerSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 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.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Write the model as OpenSCAD code, render a PNG, look at it, fix, and export STL/3MF only once it is right — all through the CLI.
- Very specific: line 34
Standard parametric parts (GenKit): If the request fits one of the 8 standard shapes (plate, plate_with_holes, bracket_l, box, lid, boss, …
- Very specific: line 56
Add --backend=Manifold to render/export on the snapshot build (much faster).
- Distinctive: line 63
Use gridfinity-rebuilt-openscad (kennetek).
- Very specific: line 105
Read its CHECK_RESULT and COVERAGE lines.
- Very specific: line 109
Never run check_dimensions / check_features by hand instead.
- Distinctive: line 129
Before deleting a part, changing a joint/pocket interface, or renaming a module:
- Distinctive: line 133
Show the list to the user: before executing.
- Distinctive: line 143
Before declaring done, check the result against the user's stated dimensions.
≈ “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 Skill
Write the model as OpenSCAD code, render a PNG, look at it, fix, and export STL/3MF only
once it is right — all through the CLI. Reasoning, caveats and incident history behind
every rule here: references/workflow_details.md (same section numbers). Which skill to
load, where a fact lives: references/retrieval.md (sibling claude_skills/references/).
0. Check installation
openscad --version || which openscad- macOS:
brew install --cask openscad@snapshot(the plainopenscadcask is 2021.01 and cannot parse current libraries). Checkwhich openscadafterwards. - Debian/Ubuntu:
sudo apt-get install -y openscad xvfb; prefix every PNG command withxvfb-run -aon headless Linux (never on macOS).
1. Core workflow
- Write a
.scadfile with every key dimension as a named variable at the top. - Render a PNG with
--renderand look at it. Compiling proves syntax, not shape. - Iterate until it looks right, then export.
The render is a sanity layer, never a gate: it catches a missing feature or a part in
the wrong place, not a wrong dimension. Anything dimensional needs a number — an
assert() in the model, or validate_scad.sh (§4.5).
Standard parametric parts (GenKit). If the request fits one of the 8 standard shapes
(plate, plate_with_holes, bracket_l, box, lid, boss, hole_pattern,
snap_hook) or a 2-part enclosure (box_with_lid), do not hand-write the .scad —
write requirements.json and run python3 ../scad-modeler/gen/emit_part.py requirements.json -o part.scad
(schema: ../scad-modeler/gen/schema.json; examples: ../scad-modeler/tests/genkit/fixtures/).
It emits both the geometry and the // EXPECTED_* declarations from the same numbers.
2. Commands
openscad --render -o preview.png --imgsize=1200,900 --autocenter --viewall --projection=ortho model.scad
# internal structure (dividers, pockets): top, front, iso
openscad --render -o preview_top.png --imgsize=1000,1000 --camera=0,0,0,0,0,0,300 --projection=ortho model.scad
openscad --render -o preview_front.png --imgsize=1000,1000 --camera=0,0,0,90,0,0,300 --projection=ortho model.scad
openscad --render -o preview_iso.png --imgsize=1200,900 --autocenter --viewall model.scad
openscad -o output.stl --export-format=binstl model.scad # binary STL
openscad -o output.3mf model.scad
openscad -o output.stl --export-format=binstl -D 'bin_width=3' -D 'label="Screws"' model.scad- Without
--renderthe PNG is the F5 preview, which can misdraw subtractions. --camera=tx,ty,tz,rx,ry,rz,dist; raisedistif the model is clipped.- Add
--backend=Manifoldto render/export on the snapshot build (much faster); checkopenscad --help | grep -i backendfirst. - On the 2026.06.12 snapshot
is_undef(X)returnedtrueeven with-D X=.... If a-Dflag seems ignored after 2 tries, pass the value as a module argument or make a separate file.
3. Gridfinity
Use gridfinity-rebuilt-openscad (kennetek); never hand-write Gridfinity math.
find ~ -maxdepth 6 -type d -name 'gridfinity-rebuilt-openscad' 2>/dev/null | head # reuse a clone (git pull)
git clone https://github.com/kennetek/gridfinity-rebuilt-openscad.git # only if none
sed -n '1,80p' gridfinity-rebuilt-bins.scad # the CURRENT variable names; they drift- Invoke only the entry points, from inside the clone:
gridfinity-rebuilt-bins.scad,gridfinity-rebuilt-baseplate.scad(also-lite, which still usesstyle_lip, andgridfinity-spiral-vase.scadfor vase mode). Never edit or-Dintosrc/. - Parameter tables:
references/gridfinity-params.md. - Custom compartments:
bin_translate()+compartment_cutter()insidebin_render(), sizes viacgs(); there is nocut()/cut_move(). Copy patterns from the// ===== EXAMPLES ===== //block at the bottom ofgridfinity-rebuilt-bins.scad.
cd gridfinity-rebuilt-openscad
openscad --backend=Manifold -o ../my-bin.stl --export-format=binstl \
-D 'gridx=2' -D 'gridy=3' -D 'gridz=4' -D 'gridz_define=0' -D 'divx=2' -D 'divy=3' \
-D 'scoop=1' -D 'style_tab=1' -D 'include_lip=true' -D 'magnet_holes=true' gridfinity-rebuilt-bins.scadClearances: references/tolerances.md. Reusable geometry: references/patterns.scad.
4. Threads (threads-scad)
git clone https://github.com/rcolyer/threads-scad.git, then use <threads.scad> (not
include). Modules: ScrewHole(outer_diam, height, ...) { children },
ScrewThread(...), ClearanceHole(...), CountersunkClearanceHole(...),
MetricBolt/MetricNut/MetricWasher, RodStart/RodEnd/RodExtender. Check parameter order
in threads.scad. Internal threads print from M2; external M3 is fragile; M4+ is
reliable — warn the user about load-bearing threads at M3 or below.
4.5 Checking a part numerically
One validation path, from the part's directory (scripts live in the scad-modeler skill):
bash .../scad-modeler/scripts/validate_scad.sh part.scad- Read its
CHECK_RESULTandCOVERAGElines. Report the part done only after a run on its current content. Exit 2 (NOT VERIFIED) is not a pass. CHECK_RESULT env=FAIL: stop, show theENV_FAIL:lines, fix (bash .../scad-modeler/scripts/setup_env.sh).- Never run
check_dimensions/check_featuresby hand instead. - Declare in the
.scadfile (declarations=FAILwithout the first two, or write// NO_BBOX: <why>/// NO_THROUGH_HOLES_CHECK: <why>):
// EXPECTED_BBOX: [40, 20, 15]
// EXPECTED_THROUGH_HOLES: 1
// EXPECTED_HOLE: [0, 0, 5, "Z", 8.0] // optional: x, y, z, axis, diameter- Measuring an STL yourself:
.../scad-modeler/scripts/stl_extent.py, never an inline parser. - Printability (advisory, judge each finding):
$(bash .../scad-modeler/scripts/resolve_python.sh --print) .../scad-modeler/scripts/check_printability.py --stl build/part.stl - Fit-critical hole (press fit, bearing, insert, snap) and no calibration profile:
propose a calibration coupon first (
calibration_coupon(),references/patterns.scadPattern 5). Usetrue_hole()(Pattern 0) for round fit-critical holes. - Name the confidence tier in the final response (
references/confidence-tiers.md).
4.6 Impact analysis before any design change (mandatory)
Before deleting a part, changing a joint/pocket interface, or renaming a module:
- Dependents:
grep -rn '^use\|^include' scad/ - Callers:
grep -rn '<module_name>' scad/ - Show the list to the user before executing.
- Archive first: move superseded
.scad/.stltoarchive/in the same step. Nothing is deleted outright.
5. Output conventions
- One project folder per design; shared library clones stay siblings.
- Hand back the
.scadsource, at least one--renderPNG, and the exported STL/3MF with a viewer command — stills hide interpenetration and Z-collapsed views mislead. - Descriptive file and variable names once final; a short
README.mdper project: what it is, the exact commands, which dimensions are confirmed vs estimated. - Before declaring done, check the result against the user's stated dimensions.
- Something actually went wrong this session (bug, false pass, wrong claim): register an
entry in
../INCIDENTS.jsonviapython3 ../scad-modeler/scripts/incidents.py add --title ... --where ... --symptom ... --root-cause ... --fix ....
Reference files
references/workflow_details.md— full text behind every section above.references/retrieval.md(siblingclaude_skills/references/) — skill routing.references/gridfinity-params.md— bin/baseplate-Dtables.references/confidence-tiers.md— what each tier may promise.references/tolerances.md— per-side clearances from real parts.references/patterns.scad—true_hole(),calibration_coupon(), pocket/sleeve/duct modules.../INCIDENTS.json— structured JSON bug log shared with scad-modeler (queried via../scad-modeler/scripts/incidents.py).
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.

