{"id":123364,"plugin_id":"plugins_6ac32e7e1a74819193e1edd581a99966","kind":"skill","collection_source":"plugin_package","comparison_source":"plugin_package","observed_at":"2026-11-29T06:11:41.167Z","digest":"8820752191db500c54839177419ba0561d3c12c2021c14f08052a772bf8cf90f","against":121036,"payload":{"description":"Designs and edits 3D CAD - parametric parts, assemblies, mechanisms and 2D cut profiles, written as build123d Python and shown live in the text-to-cad viewer. Use for any request to model, change, measure, inspect, animate, export or convert a part or a CAD file (STEP, STL, 3MF, GLB, DXF, xbf), for references and Quick Edit prompts copied from the viewer, and to check whether a part can be machined, cut and bent, molded or printed. Not for robot descriptions, which the robot-simulation skill writes.","included_files":[{"relative_path":"LICENSE","size_in_bytes":1074},{"relative_path":"agents/openai.yaml","size_in_bytes":191},{"relative_path":"references/2d-profiles-and-dxf.md","size_in_bytes":9290},{"relative_path":"references/animation.md","size_in_bytes":5993},{"relative_path":"references/build123d-modeling.md","size_in_bytes":13820},{"relative_path":"references/environments.md","size_in_bytes":2605},{"relative_path":"references/exports.md","size_in_bytes":14064},{"relative_path":"references/inspection-and-validation.md","size_in_bytes":19689},{"relative_path":"references/kinematics.md","size_in_bytes":28866},{"relative_path":"references/manufacturing-cnc.md","size_in_bytes":9210},{"relative_path":"references/manufacturing-injection-molding.md","size_in_bytes":9323},{"relative_path":"references/manufacturing-printing.md","size_in_bytes":9182},{"relative_path":"references/manufacturing-review.md","size_in_bytes":9844},{"relative_path":"references/manufacturing-sheet-metal.md","size_in_bytes":10677},{"relative_path":"references/model-contract.md","size_in_bytes":15521},{"relative_path":"references/positioning.md","size_in_bytes":3799},{"relative_path":"references/project-layout.md","size_in_bytes":3112},{"relative_path":"references/snapshot-review.md","size_in_bytes":12537}],"name":"cad","skill_md_contents":"---\nname: cad\ndescription: Designs and edits 3D CAD - parametric parts, assemblies, mechanisms and 2D cut profiles, written as build123d Python and shown live in the text-to-cad viewer. Use for any request to model, change, measure, inspect, animate, export or convert a part or a CAD file (STEP, STL, 3MF, GLB, DXF, xbf), for references and Quick Edit prompts copied from the viewer, and to check whether a part can be machined, cut and bent, molded or printed. Not for robot descriptions, which the robot-simulation skill writes.\nlicense: MIT\nmetadata:\n  repository: earthtojake/text-to-cad\n---\n\n# CAD modeling and inspection\n\nA model is a Python function that returns a build123d shape. Running its script builds it in\ntext-to-cad's server, which holds the result as a document: the page the person has open follows\nevery run, and every command (inspect, snapshot, export, check) acts on that document by its id.\nFiles are exports, written when asked.\n\n## Start with the task\n\n| Task | Start with | Reference |\n| --- | --- | --- |\n| Create or edit a part or assembly | A model script ([below](#write-a-model-and-run-it)) | [Models](references/model-contract.md), [build123d](references/build123d-modeling.md), [positioning](references/positioning.md) |\n| Let the person tune a number (a wall, a fit, a count) | `model.param(...)` at the script's top level; change a value by editing its number and running the script | [Parameters](references/model-contract.md#parameters-a-person-tunes) |\n| Organize a project | Its existing layout | [Project layout](references/project-layout.md) |\n| Export STEP, STL, 3MF, GLB or xbf | `cad model export <id> <file>` | [Exports](references/exports.md) |\n| A 2D profile, flat pattern or DXF | A model that returns 2D geometry on z=0, exported as `.dxf` | [2D profiles and DXF](references/2d-profiles-and-dxf.md) |\n| Use a vendor STEP, an xbf or a scan | `step.read`, `xbf.read` or `stl.read` in the body | [Inputs](references/model-contract.md#inputs) |\n| Resolve a reference or a Quick Edit prompt | `cad model inspect <id> '<ref>'` | [References](references/inspection-and-validation.md#references) |\n| Measure or check geometry | A check script that calls the model | [Inspection](references/inspection-and-validation.md) |\n| See a model, a view or a pose | `cad model snapshot <id> out.png` | [Snapshots](references/snapshot-review.md) |\n| Articulate a mechanism, find joint limits | build123d joints in the body; `cad model ranges <id>` | [Kinematics](references/kinematics.md) |\n| Explode, reveal or showcase a model | `animation()` in the body | [Animation](references/animation.md) |\n| Can it be machined, bent, molded or printed? | `cad model dfm <id> --process ...` | [Can it be made?](#can-it-be-made) |\n| Open an existing CAD file | Show it | [Show the model](#show-the-model) |\n\nWhether a part holds under load is the fea skill's; a robot description, the robot-simulation skill's.\n\n## Setup\n\nWritten for `cad==0.11.19`. Before first use in a chat, run `cad --version`. If it fails, or `cad` is missing or older\nthan 0.11.12, run `uv tool install --force cad`. If it is older than the release this skill was written for, run\n`cad update`.\n\nIf cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:\nhttps://github.com/earthtojake/text-to-cad\nA project written for an earlier version may need changes; the migration guides say what:\nhttps://github.com/earthtojake/text-to-cad/tree/main/docs/migrations\n\nEvery command goes through one server: start it once with `cad server start` (`status`, `stop`); a\ncommand that finds none says so. `cad run script.py` is `uv run` with cad's library and the\nintegrations the script imports added, so a script header names only its own extra packages, never\ncad ([environments](references/environments.md)). A\nbuild outlives the shell's time limit: run the same command again and it joins the build in progress.\n`cad <command> --help` is the complete, current interface. Paths are relative to the working\ndirectory.\n\n## Write a model and run it\n\n`src/bracket.py`:\n\n```python\nimport build123d as bd\nfrom cad import model\n\n\ndef bracket_body(width, thickness, bore):\n    body = bd.Box(width, 20, thickness) - bd.Cylinder(bore / 2, thickness)\n    body.label = \"bracket\"\n    body.color = \"#4a6fa5\"\n    return body\n\n\n@model\ndef bracket():\n    return bracket_body(40, 6, 8)\n\n\n@model\ndef bracket_wide():\n    return bracket_body(60, 6, 8)\n\n\nif __name__ == \"__main__\":\n    bracket()\n    bracket_wide()\n```\n\n```bash\ncad run src/bracket.py\n```\n\n```text\nbuilt src/bracket.py::bracket cold in 2.61s: bodies 1 run; 6 misses, 0 hits; body 0.01s, names 0.00s, document 0.00s\n  parts 1 · bounds 40 × 20 × 6 mm · joints 0 · sequences 0\n  id: 0dc50a92-a21f-5895-a245-ebdeb5352f3b\n  view: http://127.0.0.1:<port>/<id>?token=<token>\n```\n\nEach call prints how its model built, what it holds, its document's `id:` and its page, `view:`. The\nid comes from the script's path and the function's name, so it is the same on every run: use it for\nevery command, and give the person the page once ([Show the model](#show-the-model)).\n\n- **A model function takes no arguments.** Dimensions are arguments of a plain helper, and each\n  configuration is a `@model` of its own. Calling one returns a handle: `.id`, `.url`, `.shape`, `.export(...)`.\n- **Running the script is the rebuild**, and it writes no file. The server replays whatever an edit\n  did not reach, so reruns are cheap; `@memo` marks a stage of seconds of kernel work, or a body several models share\n  ([what a run runs](references/model-contract.md#what-a-run-runs)). Keep the calls under\n  `if __name__ == \"__main__\":` so other scripts can import the models.\n- **An assembly calls its parts**: its body takes each part's shape (`plate().shape`), places and\n  labels it, and returns a `Compound`. Each part keeps its own document. After editing a part, run the\n  assembly's script.\n- **Use `import build123d as bd`, attribute-style.** The import is lazy, so the kernel loads in the\n  server; `from build123d import Box` or a module-level `bd.Color(...)` loads it in the script.\n- **Labels name parts** in every reference, check and export. Colours are sRGB hex\n  (`part.color = \"#4a6fa5\"`); a material gives a part density and a look\n  (`from bd_materials import metals`, `part.material = metals.aluminum()`:\n  [colour and materials](references/build123d-modeling.md#colour-and-materials)).\n- **A body is a function of its code and its inputs**: `step.read`, `xbf.read`, `stl.read` and any\n  file it opens are tracked; the clock, environment variables and randomness are not. Compose project\n  models by calling them, never by reading a file the project exported.\n- Units are millimetres, +Z up.\n\n## Commands\n\nEach acts on the document as the last run left it. `$ID` is a model's id; a file takes the\noperations its own type lists (`cad step|xbf|stl|threemf|glb|dxf --help`).\n\n| Command | Gives |\n| --- | --- |\n| `cad model inspect \"$ID\" ['<ref>']` | The document's parts, bounds, volume, mass and joints; with a ref, one part, face or edge as JSON, with `made_by`: the function, file and line that made it |\n| `cad model snapshot \"$ID\" out.png` | A picture, drawn as the viewer draws it: `--camera top`, `--display hidden-line`, `--pose open`, `--preview` (lit, for a person) |\n| `cad model export \"$ID\" a.step b.stl c.glb` | Files, by suffix; nothing rebuilds ([exports](references/exports.md)) |\n| `cad model interference \"$ID\" [--pose P]` | Every pair of parts that shares volume, exactly, as built and at each pose |\n| `cad model dfm \"$ID\" --process ...` | A manufacturing check ([Can it be made?](#can-it-be-made)) |\n| `cad model ranges \"$ID\"` | Each joint's stops, swept from the parts ([joint stops](references/kinematics.md#joint-stops)) |\n| `cad step export vendor.step vendor.xbf` | A vendor STEP as an xbf, which `xbf.read` loads many times faster |\n\n`--tolerance MM` and `--angle DEG` mesh an STL, a 3MF or a GLB finer (a print with fits, a close\nrender) and apply to nothing else: an export that takes them names only mesh files, and a STEP, xbf or\nDXF beside them refuses the whole export.\n\n```bash\ncad model export \"$ID\" STEP/bracket.step GLB/bracket.glb\ncad model export \"$ID\" STL/bracket.stl 3MF/bracket.3mf --tolerance 0.02\n```\n\nA reference such as `0dc50a92-...#bracket/face 7` is what the viewer copies when the person picks\nsomething: a document, a part by its labels, then an element. Resolve it with `inspect`, then edit the\ncode `made_by` names. A Quick Edit prompt carries its document under `File:`, its picks under\n`References:` and a snapshot packet, inline JSON (save it to a file) or a `.snapshot.json` path. Where\nthe person drew on the view, look at what they drew before editing:\n`cad model snapshot \"$ID\" out.png --annotation packet.snapshot.json --camera authored`\n([annotations](references/snapshot-review.md#annotations-and-quick-edit-views)).\n\n## Check each change\n\nRead each run's output first: a part count, bounds or joint count that contradicts the intent is the\nfirst thing to fix. Then check the change the way it can be checked:\n\n| The change | Check it with |\n| --- | --- |\n| A number the person gave (a size, a distance, a volume) | An assert in the model's body on what the geometry measures, or `cad model inspect` |\n| A number the design implies (a clearance, a fit, a mass) | A check script that calls the model and measures what it returns ([inspection](references/inspection-and-validation.md)) |\n| An assembly's parts or a joint's travel | `cad model interference \"$ID\"`, with a `--pose` for each mechanism state |\n| Shape, placement, colour, a mechanism | The snapshots it takes to judge it, posed where it moves |\n| A 2D profile or DXF | The export, which runs the drawing checks, then `cad dxf snapshot` of the file |\n| A part made by a named process | Its manufacturing check ([below](#can-it-be-made)) |\n\n- A snapshot shows arrangement and appearance; a number comes from the geometry, never from a picture.\n- Review an assembly from the inside out: a part alone before it is placed, then the parts that move\n  together, then a joint at both ends of its travel, and only then the whole, from behind as well as\n  the front. A cover that half encloses what it covers is a few pixels of the whole model's picture\n  and most of its own.\n- A check that fails to run, or cannot decide, has shown nothing. Trust a check you wrote only once\n  you have seen it fail on a planted fault of the kind it guards against. Boxes, mesh points and\n  sampled distances pick the pairs worth measuring; the verdict is exact geometry.\n- Say what a check cannot see beside what it passed: the poses it did not take, the pairs it could not\n  measure, the path between two poses checked only at its ends.\n- Dropping or shrinking a feature the person specified to get a build through is a different design:\n  say so instead.\n- A missing or conflicting dimension that changes the result is the person's to settle; a value\n  chosen in its place is an assumption to report.\n\n## Can it be made?\n\n`cad model dfm` says whether a part can be made by a process and what to change where it cannot. Run\nit when the request names or implies a process (machined, sheet metal or laser cut, injection molded,\n3D printed, or a printer, resin, filament or cutting service named), or the person asks. A material\nalone names no process, but a thickness with a metal (\"2 mm steel\") is sheet. With none, build what was asked: no check, and no draft, reliefs or tool radii\nadded.\n\n| Process | Check | Reference |\n| --- | --- | --- |\n| CNC milling and turning | `--process cnc --material M` (`--axes`, `--turning`, `--tools`) | [CNC](references/manufacturing-cnc.md) |\n| Sheet cutting and bending | `--process sheet --material M --thickness T` (`--bend-radius`, `--k-factor`); a cut file, `cad dxf dfm` | [Sheet metal](references/manufacturing-sheet-metal.md) |\n| Injection molding | `--process molding --pull z --material M` (`--cavities`) | [Injection molding](references/manufacturing-injection-molding.md) |\n| 3D printing | `--process printing --technology T` (`--material`, `--build-volume`, `--layer-height`) | [3D printing](references/manufacturing-printing.md) |\n\n```bash\ncad model dfm \"$ID\" --process cnc --material aluminum --tools 3,6,10\n```\n\nA named process is part of the design, not a review at the end:\n\n1. Read the process reference's *Design it* before modelling, and build its limits in.\n2. Record the process in the model, so every later check is the same one: the material with its\n   process on each part (`part.material = metals.aluminum(process=machined())`, with `machined` from\n   `bd_materials.processes`), and the shop's flags in the module docstring\n   (`Check: cad model dfm \"$ID\" --tools 3,6,10`).\n3. Run that check after every run. The last line and the exit status are the result: `OK` (0, though\n   warnings may remain), `FAILED` (1: the part cannot be made as drawn), `NOT CHECKED` (3: something\n   was not judged, never a pass) and 2 for a refused command. Fix errors from each finding's `refs`,\n   `value` and `limit` (`--json`); fix a warning when that leaves the request intact, else report it.\n4. In the hand-off, say the process, the material the check judged with, the findings left, and that\n   the rules are general practice rather than a shop's own limits.\n\nA STEP or mesh file is checked by its own type (`cad step dfm part.step --process ...`); a mesh, for\nprinting only. For a review, a shop's own limits or the result in full, read\n[manufacturing review](references/manufacturing-review.md). A SendCutSend order is the sendcutsend\nskill's; slicing a print, the print3d skill's.\n\n## Show the model\n\nShow the person each model you create or change as soon as its first run succeeds, and any model\nor file they ask to see. A model's page is the `view:` line its run prints, and a file's is the `url`\nthat `cad viewer --json FILE [FILE ...]` prints for it (never guess the port). Show it with\nthe first of these you have:\n\n1. `cad_show` among your tools (your host may prefix it): call it with the model's id or the file's\n   absolute path; its description says the rest.\n2. A tool that opens a page in the app's own browser pane, not in the person's own browser (in the\n   Claude desktop app, the Browser pane's `preview_start` with the page's `url`, or its `navigate`):\n   open the page there yourself, and give the person the link as well.\n3. Neither: give the person the link, to open in their browser.\n\nThe page follows every run of the model. A file you export is a download: give its path. Showing is\nfor the person: to check your own work, review with `cad <type> snapshot`, never a screenshot\nof the page. If it fails to launch, say so.\n\n## Hand off\n\nSay what was made or changed, the files written, the checks run and what they showed, what no check\ncovered, and every assumption or departure from the request.\n"},"changes":[{"path":"/skill_md_contents","type":"changed","before":"---\nname: cad\ndescription: Designs and edits 3D CAD - parametric parts, assemblies, mechanisms and 2D cut profiles, written as build123d Python and shown live in the text-to-cad viewer. Use for any request to model, change, measure, inspect, animate, export or convert a part or a CAD file (STEP, STL, 3MF, GLB, DXF, xbf), for references and Quick Edit prompts copied from the viewer, and to check whether a part can be machined, cut and bent, molded or printed. Not for robot descriptions, which the robot-simulation skill writes.\nlicense: MIT\nmetadata:\n  repository: earthtojake/text-to-cad\n---\n\n# CAD modeling and inspection\n\nA model is a Python function that returns a build123d shape. Running its script builds it in\ntext-to-cad's server, which holds the result as a document: the page the person has open follows\nevery run, and every command (inspect, snapshot, export, check) acts on that document by its id.\nFiles are exports, written when asked.\n\n## Start with the task\n\n| Task | Start with | Reference |\n| --- | --- | --- |\n| Create or edit a part or assembly | A model script ([below](#write-a-model-and-run-it)) | [Models](references/model-contract.md), [build123d](references/build123d-modeling.md), [positioning](references/positioning.md) |\n| Let the person tune a number (a wall, a fit, a count) | `model.param(...)` at the script's top level; change a value by editing its number and running the script | [Parameters](references/model-contract.md#parameters-a-person-tunes) |\n| Organize a project | Its existing layout | [Project layout](references/project-layout.md) |\n| Export STEP, STL, 3MF, GLB or xbf | `cad model export <id> <file>` | [Exports](references/exports.md) |\n| A 2D profile, flat pattern or DXF | A model that returns 2D geometry on z=0, exported as `.dxf` | [2D profiles and DXF](references/2d-profiles-and-dxf.md) |\n| Use a vendor STEP, an xbf or a scan | `step.read`, `xbf.read` or `stl.read` in the body | [Inputs](references/model-contract.md#inputs) |\n| Resolve a reference or a Quick Edit prompt | `cad model inspect <id> '<ref>'` | [References](references/inspection-and-validation.md#references) |\n| Measure or check geometry | A check script that calls the model | [Inspection](references/inspection-and-validation.md) |\n| See a model, a view or a pose | `cad model snapshot <id> out.png` | [Snapshots](references/snapshot-review.md) |\n| Articulate a mechanism, find joint limits | build123d joints in the body; `cad model ranges <id>` | [Kinematics](references/kinematics.md) |\n| Explode, reveal or showcase a model | `animation()` in the body | [Animation](references/animation.md) |\n| Can it be machined, bent, molded or printed? | `cad model dfm <id> --process ...` | [Can it be made?](#can-it-be-made) |\n| Open an existing CAD file | Show it | [Show the model](#show-the-model) |\n\nWhether a part holds under load is the fea skill's; a robot description, the robot-simulation skill's.\n\n## Setup\n\nWritten for `cad==0.11.18`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than\n0.11.12, run `uv tool install cad`, adding `--force` if uv says `cad` already exists.\n\nIf cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:\nhttps://github.com/earthtojake/text-to-cad\nA project written for an earlier version may need changes; the migration guides say what:\nhttps://github.com/earthtojake/text-to-cad/tree/main/docs/migrations\n\nEvery command goes through one server: start it once with `cad server start` (`status`, `stop`); a\ncommand that finds none says so. `cad run script.py` is `uv run` with cad's library and the\nintegrations the script imports added, so a script header names only its own extra packages, never\ncad ([environments](references/environments.md)). A\nbuild outlives the shell's time limit: run the same command again and it joins the build in progress.\n`cad <command> --help` is the complete, current interface. Paths are relative to the working\ndirectory.\n\n## Write a model and run it\n\n`src/bracket.py`:\n\n```python\nimport build123d as bd\nfrom cad import model\n\n\ndef bracket_body(width, thickness, bore):\n    body = bd.Box(width, 20, thickness) - bd.Cylinder(bore / 2, thickness)\n    body.label = \"bracket\"\n    body.color = \"#4a6fa5\"\n    return body\n\n\n@model\ndef bracket():\n    return bracket_body(40, 6, 8)\n\n\n@model\ndef bracket_wide():\n    return bracket_body(60, 6, 8)\n\n\nif __name__ == \"__main__\":\n    bracket()\n    bracket_wide()\n```\n\n```bash\ncad run src/bracket.py\n```\n\n```text\nbuilt src/bracket.py::bracket cold in 2.61s: bodies 1 run; 6 misses, 0 hits; body 0.01s, names 0.00s, document 0.00s\n  parts 1 · bounds 40 × 20 × 6 mm · joints 0 · sequences 0\n  id: 0dc50a92-a21f-5895-a245-ebdeb5352f3b\n  view: http://127.0.0.1:<port>/<id>?token=<token>\n```\n\nEach call prints how its model built, what it holds, its document's `id:` and its page, `view:`. The\nid comes from the script's path and the function's name, so it is the same on every run: use it for\nevery command, and give the person the page once ([Show the model](#show-the-model)).\n\n- **A model function takes no arguments.** Dimensions are arguments of a plain helper, and each\n  configuration is a `@model` of its own. Calling one returns a handle: `.id`, `.url`, `.shape`, `.export(...)`.\n- **Running the script is the rebuild**, and it writes no file. The server replays whatever an edit\n  did not reach, so reruns are cheap; `@memo` marks a stage of seconds of kernel work, or a body several models share\n  ([what a run runs](references/model-contract.md#what-a-run-runs)). Keep the calls under\n  `if __name__ == \"__main__\":` so other scripts can import the models.\n- **An assembly calls its parts**: its body takes each part's shape (`plate().shape`), places and\n  labels it, and returns a `Compound`. Each part keeps its own document. After editing a part, run the\n  assembly's script.\n- **Use `import build123d as bd`, attribute-style.** The import is lazy, so the kernel loads in the\n  server; `from build123d import Box` or a module-level `bd.Color(...)` loads it in the script.\n- **Labels name parts** in every reference, check and export. Colours are sRGB hex\n  (`part.color = \"#4a6fa5\"`); a material gives a part density and a look\n  (`from bd_materials import metals`, `part.material = metals.aluminum()`:\n  [colour and materials](references/build123d-modeling.md#colour-and-materials)).\n- **A body is a function of its code and its inputs**: `step.read`, `xbf.read`, `stl.read` and any\n  file it opens are tracked; the clock, environment variables and randomness are not. Compose project\n  models by calling them, never by reading a file the project exported.\n- Units are millimetres, +Z up.\n\n## Commands\n\nEach acts on the document as the last run left it. `$ID` is a model's id; a file takes the\noperations its own type lists (`cad step|xbf|stl|threemf|glb|dxf --help`).\n\n| Command | Gives |\n| --- | --- |\n| `cad model inspect \"$ID\" ['<ref>']` | The document's parts, bounds, volume, mass and joints; with a ref, one part, face or edge as JSON, with `made_by`: the function, file and line that made it |\n| `cad model snapshot \"$ID\" out.png` | A picture, drawn as the viewer draws it: `--camera top`, `--display hidden-line`, `--pose open`, `--preview` (lit, for a person) |\n| `cad model export \"$ID\" a.step b.stl c.glb` | Files, by suffix; nothing rebuilds ([exports](references/exports.md)) |\n| `cad model interference \"$ID\" [--pose P]` | Every pair of parts that shares volume, exactly, as built and at each pose |\n| `cad model dfm \"$ID\" --process ...` | A manufacturing check ([Can it be made?](#can-it-be-made)) |\n| `cad model ranges \"$ID\"` | Each joint's stops, swept from the parts ([joint stops](references/kinematics.md#joint-stops)) |\n| `cad step export vendor.step vendor.xbf` | A vendor STEP as an xbf, which `xbf.read` loads many times faster |\n\n`--tolerance MM` and `--angle DEG` mesh an STL, a 3MF or a GLB finer (a print with fits, a close\nrender) and apply to nothing else: an export that takes them names only mesh files, and a STEP, xbf or\nDXF beside them refuses the whole export.\n\n```bash\ncad model export \"$ID\" STEP/bracket.step GLB/bracket.glb\ncad model export \"$ID\" STL/bracket.stl 3MF/bracket.3mf --tolerance 0.02\n```\n\nA reference such as `0dc50a92-...#bracket/face 7` is what the viewer copies when the person picks\nsomething: a document, a part by its labels, then an element. Resolve it with `inspect`, then edit the\ncode `made_by` names. A Quick Edit prompt carries its document under `File:`, its picks under\n`References:` and a snapshot packet, inline JSON (save it to a file) or a `.snapshot.json` path. Where\nthe person drew on the view, look at what they drew before editing:\n`cad model snapshot \"$ID\" out.png --annotation packet.snapshot.json --camera authored`\n([annotations](references/snapshot-review.md#annotations-and-quick-edit-views)).\n\n## Check each change\n\nRead each run's output first: a part count, bounds or joint count that contradicts the intent is the\nfirst thing to fix. Then check the change the way it can be checked:\n\n| The change | Check it with |\n| --- | --- |\n| A number the person gave (a size, a distance, a volume) | An assert in the model's body on what the geometry measures, or `cad model inspect` |\n| A number the design implies (a clearance, a fit, a mass) | A check script that calls the model and measures what it returns ([inspection](references/inspection-and-validation.md)) |\n| An assembly's parts or a joint's travel | `cad model interference \"$ID\"`, with a `--pose` for each mechanism state |\n| Shape, placement, colour, a mechanism | The snapshots it takes to judge it, posed where it moves |\n| A 2D profile or DXF | The export, which runs the drawing checks, then `cad dxf snapshot` of the file |\n| A part made by a named process | Its manufacturing check ([below](#can-it-be-made)) |\n\n- A snapshot shows arrangement and appearance; a number comes from the geometry, never from a picture.\n- Review an assembly from the inside out: a part alone before it is placed, then the parts that move\n  together, then a joint at both ends of its travel, and only then the whole, from behind as well as\n  the front. A cover that half encloses what it covers is a few pixels of the whole model's picture\n  and most of its own.\n- A check that fails to run, or cannot decide, has shown nothing. Trust a check you wrote only once\n  you have seen it fail on a planted fault of the kind it guards against. Boxes, mesh points and\n  sampled distances pick the pairs worth measuring; the verdict is exact geometry.\n- Say what a check cannot see beside what it passed: the poses it did not take, the pairs it could not\n  measure, the path between two poses checked only at its ends.\n- Dropping or shrinking a feature the person specified to get a build through is a different design:\n  say so instead.\n- A missing or conflicting dimension that changes the result is the person's to settle; a value\n  chosen in its place is an assumption to report.\n\n## Can it be made?\n\n`cad model dfm` says whether a part can be made by a process and what to change where it cannot. Run\nit when the request names or implies a process (machined, sheet metal or laser cut, injection molded,\n3D printed, or a printer, resin, filament or cutting service named), or the person asks. A material\nalone names no process, but a thickness with a metal (\"2 mm steel\") is sheet. With none, build what was asked: no check, and no draft, reliefs or tool radii\nadded.\n\n| Process | Check | Reference |\n| --- | --- | --- |\n| CNC milling and turning | `--process cnc --material M` (`--axes`, `--turning`, `--tools`) | [CNC](references/manufacturing-cnc.md) |\n| Sheet cutting and bending | `--process sheet --material M --thickness T` (`--bend-radius`, `--k-factor`); a cut file, `cad dxf dfm` | [Sheet metal](references/manufacturing-sheet-metal.md) |\n| Injection molding | `--process molding --pull z --material M` (`--cavities`) | [Injection molding](references/manufacturing-injection-molding.md) |\n| 3D printing | `--process printing --technology T` (`--material`, `--build-volume`, `--layer-height`) | [3D printing](references/manufacturing-printing.md) |\n\n```bash\ncad model dfm \"$ID\" --process cnc --material aluminum --tools 3,6,10\n```\n\nA named process is part of the design, not a review at the end:\n\n1. Read the process reference's *Design it* before modelling, and build its limits in.\n2. Record the process in the model, so every later check is the same one: the material with its\n   process on each part (`part.material = metals.aluminum(process=machined())`, with `machined` from\n   `bd_materials.processes`), and the shop's flags in the module docstring\n   (`Check: cad model dfm \"$ID\" --tools 3,6,10`).\n3. Run that check after every run. The last line and the exit status are the result: `OK` (0, though\n   warnings may remain), `FAILED` (1: the part cannot be made as drawn), `NOT CHECKED` (3: something\n   was not judged, never a pass) and 2 for a refused command. Fix errors from each finding's `refs`,\n   `value` and `limit` (`--json`); fix a warning when that leaves the request intact, else report it.\n4. In the hand-off, say the process, the material the check judged with, the findings left, and that\n   the rules are general practice rather than a shop's own limits.\n\nA STEP or mesh file is checked by its own type (`cad step dfm part.step --process ...`); a mesh, for\nprinting only. For a review, a shop's own limits or the result in full, read\n[manufacturing review](references/manufacturing-review.md). A SendCutSend order is the sendcutsend\nskill's; slicing a print, the print3d skill's.\n\n## Show the model\n\nShow the person each model you create or change as soon as its first run succeeds, and any model\nor file they ask to see. A model's page is the `view:` line its run prints, and a file's is the `url`\nthat `cad viewer --json FILE [FILE ...]` prints for it (never guess the port). Show it with\nthe first of these you have:\n\n1. `cad_show` among your tools (your host may prefix it): call it with the model's id or the file's\n   absolute path; its description says the rest.\n2. A tool that opens a page in the app's own browser pane, not in the person's own browser (in the\n   Claude desktop app, the Browser pane's `preview_start` with the page's `url`, or its `navigate`):\n   open the page there yourself, and give the person the link as well.\n3. Neither: give the person the link, to open in their browser.\n\nThe page follows every run of the model. A file you export is a download: give its path. Showing is\nfor the person: to check your own work, review with `cad <type> snapshot`, never a screenshot\nof the page. If it fails to launch, say so.\n\n## Hand off\n\nSay what was made or changed, the files written, the checks run and what they showed, what no check\ncovered, and every assumption or departure from the request.\n","after":"---\nname: cad\ndescription: Designs and edits 3D CAD - parametric parts, assemblies, mechanisms and 2D cut profiles, written as build123d Python and shown live in the text-to-cad viewer. Use for any request to model, change, measure, inspect, animate, export or convert a part or a CAD file (STEP, STL, 3MF, GLB, DXF, xbf), for references and Quick Edit prompts copied from the viewer, and to check whether a part can be machined, cut and bent, molded or printed. Not for robot descriptions, which the robot-simulation skill writes.\nlicense: MIT\nmetadata:\n  repository: earthtojake/text-to-cad\n---\n\n# CAD modeling and inspection\n\nA model is a Python function that returns a build123d shape. Running its script builds it in\ntext-to-cad's server, which holds the result as a document: the page the person has open follows\nevery run, and every command (inspect, snapshot, export, check) acts on that document by its id.\nFiles are exports, written when asked.\n\n## Start with the task\n\n| Task | Start with | Reference |\n| --- | --- | --- |\n| Create or edit a part or assembly | A model script ([below](#write-a-model-and-run-it)) | [Models](references/model-contract.md), [build123d](references/build123d-modeling.md), [positioning](references/positioning.md) |\n| Let the person tune a number (a wall, a fit, a count) | `model.param(...)` at the script's top level; change a value by editing its number and running the script | [Parameters](references/model-contract.md#parameters-a-person-tunes) |\n| Organize a project | Its existing layout | [Project layout](references/project-layout.md) |\n| Export STEP, STL, 3MF, GLB or xbf | `cad model export <id> <file>` | [Exports](references/exports.md) |\n| A 2D profile, flat pattern or DXF | A model that returns 2D geometry on z=0, exported as `.dxf` | [2D profiles and DXF](references/2d-profiles-and-dxf.md) |\n| Use a vendor STEP, an xbf or a scan | `step.read`, `xbf.read` or `stl.read` in the body | [Inputs](references/model-contract.md#inputs) |\n| Resolve a reference or a Quick Edit prompt | `cad model inspect <id> '<ref>'` | [References](references/inspection-and-validation.md#references) |\n| Measure or check geometry | A check script that calls the model | [Inspection](references/inspection-and-validation.md) |\n| See a model, a view or a pose | `cad model snapshot <id> out.png` | [Snapshots](references/snapshot-review.md) |\n| Articulate a mechanism, find joint limits | build123d joints in the body; `cad model ranges <id>` | [Kinematics](references/kinematics.md) |\n| Explode, reveal or showcase a model | `animation()` in the body | [Animation](references/animation.md) |\n| Can it be machined, bent, molded or printed? | `cad model dfm <id> --process ...` | [Can it be made?](#can-it-be-made) |\n| Open an existing CAD file | Show it | [Show the model](#show-the-model) |\n\nWhether a part holds under load is the fea skill's; a robot description, the robot-simulation skill's.\n\n## Setup\n\nWritten for `cad==0.11.19`. Before first use in a chat, run `cad --version`. If it fails, or `cad` is missing or older\nthan 0.11.12, run `uv tool install --force cad`. If it is older than the release this skill was written for, run\n`cad update`.\n\nIf cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:\nhttps://github.com/earthtojake/text-to-cad\nA project written for an earlier version may need changes; the migration guides say what:\nhttps://github.com/earthtojake/text-to-cad/tree/main/docs/migrations\n\nEvery command goes through one server: start it once with `cad server start` (`status`, `stop`); a\ncommand that finds none says so. `cad run script.py` is `uv run` with cad's library and the\nintegrations the script imports added, so a script header names only its own extra packages, never\ncad ([environments](references/environments.md)). A\nbuild outlives the shell's time limit: run the same command again and it joins the build in progress.\n`cad <command> --help` is the complete, current interface. Paths are relative to the working\ndirectory.\n\n## Write a model and run it\n\n`src/bracket.py`:\n\n```python\nimport build123d as bd\nfrom cad import model\n\n\ndef bracket_body(width, thickness, bore):\n    body = bd.Box(width, 20, thickness) - bd.Cylinder(bore / 2, thickness)\n    body.label = \"bracket\"\n    body.color = \"#4a6fa5\"\n    return body\n\n\n@model\ndef bracket():\n    return bracket_body(40, 6, 8)\n\n\n@model\ndef bracket_wide():\n    return bracket_body(60, 6, 8)\n\n\nif __name__ == \"__main__\":\n    bracket()\n    bracket_wide()\n```\n\n```bash\ncad run src/bracket.py\n```\n\n```text\nbuilt src/bracket.py::bracket cold in 2.61s: bodies 1 run; 6 misses, 0 hits; body 0.01s, names 0.00s, document 0.00s\n  parts 1 · bounds 40 × 20 × 6 mm · joints 0 · sequences 0\n  id: 0dc50a92-a21f-5895-a245-ebdeb5352f3b\n  view: http://127.0.0.1:<port>/<id>?token=<token>\n```\n\nEach call prints how its model built, what it holds, its document's `id:` and its page, `view:`. The\nid comes from the script's path and the function's name, so it is the same on every run: use it for\nevery command, and give the person the page once ([Show the model](#show-the-model)).\n\n- **A model function takes no arguments.** Dimensions are arguments of a plain helper, and each\n  configuration is a `@model` of its own. Calling one returns a handle: `.id`, `.url`, `.shape`, `.export(...)`.\n- **Running the script is the rebuild**, and it writes no file. The server replays whatever an edit\n  did not reach, so reruns are cheap; `@memo` marks a stage of seconds of kernel work, or a body several models share\n  ([what a run runs](references/model-contract.md#what-a-run-runs)). Keep the calls under\n  `if __name__ == \"__main__\":` so other scripts can import the models.\n- **An assembly calls its parts**: its body takes each part's shape (`plate().shape`), places and\n  labels it, and returns a `Compound`. Each part keeps its own document. After editing a part, run the\n  assembly's script.\n- **Use `import build123d as bd`, attribute-style.** The import is lazy, so the kernel loads in the\n  server; `from build123d import Box` or a module-level `bd.Color(...)` loads it in the script.\n- **Labels name parts** in every reference, check and export. Colours are sRGB hex\n  (`part.color = \"#4a6fa5\"`); a material gives a part density and a look\n  (`from bd_materials import metals`, `part.material = metals.aluminum()`:\n  [colour and materials](references/build123d-modeling.md#colour-and-materials)).\n- **A body is a function of its code and its inputs**: `step.read`, `xbf.read`, `stl.read` and any\n  file it opens are tracked; the clock, environment variables and randomness are not. Compose project\n  models by calling them, never by reading a file the project exported.\n- Units are millimetres, +Z up.\n\n## Commands\n\nEach acts on the document as the last run left it. `$ID` is a model's id; a file takes the\noperations its own type lists (`cad step|xbf|stl|threemf|glb|dxf --help`).\n\n| Command | Gives |\n| --- | --- |\n| `cad model inspect \"$ID\" ['<ref>']` | The document's parts, bounds, volume, mass and joints; with a ref, one part, face or edge as JSON, with `made_by`: the function, file and line that made it |\n| `cad model snapshot \"$ID\" out.png` | A picture, drawn as the viewer draws it: `--camera top`, `--display hidden-line`, `--pose open`, `--preview` (lit, for a person) |\n| `cad model export \"$ID\" a.step b.stl c.glb` | Files, by suffix; nothing rebuilds ([exports](references/exports.md)) |\n| `cad model interference \"$ID\" [--pose P]` | Every pair of parts that shares volume, exactly, as built and at each pose |\n| `cad model dfm \"$ID\" --process ...` | A manufacturing check ([Can it be made?](#can-it-be-made)) |\n| `cad model ranges \"$ID\"` | Each joint's stops, swept from the parts ([joint stops](references/kinematics.md#joint-stops)) |\n| `cad step export vendor.step vendor.xbf` | A vendor STEP as an xbf, which `xbf.read` loads many times faster |\n\n`--tolerance MM` and `--angle DEG` mesh an STL, a 3MF or a GLB finer (a print with fits, a close\nrender) and apply to nothing else: an export that takes them names only mesh files, and a STEP, xbf or\nDXF beside them refuses the whole export.\n\n```bash\ncad model export \"$ID\" STEP/bracket.step GLB/bracket.glb\ncad model export \"$ID\" STL/bracket.stl 3MF/bracket.3mf --tolerance 0.02\n```\n\nA reference such as `0dc50a92-...#bracket/face 7` is what the viewer copies when the person picks\nsomething: a document, a part by its labels, then an element. Resolve it with `inspect`, then edit the\ncode `made_by` names. A Quick Edit prompt carries its document under `File:`, its picks under\n`References:` and a snapshot packet, inline JSON (save it to a file) or a `.snapshot.json` path. Where\nthe person drew on the view, look at what they drew before editing:\n`cad model snapshot \"$ID\" out.png --annotation packet.snapshot.json --camera authored`\n([annotations](references/snapshot-review.md#annotations-and-quick-edit-views)).\n\n## Check each change\n\nRead each run's output first: a part count, bounds or joint count that contradicts the intent is the\nfirst thing to fix. Then check the change the way it can be checked:\n\n| The change | Check it with |\n| --- | --- |\n| A number the person gave (a size, a distance, a volume) | An assert in the model's body on what the geometry measures, or `cad model inspect` |\n| A number the design implies (a clearance, a fit, a mass) | A check script that calls the model and measures what it returns ([inspection](references/inspection-and-validation.md)) |\n| An assembly's parts or a joint's travel | `cad model interference \"$ID\"`, with a `--pose` for each mechanism state |\n| Shape, placement, colour, a mechanism | The snapshots it takes to judge it, posed where it moves |\n| A 2D profile or DXF | The export, which runs the drawing checks, then `cad dxf snapshot` of the file |\n| A part made by a named process | Its manufacturing check ([below](#can-it-be-made)) |\n\n- A snapshot shows arrangement and appearance; a number comes from the geometry, never from a picture.\n- Review an assembly from the inside out: a part alone before it is placed, then the parts that move\n  together, then a joint at both ends of its travel, and only then the whole, from behind as well as\n  the front. A cover that half encloses what it covers is a few pixels of the whole model's picture\n  and most of its own.\n- A check that fails to run, or cannot decide, has shown nothing. Trust a check you wrote only once\n  you have seen it fail on a planted fault of the kind it guards against. Boxes, mesh points and\n  sampled distances pick the pairs worth measuring; the verdict is exact geometry.\n- Say what a check cannot see beside what it passed: the poses it did not take, the pairs it could not\n  measure, the path between two poses checked only at its ends.\n- Dropping or shrinking a feature the person specified to get a build through is a different design:\n  say so instead.\n- A missing or conflicting dimension that changes the result is the person's to settle; a value\n  chosen in its place is an assumption to report.\n\n## Can it be made?\n\n`cad model dfm` says whether a part can be made by a process and what to change where it cannot. Run\nit when the request names or implies a process (machined, sheet metal or laser cut, injection molded,\n3D printed, or a printer, resin, filament or cutting service named), or the person asks. A material\nalone names no process, but a thickness with a metal (\"2 mm steel\") is sheet. With none, build what was asked: no check, and no draft, reliefs or tool radii\nadded.\n\n| Process | Check | Reference |\n| --- | --- | --- |\n| CNC milling and turning | `--process cnc --material M` (`--axes`, `--turning`, `--tools`) | [CNC](references/manufacturing-cnc.md) |\n| Sheet cutting and bending | `--process sheet --material M --thickness T` (`--bend-radius`, `--k-factor`); a cut file, `cad dxf dfm` | [Sheet metal](references/manufacturing-sheet-metal.md) |\n| Injection molding | `--process molding --pull z --material M` (`--cavities`) | [Injection molding](references/manufacturing-injection-molding.md) |\n| 3D printing | `--process printing --technology T` (`--material`, `--build-volume`, `--layer-height`) | [3D printing](references/manufacturing-printing.md) |\n\n```bash\ncad model dfm \"$ID\" --process cnc --material aluminum --tools 3,6,10\n```\n\nA named process is part of the design, not a review at the end:\n\n1. Read the process reference's *Design it* before modelling, and build its limits in.\n2. Record the process in the model, so every later check is the same one: the material with its\n   process on each part (`part.material = metals.aluminum(process=machined())`, with `machined` from\n   `bd_materials.processes`), and the shop's flags in the module docstring\n   (`Check: cad model dfm \"$ID\" --tools 3,6,10`).\n3. Run that check after every run. The last line and the exit status are the result: `OK` (0, though\n   warnings may remain), `FAILED` (1: the part cannot be made as drawn), `NOT CHECKED` (3: something\n   was not judged, never a pass) and 2 for a refused command. Fix errors from each finding's `refs`,\n   `value` and `limit` (`--json`); fix a warning when that leaves the request intact, else report it.\n4. In the hand-off, say the process, the material the check judged with, the findings left, and that\n   the rules are general practice rather than a shop's own limits.\n\nA STEP or mesh file is checked by its own type (`cad step dfm part.step --process ...`); a mesh, for\nprinting only. For a review, a shop's own limits or the result in full, read\n[manufacturing review](references/manufacturing-review.md). A SendCutSend order is the sendcutsend\nskill's; slicing a print, the print3d skill's.\n\n## Show the model\n\nShow the person each model you create or change as soon as its first run succeeds, and any model\nor file they ask to see. A model's page is the `view:` line its run prints, and a file's is the `url`\nthat `cad viewer --json FILE [FILE ...]` prints for it (never guess the port). Show it with\nthe first of these you have:\n\n1. `cad_show` among your tools (your host may prefix it): call it with the model's id or the file's\n   absolute path; its description says the rest.\n2. A tool that opens a page in the app's own browser pane, not in the person's own browser (in the\n   Claude desktop app, the Browser pane's `preview_start` with the page's `url`, or its `navigate`):\n   open the page there yourself, and give the person the link as well.\n3. Neither: give the person the link, to open in their browser.\n\nThe page follows every run of the model. A file you export is a download: give its path. Showing is\nfor the person: to check your own work, review with `cad <type> snapshot`, never a screenshot\nof the page. If it fails to launch, say so.\n\n## Hand off\n\nSay what was made or changed, the files written, the checks run and what they showed, what no check\ncovered, and every assumption or departure from the request.\n"}],"summary":"Fields changed: 1. /skill_md_contents.","summary_kind":"deterministic","summary_metadata":{}}