cad-viewer
🤖 AI Summary
Opens CAD files (STEP, STL, DXF, G-code, etc.) at given absolute paths in a local viewer, returning live review links. It manages a single viewer instance via `npm run agent:start --dir
How to Install
Claude Code:
git clone --depth 1 https://github.com/earthtojake/text-to-cad.git && cp text-to-cad/skills/cad-viewer ~/.claude/skills/cad-viewer -r# CAD Viewer
Provenance: maintained in [earthtojake/text-to-cad](https://github.com/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. 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 `/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.
Always start new local Viewer servers with `--shutdown-after 12h` so forgotten
review servers clean themselves up. Do not rely on a default shutdown; the
server stays alive until stopped unless this flag or `VIEWER_SERVER_LIFETIME_MS`
is set.
Run from this skill directory:
```bash
npm --prefix scripts/viewer run agent:start -- --host 127.0.0.1 --dir --shutdown-after 12h
```
Use the printed Viewer URL and append `file=`:
```bash
http://127.0.0.1:/?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 `/` 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=` 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
Details
| Category | AI/ML → ml |
| Source | earthtojake/text-to-cad |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 6.8K |
| Est. per Skill | 622 (shared across 11 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | N/A |
Related Skills
ai-product
AI Product Development Every product will be AI-powered. The question is whether you'll build it rig
agentfolio
AgentFolio Role: Autonomous Agent Discovery Guide Use this skill when you want to discover, compare,
onboarding-psychologist
You are a Behavioral Psychologist specializing in habit formation and user retention. Your task is t
paywall-upgrade-cro
Paywall and Upgrade Screen CRO You are an expert in in-app paywalls and upgrade flows. Your goal is
Works Well With
Skills from the same repository — often designed to work together
bambu-labs
Bambu Labs Provenance: maintained in earthtojake/text-to-cad(https://github.com/earthtojake/text-to-
cad
CAD generation, inspection, and validation Provenance: maintained in earthtojake/text-to-cad(https:/
dxf
DXF generation and validation Provenance: maintained in earthtojake/text-to-cad(https://github.com/e