OpenCAD skill
The create-cad-files skill builds a dimensioned part from a plain description and returns validated STEP and STL files.
- 66 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The skill runs scripts and may install the `opencad[occt]` package into the active Python environment, asking first.
Install
- Works in
Manual install
npx skills add caid-technologies/OpenCADThe README command for Claude, Codex, OpenCode and OpenClaw.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill runs scripts and may install the `opencad[occt]` package into the active Python environment, asking first.
This is third-party code. Review the repository files before installing.
What it does
OpenCAD gives an agent the `create-cad-files` skill. The user describes a part in words, for example a 72 mm round spray bottle, and the agent writes a parametric source in readable Python, builds real geometry with the native OCCT backend, validates the file and returns links to the source, the STEP or STL and the feature tree. The user does no manual Python or command-line work. The skill starts from dimensions, units, holes and clearances, defaults to millimetres and asks only about what changes the part materially. STEP is chosen for editable and manufacturing geometry and STL for 3D printing. Each run gets its own project folder, and a finished file does not overwrite an earlier one without `--force`. The same repository holds the CAD kernel, a sketch solver, a parametric operation tree and a React and Three.js viewer component.
Who it is for. Engineers and makers who need mechanical parts and printable files from a verbal description without manual modelling.
Good fit when
- A part with given dimensions, holes and clearances is needed as a STEP file.
- A model is needed as STL for a 3D printer.
- Part parameters should stay as named constants so one edit changes a dimension.
- A finished CAD file has to be validated separately from the code that made it.
Not a fit when
- You need to work on someone else's SolidWorks or AutoCAD project: the skill creates a part from scratch with OpenCAD.
- The part is more complex than text can describe and needs interactive sketching with a mouse.
- The environment cannot install `opencad[occt]`: without it the skill cannot build geometry.
Example request
Create a 72 mm round spray bottle and give me STEP and STL files.Limitations
The skill requires the `opencad[occt]` package: if the import fails the agent explains the dependency and asks before installing it into the active Python environment. The result depends on description accuracy: missing dimensions are either asked about or taken as a stated assumption. Files are made in a UUID-named project folder and overwriting is refused without `--force`. Validation runs on the finished file, and on failure the agent revises the source and repeats the check. Installation with `npx skills add` covers Claude, Codex, OpenCode and OpenClaw.
How to disable. Remove the `create-cad-files` skill from the agent skills directory. Created project folders and STEP and STL files are deleted by hand.
FAQ
How do I install the skill?
Run `npx skills add caid-technologies/OpenCAD`. For OpenClaw the `skills/create-cad-files` skill is picked up from the workspace, and NemoClaw has an install command from a checkout.
Which formats does it output?
STEP, STP and STL. STEP suits editing and manufacturing, STL suits printing, and both are made on request.
Do I need to write code?
No. The user describes the part in words, and the agent writes the parametric source, builds the file and validates it.
Where do the results go?
Into a UUID-named project folder: the `assembly.py` source, an `outputs` folder with CAD files and the `.tree.json` feature tree.
What if the OpenCAD package is missing?
The agent reports the dependency and asks before installing `opencad[occt]` into the active Python environment.
Discussion
No questions or reviews yet.
Related
SkillsPython SDK for parametric CAD with an agent skill: code-built models, STEP, STL and MJCF export, edits rerun only dependent cells.
A library of agent skills for CAD, CAE and CAM: generate and edit models, export STEP, STL, 3MF, robot description files and mesh slicing to g-code
agentcad gives an AI agent 3D design: build123d scripts, STEP export, renders, geometry checks and a live browser preview
An MCP server for OpenSCAD: the agent renders parts at a known scale, measures geometry and finds collisions in assemblies
PartCAD keeps mechanical parts as text, so an agent writes the CAD script, renders the model and checks it against the brief.
Installable agent skills for ForgeCAD: the agent writes parametric .forge.js models, validates them through the CLI and syncs them to a project
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| OpenCAD (this card) | no | 66 | ||
| FreeCAD MCP | no | not required | 3,310 | an MCP server driving a running FreeCAD; here the agent builds a part with parametric Python and validates the file without a GUI |
| OpenSCAD MCP | no | not required | 170 | an MCP server rendering OpenSCAD parts; here OCCT geometry and STEP export |
README in short
The repository ships provider-native plugin manifests for Claude and Codex and adapters for OpenCode. Alongside sit the Python packages `opencad`, `opencad-agent`, `opencad-backend` and the npm package `opencad-viewport` under the Apache 2.0 licence.
README badge
Original SKILL.md
--- name: create-cad-files description: Create dimensioned 3D CAD parts from natural-language requirements and export validated STEP, STP, or STL files with OpenCAD. Use when a user asks an AI agent to model a mechanical part, make a printable STL, create an editable STEP file, convert a dimensional description into CAD, or revise a previously generated OpenCAD model. --- # Create CAD Files Create the model as readable OpenCAD Python, export it with the native OCCT backend, and validate the exchange file before returning it. Keep the user experience prompt-first: handle source generation, build commands, and validation without asking the user to operate Python. ## Workflow 1. Extract dimensions, units, geometry, holes, clearances, and output format. Use millimeters unless specified otherwise. Ask only when a missing dimension materially changes the part; otherwise state the assumption. 2. Prefer STEP for editable/manufacturing geometry and STL for a triangulated 3D-printing deliverable. Create both when requested. 3. Read [references/opencad-api.md](references/opencad-api.md) before writing a model. At the start of every run, create a fresh project directory with `scripts/create_project.py` and use the returned path as `PROJECT_DIR`. The helper creates a UUID-named directory under `~/forma-workspace/`; never derive the project ID from the request. Keep every source file, README, component, and generated artifact inside `PROJECT_DIR`. Create `README.md` for project context, `assembly.py` as the master composition entry point, `parameters.py` when dimensions are shared, a `components/` Python package for component modules, and an `outputs/` directory for generated artifacts. Honor explicitly requested filenames inside `PROJECT_DIR`, but do not replace the shared root or generated project ID. 4. Keep the model parametric: assign important dimensions to named constants, have component modules expose named builders or parts, and create one final `Part` in `assembly.py`. Leave that final part as the last generated shape in `assembly.py` (or the explicitly requested master file). Do not call `Part.export()` in the model; the build helper owns export and validation. 5. Ensure `opencad[occt]` is installed. If importing OpenCAD fails, explain the dependency and ask before installing it into the active Python environment. 6. Resolve this skill's directory, create the project directory by its absolute path, stay inside the returned project directory, and run the build helper by its absolute path: ```bash PROJECT_DIR=$(python /path/to/create-cad-files/scripts/create_project.py) python /path/to/create-cad-files/scripts/build_cad_file.py "$PROJECT_DIR/assembly.py" "$PROJECT_DIR/outputs/assembly.step" --tree-output "$PROJECT_DIR/outputs/assembly.tree.json" ``` Use an `.stl` output name for STL. The helper refuses to replace files unless `--force` is explicitly supplied. 7. If exporting both formats, run the same project `assembly.py` source twice. Validate an existing artifact independently with the absolute path to `scripts/validate_cad_file.py`. 8. Inspect failures and revise the source rather than bypassing validation. Return clickable paths for the source, CAD artifacts, and feature tree, plus units and assumptions. ## Quality rules - Preserve exact requested dimensions and name user-facing parameters. - Use closed, ordered sketch profiles. Avoid self-intersections, zero-thickness contact, and coplanar boolean ambiguity. - Apply fillets and chamfers after the main solid and boolean operations. - Keep holes and clearances explicit. Do not invent manufacturing tolerances; flag them when fit matters. - Do not claim that basic file validation proves printability, load capacity, code compliance, or manufacturability. - Retain the project source, `README.md`, and tree JSON so revisions remain reproducible. - Keep the project self-contained so `assembly.py`, nested component packages, and generated artifacts can be managed together. - Use `__init__.py` files for component packages and subpackages. Import nested components from the project root, for example `from components.motor.mount.screw_pattern import make_screw_pattern`. - Document the project purpose, units, assumptions, key dimensions, component/package tree, build command, artifacts, and known limitations in `README.md`. ## Failure handling - If CadQuery/OCP is unavailable, use `opencad[occt]`; never substitute the analytic backend for a deliverable. - If a boolean or fillet fails, simplify the feature, reduce the radius, or eliminate coincident faces. - If requested geometry exceeds the API surface, explain the limitation and implement the closest faithful parametric model only with the user's agreement.