Write a Form Studio design as code (build123d on OpenCascade) that builds, is editable through named Params and passes the checks, and change it with edit_design ops instead of resending the file. Use when designing any part or product with create_design and edit_design (recipes are only for standard parts), and when you need the contract, the rules, form.parts, assemblies, text and patterns, or a worked example. A build that failed: failure-recovery. A complex design: staged-design.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cad Core?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kaizensx-cad-core)
---
name: cad-core
description: Write a Form Studio design as code (build123d on OpenCascade) that builds, is editable through named Params and passes the checks, and change it with edit_design ops instead of resending the file. Use when designing any part or product with create_design and edit_design (recipes are only for standard parts), and when you need the contract, the rules, form.parts, assemblies, text and patterns, or a worked example. A build that failed: failure-recovery. A complex design: staged-design.
---
# CAD core: the design contract
FORM tools: `design_guide()`, `design_brief()`, `create_design()`, `edit_design()`, `build_candidates()`,
`repair_feature()`, `get_design_source()`, `verify()`, `refine_design()`.
A Form Studio design is one Python file with one design class. The kernel builds it, names every face after the
feature that made it, and derives STEP, STL, checks and pictures from it. The source is the only authority.
Design every part and product yourself; recipes (`create_project()`) are only for standard parts (gridfinity,
pegboard, hose adapters, test coupons).
1. Read `references/quickstart.md` before the first `create_design()`: the FeatureDesign skeleton, the loop, editing
by ops, the contract and verify. `design_guide(topic="core")` returns it. The rest is one topic each, read when
the design needs it: `references/contract.md` (topic `contract`: the full Recipe contract and rules; for a print
it swaps rules 5 and 6 for bed orientation, overhang and wall rules), `references/sketch.md` (topic `sketch`),
`hardware.md` (`form.parts`), `assemblies.md`, `large.md` (topic `large`: assemblies of many parts, copies made
once, per-part export, timeouts), `marks.md` (text and patterns), `robust.md` (heavy designs,
refinement), `openscad.md` and `freecad.md` (FreeCAD PartDesign files).
2. Skeleton first: `create_design()` with the main body; it returns a six-view sheet and a section to look at. Then
one feature per `edit_design()` insert op. A feature that fails twice is deferred and named in the reply.
3. One feature per independent operation (a part, a cut, a fillet set, a layout), never "Lid and pins". Write plain
numbers in features: they are lifted into parameters on their own.
4. Change a design by naming what changes: `get_design_source()` once, then `edit_design()` ops (replace a feature,
replace found text, insert, delete, set_param; suppress, restore, move, rename, split). One call is one build and
one revision. `update_design(source=...)` is for a different design, never for a change.
5. Numbers the person gave: `design_brief()` first; its audit comes at the top (settle it before code) and its
contract becomes the proof sheet. `@feature(..., expects=[contract.bolt_circle(4, 5.2, 60)])` makes a feature fail
where it misses. Claim only PASS rows (the brief-to-contract skill).
6. Preflight checks the source before the kernel and returns every problem at once. Fix them all in one call.
7. A build that fails comes back diagnosed: apply its first fix, or `repair_feature()`; two or three plausible
constructions: `build_candidates()` builds and scores them in parallel; you keep one. The ladder is in the
failure-recovery skill.
8. Worked examples that build: `references/example-features.md` (a FeatureDesign) and
`references/example-recipe.md` (a two-part box written as a Recipe).
9. Nothing is added to your design after a build unless you ask. `refine_design(action="propose")` builds
candidate refine changes (fillet tiers, an edge break, a grip zone, ribs, ...), each measured and drawn; the head
stays as it is. Apply only the ones that serve the design (`action="apply", names=[...]`); `action="undo"` takes
one out again. Give fit, access, mechanism and interface features those roles so they stay exact.
10. Before you say it is done: `verify(project)`. done must be true, or say every open item it lists.
Units are mm, degrees and grams. A dimension is `specified` only with a named source, `measured` only when the person
measured it and told you, otherwise `assumed`. The design source runs in Form Studio's kernel worker: write geometry,
never file, network or process access.