cad
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…
от earthtojake★ 27 943 звезды на GitHub
Установить cad в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
CAD modeling and inspection
A model is a Python function that returns a build123d shape. Running its script builds it in text-to-cad's server, which holds the result as a document: the page the person has open follows every run, and every command (inspect, snapshot, export, check) acts on that document by its id. Files are exports, written when asked.
Start with the task
| Task | Start with | Reference |
|---|---|---|
| Create or edit a part or assembly | A model script (below) | Models, build123d, positioning |
| 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 |
| Organize a project | Its existing layout | Project layout |
| Export STEP, STL, 3MF, GLB or xbf | cad model export <id> <file> |
Exports |
| A 2D profile, flat pattern or DXF | A model that returns 2D geometry on z=0, exported as .dxf |
2D profiles and DXF |
| Use a vendor STEP, an xbf or a scan | step.read, xbf.read or stl.read in the body |
Inputs |
| Resolve a reference or a Quick Edit prompt | cad model inspect <id> '<ref>' |
References |
| Measure or check geometry | A check script that calls the model | Inspection |
| See a model, a view or a pose | cad model snapshot <id> out.png |
Snapshots |
| Articulate a mechanism, find joint limits | build123d joints in the body; cad model ranges <id> |
Kinematics |
| Explode, reveal or showcase a model | animation() in the body |
Animation |
| Can it be machined, bent, molded or printed? | cad model dfm <id> --process ... |
Can it be made? |
| Open an existing CAD file | Show it | Show the model |
Whether a part holds under load is the fea skill's; a robot description, the robot-simulation skill's.
Setup
Written for cad==0.11.21. Before first use in a chat, run cad --version. If it fails, or cad is missing or older
than 0.11.12, run uv tool install --force cad. If it is older than the release this skill was written for, run
cad update.
If cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin: https://github.com/earthtojake/text-to-cad A project written for an earlier version may need changes; the migration guides say what: https://github.com/earthtojake/text-to-cad/tree/main/docs/migrations
Every command goes through one server: start it once with cad server start (status, stop); a
command that finds none says so. cad run script.py is uv run with cad's library and the
integrations the script imports added, so a script header names only its own extra packages, never
cad (environments). A
build outlives the shell's time limit: run the same command again and it joins the build in progress.
cad <command> --help is the complete, current interface. Paths are relative to the working
directory.
Write a model and run it
src/bracket.py:
import build123d as bd
from cad import model
def bracket_body(width, thickness, bore):
body = bd.Box(width, 20, thickness) - bd.Cylinder(bore / 2, thickness)
body.label = "bracket"
body.color = "#4a6fa5"
return body
@model
def bracket():
return bracket_body(40, 6, 8)
@model
def bracket_wide():
return bracket_body(60, 6, 8)
if __name__ == "__main__":
bracket()
bracket_wide()
cad run src/bracket.py
built src/bracket.py::bracket cold in 2.61s: bodies 1 run; 6 misses, 0 hits; body 0.01s, names 0.00s, document 0.00s
parts 1 · bounds 40 × 20 × 6 mm · joints 0 · sequences 0
id: 0dc50a92-a21f-5895-a245-ebdeb5352f3b
view: http://127.0.0.1:<port>/<id>?token=<token>
Each call prints how its model built, what it holds, its document's id: and its page, view:. The
id comes from the script's path and the function's name, so it is the same on every run: use it for
every command, and give the person the page once (Show the model).
- A model function takes no arguments. Dimensions are arguments of a plain helper, and each
configuration is a
@modelof its own. Calling one returns a handle:.id,.url,.shape,.export(...). - Running the script is the rebuild, and it writes no file. The server replays whatever an edit
did not reach, so reruns are cheap;
@memomarks a stage of seconds of kernel work, or a body several models share ([what a run runs](references/m
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- LICENSE
- agents/openai.yaml
- references/2d-profiles-and-dxf.md
- references/animation.md
- references/build123d-modeling.md
- references/environments.md
- references/exports.md
- references/inspection-and-validation.md
- references/kinematics.md
- references/manufacturing-cnc.md
- references/manufacturing-injection-molding.md
- references/manufacturing-printing.md
- references/manufacturing-review.md
- references/manufacturing-sheet-metal.md
- references/model-contract.md
- references/positioning.md
- references/project-layout.md
- references/snapshot-review.md
FAQ
Что делает скилл cad?
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.
Как установить скилл cad?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cad запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…