From 3d-print-skill
Use when the user wants to design, model, or 3D print a part. Guides the complete workflow: requirements, CAD design with CadQuery, verification, interactive Three.js presentation, slicing, and printing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/3d-print-skill:3d-printThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Design parametric 3D models for FDM 3D printing using Python and CadQuery. This skill covers the complete workflow from gathering requirements through slicing and uploading G-code to the printer.
Design parametric 3D models for FDM 3D printing using Python and CadQuery. This skill covers the complete workflow from gathering requirements through slicing and uploading G-code to the printer.
This is a rigid process. Every part goes through every step. No shortcuts.
Before any design work, verify the toolchain is installed:
python3 --version # Need 3.10-3.12
python3 -c "import cadquery; print(cadquery.__version__)"
prusa-slicer --version # Optional — needed for slicing
ls ~/.config/3d-print-skill/printers/ # Optional — needed for printing
If anything is missing, read setup.md in this skill directory and run the bootstrap. This only happens once.
Before touching code, gather ALL information needed. Don't assume. Don't guess.
Always ask the user:
For motors, servos, sensors, and other non-uniform mating parts — DO NOT accept a single "diameter" number.
A motor is not a cylinder. Collect the full envelope:
Prefer a dimensioned side-view photo over verbal dimensions.
Mounting-surface clearance rule:
shaft_axis_z = mounting_surface_z + max_downward_reach_from_shaft_axis + safety_margin
NOT face_radius + safety_margin (wrong — ignores encoder, protrusions, shaft offset).
Annotate axes before designing: extrusion direction, axle direction, up/gravity direction.
For every dimension: "What constrains this? What is the minimum? Is there an upper limit?"
| Type | Meaning | Action |
|---|---|---|
| Fixed | Determined by mating part | Exact value + tolerance |
| Minimum | Must be at least X for strength | Calculate from physics, add margin |
| Free | No upper constraint | Be generous. Never default to compact. |
Document every parameter's constraint in code:
# [Fixed] bearing OD — from datasheet
bearing_od = 17.0
# [Minimum] wall thickness — plastic needs 2-3x metal equivalent
wall = 6.0 # minimum 5mm for load-bearing
# [Free — be generous] foot length — no upper limit
foot_extend = 35
Derive values from physics, not intuition. Add constraint validation assertions.
Read tolerances.md in this skill directory for fit type classification.
Read fasteners.md for edge distance rules and wrench clearances.
Read materials.md in this skill directory for material property tables.
Calculate:
All stresses must be well below material yield with safety margin. Include the force calculations in the CadQuery script output.
Mounting orientation matters:
fasteners.md for sizes).tolerances.md. Never blanket-apply clearances.Before writing ANY CadQuery geometry, draw a YZ cross-section sketch as ASCII art in the code comments. Must show:
This catches 90% of design failures before any code is written.
Structure every CadQuery script as:
import sys
from pathlib import Path
import cadquery as cq
# === CONSTRAINTS (from physical requirements) ===
# Every parameter documented with constraint type and source
# === CONSTRAINT VALIDATION ===
# Assertions that catch design errors before geometry
# === FORCE ANALYSIS ===
# Calculate stresses, safety factors
# === MODEL ===
# Build geometry from validated parameters
# === CUT VERIFICATION ===
# Point-in-solid checks for every boolean cut
# === EXPORT ===
output = Path(__file__).parent / "output"
output.mkdir(exist_ok=True)
cq.exporters.export(result, str(output / "part_name.stl"))
workplane(offset=-N) puts you at Y=+N..faces().workplane().center() for cuts — offsets are relative to face centroid. Use explicit cylinders at global coordinates with .cut().-90 about X puts max-Y face on bed. +90 puts min-Y face on bed.radiusArc is ambiguous — use threePointArc with explicit midpoint and probe-verify.Read verification.md in this skill directory for full procedures and code templates.
For every hole, bore, and through-cut, perform ALL THREE checks:
Common causes of covered holes: union after cut, fillet on hole edge, coplanar faces, wrong extrusion direction. Always cut holes LAST, fillet BEFORE cutting, extend cuts 1mm past each face.
Read viewer-template.md in this skill directory for the complete Three.js viewer template.
Every time you deliver a part:
cd output && python -m http.server 8765 --bind 127.0.0.1Do not skip this step because "the checks passed" — numerical verification is a prerequisite for presenting, not a substitute.
Read slicer.md in this skill directory for PrusaSlicer CLI usage and Moonraker upload.
~/.config/3d-print-skill/printers/<name>.tomlIf no printer is configured, tell the user the STL is ready and guide them to set up a printer (read setup.md).
All must pass before declaring done:
If ANY check fails: fix -> verify cuts -> render -> checklist. Never deliver with known issues.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub parhamdb/3d-print-skill --plugin 3d-print-skill