openscad
Tool for rendering, validating, and exporting OpenSCAD 3D models for 3D printing.
Install
mkdir -p .claude/skills/openscad && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1958" && unzip -o skill.zip -d .claude/skills/openscad && rm skill.zipInstalls to .claude/skills/openscad
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.
Create and render OpenSCAD 3D models. Generate preview images from multiple angles, extract customizable parameters, validate syntax, and export STL files for 3D printing platforms like MakerWorld.Key capabilities
- →Generate multi-perspective model previews
- →Validate model syntax for compilation errors
- →Export design geometry to STL format
- →Extract and parse customizable parameters
- →Verify surface integrity across six viewing angles
How it works
Executes CLI tools provided by the OpenSCAD package to perform geometry rendering, syntax validation, and parameter analysis.
Inputs & outputs
When to use openscad
- →Validate 3D model syntax
- →Export SCAD files to STL for printing
- →Generate multi-perspective model previews
About this skill
OpenSCAD Skill
Create, validate, and export OpenSCAD 3D models. Supports parameter customization, visual preview from multiple angles, and STL export for 3D printing platforms like MakerWorld.
Prerequisites
OpenSCAD must be installed. Install via Homebrew:
brew install openscad
Tools
This skill provides several tools in the tools/ directory:
Preview Generation
# Generate a single preview image
./tools/preview.sh model.scad output.png [--camera=x,y,z,tx,ty,tz,dist] [--size=800x600]
# Generate multi-angle preview (front, back, left, right, top, iso)
./tools/multi-preview.sh model.scad output_dir/
STL Export
# Export to STL for 3D printing
./tools/export-stl.sh model.scad output.stl [-D 'param=value']
Parameter Extraction
# Extract customizable parameters from an OpenSCAD file
./tools/extract-params.sh model.scad
Validation
# Check for syntax errors and warnings
./tools/validate.sh model.scad
Visual Validation (Required)
Always validate your OpenSCAD models visually after creating or modifying them.
After writing or editing any OpenSCAD file:
- Generate multi-angle previews using
multi-preview.sh - View each generated image using the
readtool - Check for issues from multiple perspectives:
- Front/back: Verify symmetry, features, and proportions
- Left/right: Check depth and side profiles
- Top: Ensure top features are correct
- Isometric: Overall shape validation
- Iterate if needed: If something looks wrong, fix the code and re-validate
This catches issues that syntax validation alone cannot detect:
- Inverted normals or inside-out geometry
- Misaligned features or incorrect boolean operations
- Proportions that don't match the intended design
- Missing or floating geometry
- Z-fighting or overlapping surfaces
Never deliver an OpenSCAD model without visually confirming it looks correct from multiple angles.
Workflow
1. Creating an OpenSCAD Model
Write OpenSCAD code with customizable parameters at the top:
// Customizable parameters
wall_thickness = 2; // [1:0.5:5] Wall thickness in mm
width = 50; // [20:100] Width in mm
height = 30; // [10:80] Height in mm
rounded = true; // Add rounded corners
// Model code below
module main_shape() {
if (rounded) {
minkowski() {
cube([width - 4, width - 4, height - 2]);
sphere(r = 2);
}
} else {
cube([width, width, height]);
}
}
difference() {
main_shape();
translate([wall_thickness, wall_thickness, wall_thickness])
scale([1 - 2*wall_thickness/width, 1 - 2*wall_thickness/width, 1])
main_shape();
}
Parameter comment format:
// [min:max]- numeric range// [min:step:max]- numeric range with step// [opt1, opt2, opt3]- dropdown options// Description text- plain description
2. Validate the Model
./tools/validate.sh model.scad
3. Generate Previews
Generate preview images to visually validate the model:
./tools/multi-preview.sh model.scad ./previews/
This creates PNG images from multiple angles. Use the read tool to view them.
4. Export to STL
./tools/export-stl.sh model.scad output.stl
# With custom parameters:
./tools/export-stl.sh model.scad output.stl -D 'width=60' -D 'height=40'
Camera Positions
Common camera angles for previews:
- Isometric:
--camera=0,0,0,45,0,45,200 - Front:
--camera=0,0,0,90,0,0,200 - Top:
--camera=0,0,0,0,0,0,200 - Right:
--camera=0,0,0,90,0,90,200
Format: x,y,z,rotx,roty,rotz,distance
MakerWorld Publishing
For MakerWorld, you typically need:
- STL file(s) exported via
export-stl.sh - Preview images (at least one good isometric view)
- A description of customizable parameters
Consider creating a model.json with metadata:
{
"name": "Model Name",
"description": "Description for MakerWorld",
"parameters": [...],
"tags": ["functional", "container", "organizer"]
}
Example: Full Workflow
# 1. Create the model (write .scad file)
# 2. Validate syntax
./tools/validate.sh box.scad
# 3. Generate multi-angle previews
./tools/multi-preview.sh box.scad ./previews/
# 4. IMPORTANT: View and validate ALL preview images
# Use the read tool on each PNG file to visually inspect:
# - previews/box_front.png
# - previews/box_back.png
# - previews/box_left.png
# - previews/box_right.png
# - previews/box_top.png
# - previews/box_iso.png
# Look for geometry issues, misalignments, or unexpected results.
# If anything looks wrong, go back to step 1 and fix it!
# 5. Extract and review parameters
./tools/extract-params.sh box.scad
# 6. Export STL with default parameters
./tools/export-stl.sh box.scad box.stl
# 7. Export STL with custom parameters
./tools/export-stl.sh box.scad box_large.stl -D 'width=80' -D 'height=60'
Remember: Never skip the visual validation step. Many issues (wrong dimensions, boolean operation errors, inverted geometry) are only visible when you actually look at the rendered model.
OpenSCAD Quick Reference
Basic Shapes
cube([x, y, z]);
sphere(r = radius);
cylinder(h = height, r = radius);
cylinder(h = height, r1 = bottom_r, r2 = top_r); // cone
Transformations
translate([x, y, z]) object();
rotate([rx, ry, rz]) object();
scale([sx, sy, sz]) object();
mirror([x, y, z]) object();
Boolean Operations
union() { a(); b(); } // combine
difference() { a(); b(); } // subtract b from a
intersection() { a(); b(); } // overlap only
Advanced
linear_extrude(height) 2d_shape();
rotate_extrude() 2d_shape();
hull() { objects(); } // convex hull
minkowski() { a(); b(); } // minkowski sum (rounding)
2D Shapes
circle(r = radius);
square([x, y]);
polygon(points = [[x1,y1], [x2,y2], ...]);
text("string", size = 10);
When not to use it
- →Complex parametric modeling requiring GUI-based geometry adjustment
- →Non-3D printing design tasks needing high-fidelity rendering
Prerequisites
Limitations
- →Dependent on local OpenSCAD CLI availability
- →Visual validation requires manual inspection of generated output files
- →Cannot detect semantic logic errors in geometry construction
How it compares
It automates the multi-perspective visual verification process that typically requires manual UI interaction.
Compared to similar skills
openscad side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| openscad (this skill) | 154 | 7mo | Review | Intermediate |
| ui-ux-pro-max | 1,909 | 5mo | Review | Intermediate |
| svg-precision | 527 | 4mo | Review | Intermediate |
| mobile-ios-design | 272 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mitsuhiko
View all by mitsuhiko →You might also like
ui-ux-pro-max
nextlevelbuilder
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
svg-precision
dkyazzentwatwa
Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.
mobile-ios-design
wshobson
Master iOS Human Interface Guidelines and SwiftUI patterns for building native iOS apps. Use when designing iOS interfaces, implementing SwiftUI views, or ensuring apps follow Apple's design principles.
mobile-android-design
wshobson
Master Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.
mobile-design
sickn33
Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or native mobile apps.
frontend-slides
sickn33
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.