PluginBench
Skill
Review
Audit score 70

cad-viewer

earthtojake/text-to-cad

How to install cad-viewer

npx skills add https://github.com/earthtojake/text-to-cad --skill cad-viewer
Claude Code
Cursor
Windsurf
Cline
Full instructions (SKILL.md)

Source of truth, from earthtojake/text-to-cad.


name: cad-viewer description: Start or reuse CAD Viewer and return review links for explicit CAD, implicit CAD, robot-description, and G-code files. Use when visually reviewing .step, .stp, .implicit.js, .implicit.mjs, .glb, .stl, .3mf, .gcode, .dxf, .urdf, .srdf, or .sdf files, especially when handed off from CAD, implicit-cad, G-code, URDF, SRDF, or SDF generation skills.

CAD Viewer

Provenance: 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 Viewer

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.

Links

  • Before returning any 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.
  • Return one Viewer URL per requested file.
  • Start/reuse the Viewer once per absolute directory --dir, then append file=<path> for each requested file. The file path must be relative to --dir.
  • For directory-only review links, return the URL printed by agent:start without adding file=.
  • Do not stop an existing Viewer server unless the user asks.
  • If Viewer startup fails, report the failure and continue with the owning skill's non-GUI validation or artifacts.

Claude Preview

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

  • Read references/development.md when the user asks to modify, debug, or iterate on CAD Viewer source.
  • Read references/viewer-features.md when you need supported file types, Viewer controls, or file-specific feature details.
  • Read references/moveit2-server.md only when the user specifically needs optional SRDF MoveIt2 IK or path-planning controls.

Related skills

More from earthtojake/text-to-cad and the wider catalog.

CA

cad

earthtojake/text-to-cad

Create, modify, inspect, and validate STEP-first parametric CAD parts and assemblies. Use for natural-language CAD specs, reference images, 2D technical drawings, STEP/STP generation or direct inspection, Python CAD source, source-level joints, selector references, geometry facts, measurements, mating deltas, snapshots, and secondary STL/3MF/native GLB outputs from CAD geometry.

4.6k installsAudited
ST

step-parts

earthtojake/text-to-cad

Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers, bearings, standoffs, and other catalog components. Use when Codex needs to search the hosted step.parts catalog before creating simplified placeholder geometry, resolve fuzzy part names, standards, aliases, or dimensions, choose a matching part, fetch a canonical .step file, verify checksums, or use the step.parts API/OpenAPI/catalog endpoints for standard part discovery.

3.6k installs
SD

sdf

earthtojake/text-to-cad

SDFormat/SDF model and world generation, validation, and simulator handoff. Use for `.sdf` files, SDFormat XML, Python `gen_sdf()` sources, models, worlds, links, joints, poses, frames, inertials, visual/collision geometry, mesh URIs, sensors, lights, physics, plugins, includes, Gazebo, static SDF review, or simulator-specific metadata. Do not use for signed-distance-field geometry.

3.4k installs
UR

urdf

earthtojake/text-to-cad

URDF robot description generation and default generation-time validation. Use when creating, editing, regenerating, inspecting, or debugging `.urdf` files, Python `gen_urdf()` sources, robot links, joints, limits, inertials, visual/collision geometry, mesh references, frame conventions, or generated robot-description artifacts. Use the SRDF skill for MoveIt2 semantic groups and IK/path-planning semantics; use the cad-viewer skill for local MoveIt2 server controls; use the CAD skill for STEP/STL/3MF/DXF/GLB outputs.

3.4k installsAudited
SR

srdf

earthtojake/text-to-cad

MoveIt2 SRDF generation, validation, and planning-semantics workflow. Use when creating, editing, regenerating, inspecting, or validating `.srdf` files, `gen_srdf()` sources, MoveIt planning groups, virtual joints, passive joints, end effectors, group states, disabled collisions, URDF-linked planning semantics, or SRDF handoff for live review. Use the URDF skill for robot structure, the SDF skill for simulator descriptions, and the cad-viewer skill for rendering, live review links, and optional MoveIt2 controls.

3.3k installs
SE

sendcutsend

earthtojake/text-to-cad

Review DXF and STEP/STP uploads for SendCutSend.com orders using its ordering guide, catalog, and specs. Use only for SendCutSend.com preflight reports covering upload readiness, selected material/SKU/thickness/service availability, and service-specific checks for laser cutting, CNC routing, bending, tapping, countersinking, hardware insertion, and finishing.

3.3k installs