A systematic workflow to design, validate, and export 3D models for printing using OpenSCAD.

Install

mkdir -p .claude/skills/printable && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11776" && unzip -o skill.zip -d .claude/skills/printable && rm skill.zip

Installs to .claude/skills/printable

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when the user wants to create, design, or build a 3D model for 3D printing using OpenSCAD. Triggers on mentions of 3D printing, OpenSCAD, STL export, printable parts, or physical object design.
197 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Interview the user to gather requirements for a 3D model
  • Research dimensions for the object if unknown
  • Design and code parametric OpenSCAD scripts
  • Validate the OpenSCAD model using `validate-model.sh`
  • Export the validated model as an STL file
  • Suggest appropriate materials and print settings based on use case

How it works

The skill guides the user through an interview to gather design requirements, then designs and codes a parametric OpenSCAD script. It validates the model using a script and exports it as an STL file.

Inputs & outputs

You give it
User's idea for a 3D printable object, including physical description, purpose, dimensions, fit requirements, material, printer specs, print orientation, suppor
You get back
Validated, print-ready STL file and the corresponding parametric OpenSCAD script

When to use printable

  • Designing custom parametric mechanical parts
  • Creating STL files for 3D printing
  • Validating 3D model geometry for printability

About this skill

Printable 3D Model with OpenSCAD

Overview

Guide the user from idea to validated, print-ready STL. Workflow: Interview → Design → Code → Validate → Export.

All models are parametric OpenSCAD scripts. All dimensions in mm. Every model must pass validate-model.sh before delivery.

Workflow

digraph workflow {
  "User request" -> "Interview";
  "Interview" -> "Research dimensions (web)";
  "Research dimensions (web)" -> "Design & code .scad";
  "Design & code .scad" -> "Run validate-model.sh";
  "Run validate-model.sh" -> "Pass?" [label=""];
  "Pass?" -> "Export STL to ~/Downloads" [label="yes"];
  "Pass?" -> "Fix issues" [label="no"];
  "Fix issues" -> "Run validate-model.sh";
}

Interview Checklist

Ask these BEFORE writing any code. Use AskUserQuestion for structured input.

  1. What is the object? Physical description, purpose, how it will be used
  2. Dimensions — all critical measurements. If unknown, WebSearch for product specs (check printables.com, dimensions.com, manufacturer sites)
  3. Fit requirements — what fits into what? Snug, loose, or press-fit?
  4. Material — PLA, PETG, ABS, TPU? (suggest based on use case, see table below)
  5. Printer specs — nozzle diameter (default 0.4mm), bed size, layer height (default 0.2mm)
  6. Print orientation — which face on the bed? (suggest largest flat surface)
  7. Supports — design to avoid if possible; ask if user accepts supports
  8. Cutouts/holes — cable passages, mounting holes, ventilation?

Material Guide

MaterialBest forSnug tol.Loose tol.Press-fitNozzle °CBed °CShrinkageHeat limit
PLAPrototypes, displays, low-stress0.3-0.4mm0.5mm0.1mm190-22050-60Low60°C
PETGFunctional parts, outdoor0.3mm0.5mm0.15mm220-25070-80Low-Med80°C
ABSMechanical, heat-resistant0.4mm0.6mm0.2mm230-25090-110Med-High105°C
TPUFlexible, impact-absorbing0.5mm0.7mmN/A210-23060Low80°C

Suggest PLA unless: part sees heat (→PETG/ABS), needs flexibility (→TPU), or is mechanical/outdoor (→PETG).

For materials not listed, WebSearch: "[material] 3D printing tolerance temperature settings"

Design Rules (Hard Requirements)

Every model MUST follow these. Violations cause print failures.

RuleValueWhy
Min wall thickness1.2mm3 perimeters × 0.4mm nozzle
Max overhang45° from verticalBeyond this needs supports
Max bridge span10mmLonger spans sag
Min hole diameter2mmSmaller holes close up
Diameter jump transition45° cone if jump > 10mmPrevents floating layers in slicer
Flat base surfaceRequiredBed adhesion
Bottom edge fillets1-2mm radiusBed adhesion + stress reduction
All exposed edge fillets1mm radiusComfort + print quality
Vertical dimsMultiples of 0.2mm (layer height)Dimensional accuracy
Min standalone feature2mm widthThin walls break
Boolean overlaps≥0.5mmPrevents coincident surface artifacts

OpenSCAD Code Patterns

File Template

// === [Model Name] ===
// All dimensions in mm
// Material: [PLA/PETG/ABS]
// Print orientation: [description]

$fn = $preview ? 32 : 64;

// --- Tolerances ---
tolerance = 0.4;  // per side — adjust per material table

// --- [Component] dimensions ---
// group related params with comments noting source measurements

// --- Derived ---
// computed values from above params

// === Modules ===

// === Assembly ===
module assembly() {
    difference() {
        union() {
            // ALL solid geometry here
        }
        // ALL cavities/holes here (cut from full assembly)
        // Flatten base
        translate([0, 0, -500]) cube([1000, 1000, 1000], center = true);
    }
}

assembly();

Critical: Assembly-Level Cavity Cuts

NEVER pre-hollow parts before union. When you union a hollowed ring with a solid stem, the stem fills the cavity back in.

// ❌ WRONG: cavity gets filled by stem union
module ring() {
    difference() {
        cylinder(h = 10, d = 100);
        cylinder(h = 11, d = 94);  // hollow
    }
}
union() { ring(); stem(); }  // stem fills cavity!

// ✅ CORRECT: hollow at assembly level
difference() {
    union() {
        cylinder(h = 10, d = 100);  // solid ring
        stem();
    }
    cylinder(h = 11, d = 94);  // cavity cut AFTER union
}

Fillet Helpers

fillet_r = 1.0;

// Round outer convex edge of cylinder (subtract from model)
module outer_fillet(d, z, r) {
    translate([0, 0, z - r])
        rotate_extrude()
            translate([d / 2 - r, 0])
                difference() {
                    square(r + 0.01);
                    circle(r = r);
                }
}

// Round inner lip edge of cylinder (subtract from model)
module inner_fillet(d, z, r) {
    translate([0, 0, z - r])
        rotate_extrude()
            translate([d / 2, 0])
                difference() {
                    square([r + 0.01, r + 0.01]);
                    translate([r, 0]) circle(r = r);
                }
}

// Fill concave inner corner (add to model via union)
module concave_fillet(d, z, r) {
    translate([0, 0, z - r])
        rotate_extrude()
            translate([d / 2, 0])
                difference() {
                    square(r);
                    translate([r, r]) circle(r = r);
                }
}

// Rounded rectangular through-hole
module rounded_hole(w, h, d, r) {
    hull() {
        for (x = [r, w - r])
            for (z = [r, h - r])
                translate([x, 0, z])
                    rotate([-90, 0, 0])
                        cylinder(h = d, r = r);
    }
}

Radial Hole Through Curved Wall

Axis-aligned cubes create slanted cuts through curved walls. Use radial rotation:

hole_angle = asin(hole_x_offset / (outer_dia / 2));
rotate([0, 0, hole_angle])
    translate([-hole_w / 2, -(outer_dia / 2 + 1), 0])
        rounded_hole(hole_w, hole_h, wall + 4, fillet_r);

Undersized Hole Compensation

OpenSCAD inscribes polygons in circles, making holes smaller than specified:

// Compensated radius for accurate holes
comp_r = desired_r / cos(180 / $fn);

At $fn=64, the error is ~0.04% (negligible). At $fn=32, it's ~0.15%. Apply compensation only when tight tolerances matter.

Z=0 Base Cut

When tilting geometry, parts extend below z=0. Cut flush:

// ✅ CORRECT: cube top face at exactly z=0
translate([0, 0, -500]) cube([1000, 1000, 1000], center = true);

// ❌ WRONG: leaves 1mm gap (cube goes to z=-1, not z=0)
translate([0, 0, -501]) cube([1000, 1000, 1000], center = true);

Pitfalls (Learned from Real Prints)

MistakeSymptomFix
Pre-hollowed parts in unionCavity filled by other solidCut cavities at assembly level
Coincident surfaces in unionNon-manifold edges, slicer warningsOverlap shapes by ≥0.5mm
Separate gusset hull + stem4+ faces per edge at tangent lineBuild taper into the stem itself
Axis-aligned cut on curved wallSlanted hole, connector won't fitRadial cut with rotate([0,0,asin(...)])
Variable used before definedWARNING: unknown variableOpenSCAD top-level evaluates in order — define dependencies first
ASCII STL exportSlicer parsing issuesAlways --export-format binstl
Stem-to-cup diameter jumpSlicer "floating regions"Add 45° transition cone
Cable channel groove on stemWeakened wall, visible artifactRoute cables externally instead
Tolerance too tight (0.2mm PLA)Parts need force to fitUse 0.3-0.4mm for PLA snug fit
Ring height < component thicknessComponent sticks out, holes misalignedMeasure actual component, add ledge + clearance

Validation & Export

After writing the .scad file, ALWAYS validate before delivering:

# Run the validation script (must be executable)
${CLAUDE_PLUGIN_ROOT}/skills/printable/scripts/validate-model.sh model.scad

# Or manually:
openscad -o model.stl --export-format binstl model.scad 2>&1  # check for warnings
admesh model.stl  # check: parts=1, disconnected=0, degenerate=0

If admesh is not installed: brew install admesh (macOS) or apt install admesh (Linux).

Copy validated STL to ~/Downloads for user access.

Web Resources

Query these when you need more information:

Product dimensions (when user doesn't have measurements):

  • WebSearch: "[product name] dimensions mm" or check dimensions.com, printables.com
  • Check manufacturer spec sheets

OpenSCAD syntax (beyond the inline reference):

  • https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language
  • https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids
  • https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations
  • https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem
  • See openscad-reference.md in this skill directory for full offline reference

Material properties (for materials not in the table):

  • https://www.simplify3d.com/resources/materials-guide/properties-table/
  • https://www.matterhackers.com/3d-printer-filament-compare
  • https://ultimaker.com/learn/petg-vs-pla-vs-abs-3d-printing-strength-comparison/

Design rules & tolerances:

  • https://www.hydraresearch3d.com/design-rules
  • https://hackaday.com/2025/08/04/how-to-design-3d-printed-parts-with-tolerance-in-mind/
  • https://jlc3dp.com/help/article/3D-Printing-Design-Guideline

Community models (for reference designs):

  • https://www.printables.com — Search for similar designs with known dimensions
  • https://www.thingiverse.com — Community 3D models

When not to use it

  • When the user does not want a 3D model for 3D printing
  • When the user does not want to use OpenSCAD for design

Limitations

  • All models are parametric OpenSCAD scripts
  • All dimensions are in mm
  • Every model must pass `validate-model.sh` before delivery

How it compares

This skill provides a structured workflow for designing 3D printable objects using OpenSCAD, incorporating an interview, design rules, and validation steps, which differs from direct CAD software usage.

Compared to similar skills

printable side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
printable (this skill)04moReviewAdvanced
draw03moReviewBeginner
fritzing-custom-component-workflow02moNo flagsIntermediate
diagram-driven-execution02moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry