solidcraft-checking
SolidCraft checking
solidcraft-modeling and solidcraft-editing cover the commands, plane axes, ids, edge picks and the MCP workflow: load the one that fits first. This skill adds checks for errors SolidCraft does not report, and the work around a design kept in a repo.
$SKILL below is the folder this file is in (~/.claude/skills/solidcraft-checking for a user install). Checked against SolidCraft 0.21.0. scripts/tests/test_facts.py checks every trap and convention below, and the facts behind the corrections in solidcraft-modeling. After a SolidCraft upgrade, run the tests and fix the text where they fail:
PYTHONDONTWRITEBYTECODE=1 uv run --no-project --with pytest --with build123d pytest -p no:cacheprovider $SKILL/scripts/tests
Scripts
An MCP batch and a command script ({"commands": [...]}, run by solidcraft-cli run) take the same command list. Build with a script when the design goes into a repo or must be rebuilt later: a script rebuilds the design from scratch on every run. Subagents share the session's one MCP design, so agents that run in parallel use solidcraft-cli only.
In $SKILL/scripts/:
python3 $SKILL/scripts/run.py script.json [--in <design>] [--save <name>.json]runs a script and printsFAIL, aWARNline per feature warning, aSKETCHline per sketch above dof 0 and aBODYline per body, for the end state and for eachdocument.inspectinside the script.scb.pygives a generator aScriptwith sketch helpers that come out at dof 0 (hexagon,circle,rounded_rectangle,place) andcmdfor any other command. It rejects repeated sketch, feature and body names. Import it withsys.path.insert(0, "<$SKILL>/scripts").uv run --no-project --with build123d python $SKILL/scripts/compare_step.py actual.step expected.stepgives the exact volume of the difference between two STEP files and where it sits. It and the tests run OpenCASCADE through build123d as a separate tool, the waytools/freecad-oracleruns FreeCAD: SolidCraft does not use, link, vendor or ship any of it.solidcraft-cli snapshot <design or script> --out shot.png --view isorenders a PNG to look at.