From cad
Generates, validates, and modifies 2D DXF drawings from Python ezdxf sources. Use for laser/plasma/waterjet cut layouts, gaskets, panels, and flat patterns sourced from parametric scripts or 3D CAD projections.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cad:dxfThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Provenance: maintained in [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad).
LICENSEagents/openai.yamlrequirements.txtscripts/dxf/__init__.pyscripts/dxf/__main__.pyscripts/dxf/cli.pyscripts/dxf/render_payload.pyscripts/packages/cadpy/pyproject.tomlscripts/packages/cadpy/src/cadpy/__init__.pyscripts/packages/cadpy/src/cadpy/analysis.pyscripts/packages/cadpy/src/cadpy/api.pyscripts/packages/cadpy/src/cadpy/assembly.pyscripts/packages/cadpy/src/cadpy/assembly_composition.pyscripts/packages/cadpy/src/cadpy/assembly_export.pyscripts/packages/cadpy/src/cadpy/assembly_flatten.pyscripts/packages/cadpy/src/cadpy/assembly_spec.pyscripts/packages/cadpy/src/cadpy/cad_ref_syntax.pyscripts/packages/cadpy/src/cadpy/catalog.pyscripts/packages/cadpy/src/cadpy/cli_logging.pyscripts/packages/cadpy/src/cadpy/file_metadata.pyProvenance: 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.
Create or modify 2D DXF drawings from natural-language requirements or from CAD geometry, generate validated .dxf artifacts, and return checked outputs. DXF sources are Python files defining gen_dxf() returning an ezdxf document; the CLI owns output paths.
Two source shapes are supported:
gen_dxf(). Use for pure 2D outputs — gaskets, panels, templates, cut layouts — with no 3D model behind them.gen_dxf() added to a CAD generator source that also defines gen_step(). Use when the DXF is a drawing or profile of a 3D part; create and validate the STEP geometry with $cad first, then add the projection in the same source file.Use this skill when the user asks for DXF files, 2D drawings, profiles, outlines, templates, gaskets, panels, flat patterns, or cut layouts for laser, plasma, waterjet, or CNC routing.
Use $cad for the 3D part or assembly a DXF derives from. Use $sendcutsend for SendCutSend-specific upload preflight.
Use these defaults unless the user specifies otherwise:
doc.units = ezdxf.units.MM).The launcher lives in the DXF skill directory:
python scripts/dxf targets... [flags]
Use the active project Python interpreter; treat python as an interpreter placeholder, and use --help for the full interface. Target paths resolve from the command's current working directory; run from the workspace that owns the artifacts with cwd-relative target paths. Keep a DXF output and its Python generator in the same directory with the same basename unless the user requests otherwise.
A DXF target is a Python source defining:
def gen_dxf():
...
return document
Plain generated Python targets write sibling .dxf outputs. Use -o/--output only with one plain generated Python target, or use SOURCE.py=OUTPUT.dxf positional pairs for per-target custom outputs. Do not put output paths in the gen_dxf() return value.
scripts/dxf is a generator; it does not inspect existing .dxf files. For existing DXF inspection, use ezdxf for entity/layer checks and $cad-viewer for visual review.
$cad first, then add or update gen_dxf() in the same source. When possible, derive the DXF from in-memory STEP/solid topology rather than duplicating geometry formulas, so the DXF remains a direct projection/unfold of the part being exported.scripts/dxf on explicit Python source targets only; do not run directory-wide generation.python scripts/dxf path/to/source.py
python scripts/dxf path/to/source.py -o path/to/output.dxf
python scripts/dxf path/to/a.py=out/a.dxf path/to/b.py=out/b.dxf
Verify the generated file with targeted ezdxf checks instead of eyeballing: entity counts by type and layer, closed flags on cut profiles, drawing extents, and every dimension the user specified.
import ezdxf
doc = ezdxf.readfile("path/to/output.dxf")
msp = doc.modelspace()
profiles = [e for e in msp.query("LWPOLYLINE") if e.closed]
holes = msp.query('CIRCLE[layer=="0"]')
Report only checks that actually ran.
After creating or modifying .dxf artifacts, you must ALWAYS hand the explicit file path(s) to $cad-viewer when that skill is installed and include its live viewer link(s) in the final response. If $cad-viewer is unavailable or startup fails, report that and rely on ezdxf checks instead of silently omitting the handoff.
Final responses should include generated files, returned viewer links, validation actually run, and assumptions.
npx claudepluginhub earthtojake/text-to-cad --plugin cadReviews DXF and STEP/STP uploads for SendCutSend.com orders, checking geometry, material/SKU/thickness, and service availability against official ordering guides.
Creates vector graphics, diagrams, and technical drawings in ODG format using LibreOffice Draw. Converts between ODG/SVG/PDF/PNG via soffice CLI or Python UNO; automates workflows.
CAD modeling with build123d Python library. Use when creating 3D models, exporting to GLB/STEP/STL, or doing boolean operations (union, difference, intersection). Triggers on: CAD, 3D modeling, sphere, box, cylinder, mesh export, GLB, STEP, STL, solid modeling, parametric design, threads, fasteners, bolts, nuts, screws, gears, pipes, flanges, bearings, bd_warehouse, spur gear, helical gear, bevel gear, planetary gear, ring gear, cycloid gear, rack and pinion, gggears, herringbone, gear mesh, gear train.