agentleFS
saint0xsaint0x/my-skills/cad-viewer/SKILL.md

cad-viewer

Skill1 starsChanged 3 months agoMITView on GitHub

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

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the installed local skill files as the runtime source of truth.

    line 9
  2. Distinctive:

    Use this skill to open existing or newly generated CAD, implicit CAD, robot-description, or DXF files in CAD Viewer and hand back live …

    line 15
  3. Very specific:

    Start one local CAD Viewer with npm run start.

    line 20
  4. Distinctive:

    Run from this skill directory:

    line 26
  5. Very specific:

    If port 3245 is already in use, the launcher exits with an error rather than rolling to another port.

    line 59
  6. Very specific:

    Add --json to also print a machine-readable result as the last stdout line beginning with { ({"url": ..., "port": ..., "action": "start"}).

    line 64
  7. Very specific:

    Before returning any link, resolve <directory>/<file> and confirm it exists.

    line 70
  8. Very specific:

    Start the Viewer once and pick one workspace root for the session.

    line 79
  9. Distinctive:

    Do not stop an existing Viewer server unless the user asks.

    line 84
  10. Distinctive:

    If Viewer startup fails, report the failure and continue with the owning skill's non-GUI validation or artifacts.

    line 85
  11. Very specific:

    Read references/viewer-features.md when you need supported file types, Viewer controls, or file-specific feature details.

    line 89
  12. Very specific:

    Read references/moveit2-server.md only when the user specifically needs optional SRDF MoveIt2 IK or path-planning controls.

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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. If the user asks to modify, debug, or iterate on CAD Viewer source itself, clone that repository and work there — this installed skill runtime runs the Viewer, it is not where you edit it.

Use this skill to open existing or newly generated CAD, implicit CAD, robot-description, or DXF files in CAD Viewer and hand back live review links. The expected input is one or more explicit file paths.

Start Viewer

Start one local CAD Viewer with npm run start. It serves the prebuilt Viewer bundle plus the CAD API on a single fixed port (3245). It is NOT started against a directory — a URL names the directory, so one Viewer serves any folder.

The default port 3245 is 0xCAD — "CAD" in hexadecimal.

Run from this skill directory:

npm --prefix scripts/viewer run start -- --host 127.0.0.1

URL shape

A Viewer URL's path is the absolute directory, exactly as in a file:// URL, and file= selects one artifact inside it:

http://127.0.0.1:3245/absolute/project/models?file=mechanisms/lift_table.step.py

Always build the path from an absolute directory. The Viewer runs from an arbitrary working directory — usually wherever the skill happens to be installed, not the model directory — so a relative path resolves against the wrong place. The file= value is relative to that directory.

On Windows the drive goes in the path, after the URL's leading slash, with forward slashes: D:\project\models is http://127.0.0.1:3245/D:/project/models. The launcher prints this form already; build it the same way by hand.

The path is the workspace, not the file's folder. The Viewer scans it recursively, so the file browser lists every model beneath it and the user can switch files without a new link. Pick the directory the user thinks of as their model workspace — typically the project's models/ directory, or the nearest common parent of the files you were asked to review — and put the rest of the path in file=. Naming the artifact's own deep folder (.../models/step/mechanisms?file=lift_table.step.py) opens the same model but hides the rest of the project, which is almost never what the user wants.

If port 3245 is already in use, the launcher exits with an error rather than rolling to another port; rerun with an explicit free port, --port <n>, and use the URL it prints. In sandboxed agent environments, local binding failures such as EPERM/EACCES can be expected; rerun with the needed permission/escalation.

Add --json to also print a machine-readable result as the last stdout line beginning with { ({"url": ..., "port": ..., "action": "start"}). The printed URL points at the launch directory; replace its path to review any other folder.

Links

  • Before returning any link, resolve <directory>/<file> and confirm it exists. For a generated model pass the generator source (<name>.step.py) — that is what the catalog itself lists, the backend resolves it directly and builds the render artifacts on demand, and no .step file needs to exist. It is also the only form that carries a params sidecar, because a same-stem <name>.step.py shadows <name>.step anyway. For an imported STEP with no generator, pass the .step/.stp itself. If the resolved path is missing, do not return the link; report the problem and point to the correct path.
  • Return one Viewer URL per requested file.
  • Start the Viewer once and pick one workspace root for the session. Every link is that same absolute root plus ?file=<path relative to it>, so all of them share one browsable catalog. Only use a second root for an artifact that lives outside the first.
  • For directory-only review links, return the directory URL without ?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.

References

  • 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.