27painter/dsh-sw-cad ↗★ 2

dsh-sw-cad

Drives the installed AutoCAD and SolidWorks desktop apps from dsh or Codex: two on-demand skills plus two MCP servers, with a discovery shim that keeps the SolidWorks tool catalog at 256 tokens instead of 23,404. 适合需要通过自然语言控制本地CAD和SolidWorks进行绘图与建模的用户。

Package
dsh-sw-cad
Compatibility
Unverified
Harness peer range
>=0.2.0-rc.1 <0.3.0-0
Version
0.1.3
License
MIT
Last updated
Oct 25, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:27painter/dsh-sw-cad

Usage

Just describe the drawing. The skill loads itself.

Open AutoCAD, draw a bearing housing: base 120×80×10, upright 60 high × 12 thick,
φ40 through hole on top. ISO A3 sheet with title block and dimensions, save to
D:\AutoCad and export PDF.
In SolidWorks, build a flange: OD 100, 20 thick, 30 bore, four M10 bolt holes on a
bolt circle. Save as SLDPRT and export STEP.

Practical notes, learned the hard way:

  • SolidWorks tools nest their arguments. The upstream tools take their payload under a params key, so a call looks like call_tool(name="solidworks_sketch_and_extrude", arguments={"params": {"shape": "rectangle", "width_mm": 60, "height_mm": 40, "depth_mm": 10}}). AutoCAD tools take theirs flat. Getting this wrong fails with a pydantic message about a missing params field, which is the hint.
  • Say one CAD at a time. Mentioning both loads both skills and mixes the task.
  • Ask for a plan first on anything complex. Both skills have a planning step; approving a plan before geometry is drawn is cheaper than undoing a bad drawing.
  • Ask for the preview. The AutoCAD path ends in an 8-step validator plus a screenshot; the SolidWorks path exports four orthographic previews. "Show me the preview" is a fair request and the skills honor it. One caveat, measured here: the AutoCAD screenshot needs the window to be visible — with AutoCAD hidden or minimised it comes back blank. The geometry itself is always verifiable through the API (handles, bounding boxes, mass properties), so do not treat a blank image as a failed drawing.