From cad
Starts or reuses a CAD Viewer to generate review links for explicit CAD, implicit CAD, robot-description, DXF, and G-code files. Useful after generation skills produce .step, .stp, .implicit.js, .glb, .stl, .3mf, .gcode, .dxf, .urdf, .srdf, or .sdf artifacts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cad:cad-viewerThe 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/development.mdreferences/moveit2-server.mdreferences/viewer-features.mdrequirements.txtscripts/viewer/dist/assets/BufferGeometryUtils-xu92ooFc.jsscripts/viewer/dist/assets/BufferGeometryUtils-xu92ooFc.js.mapscripts/viewer/dist/assets/GLTFLoader-B3ztFMBW.jsscripts/viewer/dist/assets/GLTFLoader-B3ztFMBW.js.mapscripts/viewer/dist/assets/STLLoader-C7hGonJR.jsscripts/viewer/dist/assets/STLLoader-C7hGonJR.js.mapscripts/viewer/dist/assets/favicon-DLqji3p4.icoscripts/viewer/dist/assets/glbMeshWorker-iyKraBym.jsscripts/viewer/dist/assets/glbMeshWorker-iyKraBym.js.mapscripts/viewer/dist/assets/index-DnyN7Sps.jsscripts/viewer/dist/assets/index-vRirKMey.cssscripts/viewer/dist/assets/parseSdf-jwJeutXN.jsscripts/viewer/dist/assets/parseSdf-jwJeutXN.js.mapscripts/viewer/dist/assets/parseSrdf-5nF_MoHR.jsProvenance: 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.
Use this skill to open existing or newly generated CAD, implicit CAD, robot-description, DXF, or plain FDM G-code files in CAD Viewer and hand back live review links. The expected input is one or more explicit file paths.
Start or reuse one local CAD Viewer with npm run agent:start, passing the
absolute artifact directory as --dir. The agent:start launcher owns port
selection, compatible-server reuse, directory activation, and the ?dir= query
parameter. Dev-mode viewers are reused only for matching git identities; dist
bundle viewers can be reused across git branches when their viewer versions
match. It activates reused servers through the Viewer's lightweight directory
activation API, without requiring agents to probe ports or trigger catalog
scans manually. Use the Viewer URL printed by agent:start as-is, then add only
a file= query value for the artifact you want to review.
Choose --dir as the absolute directory that contains the model
artifacts and sidecars, commonly <repo>/models or the consuming project's
equivalent model directory. The file= value must be relative to that --dir.
Do not manually choose ports, probe servers, rewrite ?dir=, or start a
separate Viewer just to change directories.
Run from this skill directory:
npm --prefix scripts/viewer run agent:start -- --host 127.0.0.1 --dir <absolute-model-root>
Use the printed Viewer URL and append file=:
http://127.0.0.1:<printed-port>/?dir=/absolute/project/models&file=path/to/model.step
If a non-Viewer process or another worktree's Viewer occupies the candidate
port, the launcher will continue automatically. In sandboxed agent environments,
local binding or probe failures such as EPERM or EACCES can be expected;
rerun the same command with the needed permission/escalation.
file= link, resolve <dir>/<file> and confirm the
artifact exists. Pass the generated artifact (e.g. .step), not its
generator source (e.g. .py). If the resolved path is missing, do not
return the link, and instead report the problem and point to the correct
generated artifact path.--dir, then append
file=<path> for each requested file. The file path must be relative to
--dir.agent:start
without adding file=.The viewer port is dynamic — it is chosen at startup and may differ across
worktrees. To integrate with the Claude Preview tool, add --json to the
agent:start command:
npm --prefix scripts/viewer run agent:start -- --host 127.0.0.1 --dir <absolute-model-root> --json
The launcher writes a JSON result line to stdout after the human-readable lines.
Parse it by taking the last line of stdout that begins with {:
{"url":"http://127.0.0.1:<port>/?dir=<absolute-model-root>","port":<port>,"action":"reuse"}
action is "reuse" when an existing server was reused and is immediately
ready, or "start" when a new server process was spawned and may still be
initializing. For a "start" result, probe GET /__cad/server on the base
URL (e.g. http://127.0.0.1:<port>/__cad/server) until it returns HTTP 200
before passing the url value to the Claude Preview tool.
references/development.md when the user asks to modify, debug, or
iterate on CAD Viewer source.references/viewer-features.md when you need supported file types, Viewer controls, or file-specific feature details.references/moveit2-server.md only when the user specifically needs optional SRDF MoveIt2 IK or path-planning controls.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.
Render GLB 3D models to PNG images for visual verification. Use when you need to SEE your generated 3D model, verify geometry, check visual correctness, or show results to users. Triggers on: render GLB, preview model, visualize 3D, see my model, check geometry, visual verification, screenshot model, model preview.