From cad
Generates, inspects, and validates parametric CAD models from natural-language specs, reference images, or 2D drawings. Outputs STEP/STP, STL, 3MF, and GLB.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cad:cadThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Provenance: maintained in [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad).
LICENSEagents/openai.yamlreferences/build123d-modeling.mdreferences/cad-brief.mdreferences/inspection-and-validation.mdreferences/parameters.mdreferences/positioning.mdreferences/repair-loop.mdreferences/snapshot-review.mdreferences/step-generation.mdreferences/supported-exports.mdrequirements.txtscripts/inspect/__main__.pyscripts/inspect/cli.pyscripts/inspect/inspect_refs/__init__.pyscripts/inspect/inspect_refs/cli.pyscripts/inspect/inspect_refs/inspect.pyscripts/packages/cadpy/pyproject.tomlscripts/packages/cadpy/src/cadpy/__init__.pyscripts/packages/cadpy/src/cadpy/analysis.pyProvenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.
Create or modify parametric CAD models from natural-language requirements, generate validated STEP/STP artifacts, inspect geometry references, and return checked outputs. Treat STEP as the primary CAD artifact. Treat STL, 3MF, and native GLB as secondary export workflows that branch from a STEP-first process. For assemblies, prefer cadpy.assembly.AssemblyHelper with source-level build123d joints, named mating datums, and native labels when the parts have functional assembly relationships.
There are two ways into the STEP workflow: generate from build123d Python source (the default when designing from scratch or modifying a generated model), or import an existing STEP/STP file directly (when no generator exists or the user explicitly targets the STEP file). Both produce the same inspectable artifacts.
Use this skill when the user asks for CAD files, STEP/STP files, build123d source, selector refs such as #o1.2.f1, mechanical parts, assemblies, enclosures, brackets, fixtures, holes, counterbores, countersinks, slots, pockets, bosses, standoffs, ribs, fillets, chamfers, shells, source-level joints, mating, or measurements. Also use it when the user supplies reference images or 2D technical drawings of a part to reproduce or take design intent from.
Also use it when the user asks for STL, 3MF, or native GLB output from CAD geometry. Keep those workflows secondary and load supported-exports.md for details. For 2D DXF drawings, use the $dxf skill; when a DXF projects from a 3D part, this skill owns the STEP geometry and $dxf owns the drawing.
Do not use this skill for render-only concept art, CAM toolpaths, engineering certification, FEA conclusions, architectural BIM, or freehand illustration unless the user also needs CAD geometry.
Use these defaults unless the user specifies otherwise. These are first-pass modeling defaults, not manufacturability, tolerance, or certification claims:
references/positioning.md; center of the main part or assembly when nothing better applies.AssemblyHelper relationships backed by build123d joints where applicable, explicit generated placements, and verbose native labels.Ask one focused clarification question only when missing information makes the model impossible, fit-critical, safety-critical, or compliance-bound. Otherwise proceed with explicit assumptions.
From the CAD skill directory, the launcher shape is:
python scripts/step ... # STEP generation, GLB/topology artifacts, mesh sidecars
python scripts/inspect ... # refs, measure, align, frame, diff
python scripts/snapshot ... # PNG/GIF visual review packets
Use the active project Python interpreter; treat python in examples as an interpreter placeholder. Use python scripts/<tool> --help for the complete current command interface; reference docs show recommended workflows, not every flag.
Target paths resolve from the command's current working directory, not from the skill directory. Run commands from the workspace that owns the artifacts and pass cwd-relative target paths so project CAD files never resolve accidentally under the skill directory. Keep a STEP output and its Python generator in the same directory with the same basename unless the user explicitly requests otherwise.
CAD references are #... selector tokens local to a target, for example #o1.2 or #o1.2.f1. Pass the STEP/CAD file as a separate target argument when using CAD CLIs.
Scale depth to the task: a simple part needs a short brief and few spec-driven checks; assemblies and fit-critical work need full positioning and alignment validation.
references/cad-brief.md.$step-parts before creating simplified placeholder geometry. If no exact match is found, record the miss and then use a documented envelope.gen_step(). When a Python generator exists, run scripts/step on the generator, never on its exported STEP. Use direct STEP/STP targets (--kind part|assembly) only for imports with no generator or when the user explicitly identifies the STEP/STP file as the target.scripts/step on explicit targets only; do not run directory-wide generation.scripts/inspect refs <step-or-cad-target> --facts --planes --positioning as the baseline, then verify the dimensions and relationships the user's spec calls out with targeted measure, align, frame, or diff checks.scripts/snapshot against it and review the output; deterministic checks passing is not a reason to skip. The only skip cases are documented in references/snapshot-review.md (no visible geometry changed, or no valid artifact exists); report the reason when skipping.After completing CAD work that creates or modifies .step, .stp, .stl, .3mf, or native .glb artifacts, you must ALWAYS hand the explicit file path(s) to $cad-viewer when that skill is installed. $cad-viewer must start CAD Viewer if it is not already running and return link(s) to the relevant created or updated file(s); include those live viewer link(s) in the final response. If $cad-viewer is unavailable or startup fails, report that and rely on CLI inspection plus snapshots instead of silently omitting the handoff. This rule applies to every workflow in this skill, including secondary STL/3MF/GLB outputs.
When verification snapshots are generated, include the saved PNG/GIF snapshot(s) in the final response. If no snapshot applies, or if snapshot generation fails, say why and report the deterministic validation that still ran.
references/positioning.md is authoritative for AssemblyHelper, build123d joints, explicit Location transforms, and alignment validation.git status, git diff, or file-size churn as CAD comparison for large exported STEP/STP, GLB/topology, STL, or 3MF artifacts. Compare source changes, scripts/inspect summaries, snapshots, or generated topology output instead; use path-limited git status only for bookkeeping.Load these files only when their trigger applies:
references/cad-brief.md — converting prose, reference images, and technical drawings into a CAD brief.references/build123d-modeling.md — build123d modeling patterns, topology, selectors, features, labels.references/step-generation.md — STEP generation from Python source, direct STEP/STP imports, and post-generation steps.references/inspection-and-validation.md — validation sequence, selector refs, facts, planes, measurements, alignment, diff, frame, and validation reporting.references/snapshot-review.md — mandatory snapshot policy, packet sizing, targeted views, and converting visual findings into geometry checks.references/positioning.md — part-local datums and origins, assembly transforms, build123d joints, CLI alignment validation, and positioning reports.references/parameters.md — parameterizing or animating a STEP model: source parameters, .step.js sidecar modules, viewer controls, and animation design.references/supported-exports.md — secondary STL/3MF/native GLB sidecar workflows.references/repair-loop.md — diagnosis and repair procedures.Final responses should include generated files, returned $cad-viewer viewer links, verification snapshots, validation actually run, assumptions, and caveats. Use references/inspection-and-validation.md for report structure.
npx claudepluginhub earthtojake/text-to-cad --plugin cadCAD modeling with build123d Python library. Use when creating 3D models, exporting to GLB/STEP/STL, or doing boolean operations (union, difference, intersection). Triggers on: CAD, 3D modeling, sphere, box, cylinder, mesh export, GLB, STEP, STL, solid modeling, parametric design, threads, fasteners, bolts, nuts, screws, gears, pipes, flanges, bearings, bd_warehouse, spur gear, helical gear, bevel gear, planetary gear, ring gear, cycloid gear, rack and pinion, gggears, herringbone, gear mesh, gear train.
Searches the step.parts catalog for off-the-shelf CAD parts like actuators, servos, motors, and fasteners, then downloads canonical STEP files for use in assemblies.
Guides Onshape CAD operations via onshape-mcp plugin with protocols for render/entity workflows, units/coordinates, FeatureScript, iteration, and gotchas like REMOVE-on-face auto-flip. Load before any Onshape builds.