About cadcraft
cadcraft is a skill for operating CADCraft through a structured automation interface, for users editing or processing drawings. It prioritizes inspecting the active session, discovering commands, and verifying changes before saving.
Key features
- 01Inspect drawings, UI, and command state
- 02Edit through the command line or engine
- 03Discover available commands and parameters
- 04Render and verify drawing results
- 05Save drawings as DXF or DWG
Use cases
- 01Edit a drawing in an existing CADCraft session
- 02Process drawing files unattended
- 03Verify edits and export a drawing copy
MCP support
It can connect a desktop control session through the CADCraft MCP bridge, or use headless MCP for file processing. The skill does not install CADCraft or register an MCP server.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ mroxso/ artcraft-skills --skill cadcraftAfter installing, type/cadcraftin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/control-protocol.mdLICENSE-MITDetails
From the project READMECADCraft
Operate CADCraft through its structured automation interface. Preserve the user's requested drafting workflow and target drawing.
Protocol reference
Read the relevant sections of references/control-protocol.md before constructing calls. This is the downloaded upstream protocol, captured on 2026-11-09.
Source: CADCraft control protocol.
Useful sections: the method table (top of the document), Panel docking, Command-line replies, and Interface language. Relative links inside the downloaded document (e.g. localization.md) refer to upstream documentation; resolve them against https://github.com/storytold/cadcraft/blob/main/docs/ when needed. The document is short and does not list individual drawing commands: discover them at runtime with engine.commands instead of inventing command IDs or parameters.
Locate the executables
cadcraft and cadcraft-cli may not be on PATH even when CADCraft is installed. Discover them before assuming anything is missing, and never invent a path — search for it:
- PATH:
command -v cadcraft cadcraft-cli(POSIX) orwhere cadcraft cadcraft-cli(Windows). - macOS: look for
CADCraft.appin/Applicationsand~/Applications, or runmdfind -name CADCraft.app; the binary insideContents/MacOS/is the desktop app. - Linux / Windows: check the usual install locations and the target of any desktop or Start-Menu shortcut.
cadcraft-climissing is not a blocker. The control port speaks plain line-delimited JSON over loopback TCP and needs no bridge: send one request per line, e.g.{"id":1,"method":"cmdline.input","params":{"text":"circle 0,0 5"}}, and match replies byidandok. A short script in any language covers every method.
Select the session
- For a user's open drawing or visible application, use an existing CADCraft MCP bridge or control session. A headless session has its own in-process drawings and cannot edit the user's live window.
- For unattended processing of files, use headless MCP (
cadcraft-cli mcp). - Discover available CADCraft tools and installed executables first. If the required connection or executable is missing, report the concrete prerequisite; creating this skill does not install CADCraft or register an MCP server.
Start a desktop session with --control PORT (or CADCRAFT_CONTROL_PORT=PORT); it listens on 127.0.0.1:PORT. Bridge it with:
cadcraft-cli mcp --connect 127.0.0.1:PORT
Reuse a running session when possible and keep TCP on loopback. The upstream protocol documents no authentication handshake or file-access roots; if the installed version requires a token or roots, follow its --help output rather than guessing.
Use CADCRAFT_CONFIG_DIR to point the app at a private, isolated profile for automation (an explicitly empty value disables workspace reads and writes). Do not edit the user's workspace.json directly.
Inspect, edit, and verify
Inspect before editing: drawing.inspect for counts, extents, layers, styles, blocks, layouts, selection, and undo state; ui.inspect for the UI state, active view, and any pending "Save changes?" prompt (closePrompt); cmdline.state for the current prompt. The app may restore or already hold drawings you did not create.
Two ways to edit:
- Command line —
cmdline.input {text}behaves exactly like a user typing: it starts commands by name or alias and answers prompts (pointsx,y, relative@dx,dy, polar@d<a, distances, keywords, empty = Enter). Spaces act as Enter except at text prompts.cmdline.script {text}runs a multi-line script;cmdline.keysends Enter or Escape. Always return the command line to the idleCommand:prompt (Escape) before the next unrelated operation. - Engine commands —
engine.execute {command, params}runs any command with JSON parameters and never opens a dialog. Look up IDs, parameter docs, and enablement viaengine.commands.
A refused command-line entry (unknown command, invalid input) still replies "ok": true; always check the error field and output of the reply. app.open without a string path fails with "missing path".
Use ui.menu.invoke only when interactive menu behavior is intended. ui.pointer defaults to world coordinates; ui.click, ui.move, and ui.drag use screen points and reach every widget. ui.key only queues key events — poll ui.inspect or ui.elements for the resulting focus or state before the next action. Use ui.elements (exact-match filters on label, role, focused) to find controls instead of guessing coordinates.
Panel layout (ui.dock, ui.dock.reset, panel IDs toolSets, layers, properties, externalReferences; the canvas is protected) is invoked through engine.execute and does not edit document contents. Change layout, theme, or interface language only when the task requires it.
Verify visually and structurally: re-run drawing.inspect (entities carry handles and geometry) and render with ui.render — a headless render that frames the whole drawing by default (fit: false keeps the current view, window shows just an area), returns pngBase64, or pass path; background picks the canvas colour and plot_style applies a plot style table such as monochrome.ctb. ui.screenshot captures the app window and needs a presented frame.
File access and output
- Desktop control:
app.open {path}/app.save {path}/app.quit. - Save output as DXF or DWG:
ui.setwithsaveFormat: "dxf"|"dwg"andsaveVersion: "2000"…"2018"set what Save As suggests for new drawings;SAVEASalso acceptsversionandbinarydirectly. - Report successful saves and the exact output path and format/version. Do not overwrite the user's source drawing unless asked; save a copy under a new name.
Timeouts and uncertain outcomes
The server waits up to 60 s for the app to answer. A timeout reply carries state:
"not-run"— the request was cancelled and will never run; resending is safe."may-have-run"— the app had already started it and may still change the drawing (its late result is discarded). Inspect withdrawing.inspectbefore resending any mutation.
After a disconnect or any other unclear failure, inspect drawing and undo state before retrying. Stop and report unresolved state if inspection cannot determine whether replay is safe.