/openscad:openscad-languagefrom openscad
Write and edit OpenSCAD code for parametric 3D modeling. OpenSCAD language reference including primitives, transforms, boolean operations, modules, functions, and best practices. Use when creating .scad files, editing OpenSCAD code, or doing parametric/programmatic CAD.
Ships in openscad. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OpenSCAD is a script-based 3D CAD modeler. Models are defined programmatically — there is no interactive GUI modeling. Files use the .scad extension.
$fn to control facet count (smoothness) for curved surfacescube([x, y, z], center = true);
sphere(r = 5); // or sphere(d = 10);
cylinder(h = 10, r = 5); // or r1, r2 for cone
cylinder(h = 10, r1 = 5, r2 = 0); // cone
circle(r = 5);
square([10, 20], center = true);
polygon(points = [[0,0], [10,0], [5,10]]);
text("Hello", size = 10);
linear_extrude(height = 10) circle(r = 5); // cylinder
linear_extrude(height = 10, twist = 90) square([10, 2], center = true);
rotate_extrude() translate([10, 0]) circle(r = 3); // torus
translate([x, y, z]) child();
rotate([rx, ry, rz]) child(); // degrees around each axis
scale([sx, sy, sz]) child();
mirror([1, 0, 0]) child(); // mirror across YZ plane
color("red") child();
color([0.5, 0.5, 0.5, 0.8]) child(); // RGBA
union() { a(); b(); } // combine shapes
difference() { a(); b(); } // subtract b from a (first child is base)
intersection() { a(); b(); } // keep only overlap
module bolt(diameter, length) {
cylinder(h = length, d = diameter);
translate([0, 0, length])
cylinder(h = diameter * 0.6, d = diameter * 1.8);
}
bolt(6, 20);
translate([15, 0, 0]) bolt(8, 30);
wall = 2;
inner_r = 10;
outer_r = inner_r + wall;
function circumference(r) = 2 * PI * r;
Note: Variables in OpenSCAD are set at compile time, not at runtime. A variable can only be assigned once per scope.
// Linear pattern
for (i = [0:5]) translate([i * 10, 0, 0]) cube(5);
// Circular pattern
for (a = [0:60:359]) rotate([0, 0, a]) translate([20, 0, 0]) cylinder(h=5, r=2);
// Grid
for (x = [0:10:50], y = [0:10:30]) translate([x, y, 0]) cube(3);
module mount(type = "round") {
if (type == "round") cylinder(h = 5, r = 10);
else cube([20, 20, 5], center = true);
}
| Variable | Purpose | Typical Value |
|---|---|---|
$fn | Fixed facet count for curves | 32-128 for final, 16 for preview |
$fa | Minimum angle per facet | 12 (default) |
$fs | Minimum facet size (mm) | 2 (default) |
$t | Animation parameter (0-1) | - |
include <library.scad> // include definitions AND execute top-level geometry
use <library.scad> // include only module/function definitions
import("part.stl"); // import STL geometry
hull() { sphere(5); translate([20,0,0]) sphere(5); } // convex hull
minkowski() { cube(10); sphere(2); } // rounded cube
module rounded_box(size, radius) {
minkowski() {
cube([size.x - 2*radius, size.y - 2*radius, size.z - radius], center = true);
sphere(r = radius);
}
}
module shell(outer_size, wall) {
difference() {
cube(outer_size, center = true);
cube([outer_size.x - 2*wall, outer_size.y - 2*wall, outer_size.z], center = true);
}
}
module mounting_holes(spacing, hole_d, depth) {
for (x = [-1, 1], y = [-1, 1])
translate([x * spacing/2, y * spacing/2, 0])
cylinder(h = depth, d = hole_d, center = true);
}
module pipe(h, outer_r, wall) {
difference() {
cylinder(h = h, r = outer_r);
translate([0, 0, -0.1])
cylinder(h = h + 0.2, r = outer_r - wall);
}
}
outer_r = inner_r + wallcenter = true for primitives that will be differenced or intersected$fn globally or per-shape — higher values = smoother but slowerdifference() for holes — the first child is the base, subsequent children are subtracted$fn (16-24), increase for final output (64-128)# — highlight (transparent red overlay): #cylinder(h=5, r=2);% — transparent preview: %cube(20);! — show only this shape: !cylinder(h=5, r=2);* — disable (skip rendering): *cube(10);What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/model-viewerOpen, view, and inspect 3D models (.scad and .stl files) using the openscad-viewer MCP tools. Use when working with OpenSCAD files, STL files, 3D models, or when the user wants to see or inspect a model from different angles./parametric-designDesign parametric 3D models with OpenSCAD. Workflows for creating enclosures, mechanical parts, and assemblies. Use when the user asks to design, create, or model a physical object, enclosure, bracket, mount, or mechanical part.openscad@fingerskier-plugins is listed by fingerskier/claude-plugins — review the source before installing
npx claudepluginhub fingerskier/claude-plugins --plugin openscadOther plugins' skills for the same job