solidcraft-checking
Skill12 starsChanged 17 days agoApache-2.0View on GitHub
Use alongside solidcraft-modeling and solidcraft-editing whenever you build, change or port a SolidCraft design. Checks for errors SolidCraft does not report (parameter ranges, every allowed value, exact STEP comparison), regression tests, designs kept in git, porting from build123d, CadQuery, OpenSCAD or STEP.
2 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- bherbruck/solidcraftedited, first seen Nov 8, 2026
- tangency-labs/solidcraftedited, first seen Nov 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- bherbruck/solidcraft★ 15k97% same
- tangency-labs/solidcraft★ 15k97% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- solidcraft-3d-print-dfmSkill
- solidcraft-assembliesSkill
- solidcraft-delivery-gateSkill
- solidcraft-dfm-reviewSkill
- solidcraft-drawing-and-tutorial-readingSkill
- solidcraft-editingSkill
- solidcraft-engineering-drawingSkill
- solidcraft-hole-fastener-rulesSkill
- solidcraft-mechanismsSkill
- solidcraft-modelingSkill
- solidcraft-requirements-and-sanitySkill
- solidcraft-robust-build-orderSkill
- solidcraft-sheet-metal-flatpackSkill
- solidcraft-sheet-metalSkill
- solidcraft-shell-and-tangent-arcsSkill
- solidcraft-speed-modeling-lessonsSkill
- solidcraft-step-partsSkill
- solidcraft-sweep-and-boolean-hangsSkill
- solidcraft-tutorial-recipesSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Exact check: when a port has a reference, or a volume gap leaves doubt: export STEP (file.export {path, bodies}) and run compare_step.py.
- Very specific: line 49
When a timeline feature fails, solidcraft-cli run writes nothing and the error names the feature.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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). The scripts and test_facts.py were written against SolidCraft 0.21.0 and have NOT been re-run on 0.25 - 0.29 (the app is now at 0.29.0, file format solidcraft/46). 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.
Steps to add
- Parameters and features. Each parameter comment states the allowed range ("whole number, 4 or more"): the user reads it in the Parameters table, and SolidCraft enforces no range. Derive sizes from measured values, so that a count parameter changes how many features there are, not how big they are. An expression that more than one sketch or feature uses becomes a named parameter. Add the derived numbers the user needs (parts to print) and mark the driving parameters favourite (
parameters.favorite). Give each thing the user thinks of (a port, a row of standoffs) its own feature, named after it, so it can be found and changed on its own. Choose the origin so that no sketch dimension reaches 0 for any allowed value (trap 1). - Every sketch at dof 0. A sketch with dof left can solve to a different shape after a parameter change, without an error.
run.pylists them. Sketches of a model built by hand on 0.29.0 (angled plates, T-slot) were left at dof 4 to 16; sketch chamfers on several corners also raise the dof. Add dimensions or constraints, or say in the report that the sketch is not fully constrained. - Every allowed value. One script of
parameters.changecommands walks each driving parameter to both ends of its range, one change after another, and back to the default, as edits in the app do: trap 1 fails only on the change after the one that reaches 0. Put adocument.inspect {measure: true}after each end of a range and run the walk withrun.py walk.json --in <design>. Every state must be clean: noFAIL, noSKETCH, andBODYvolumes and centres of mass that match the values you compute for that state. A boolean retry can leave the geometry wrong with only aWARNline, and the volume shows it (trap 4); a mirrored sketch (trap 1) keeps the volume and moves the centre of mass. - Exact check when a port has a reference, or a volume gap leaves doubt: export STEP (
file.export {path, bodies}) and runcompare_step.py. Before porting, in SolidCraft's own chat or any MCP client, callskill_reference {"skill":"solidcraft-checking","file":"reference/porting.md"}. Elsewhere, read$SKILL/reference/porting.md. - Kept in a repo. Save as
<name>.jsonwithrun.py build.json --save <name>.json: a.jsondesign stays plain JSON when it is saved again, so git diffs stay readable. Saving over a file leaves<name>.json.bak, so ignore*.bak. From then on the design file is the source, and changes go into it with--in <design> --save <design>. Copy$SKILL/templates/test_design.pynext to the design, fill in its cases, set its tolerance as its comment says, and run it until it passes. Expected values come from an exact reference when porting, from hand calculation for simple shapes, or from a build the user has reviewed. After a change, update frozen values only where the change is meant to change them. - Analytic check of corner fillets. For fillets where edges meet at a vertex, compute the volume from the formulas in
solidcraft-modeling(vertex blend removal; rounded cube) and compare it withmeasure. Seen on 0.29.0 on 40 mm cubes: 0.002 % at R5 (12 edges), 0.003 % at R15 and 0.013 % at R39 (3 edges), 0.025 % (9 mm3) at R19 on all 12 edges. A gap of that size is a match; a larger gap or a changed face count means the fillet is wrong.
Traps
- Zero dimension. A sketch dimension driven to 0 loses its side: the point it measures has no direction left, so the solver may leave it anywhere on the axis. On the next parameter change it either fails with
its constraints would conflict(a point placed by dimensions from the origin) or, with no error, moves it: a slot that other constraints also held slides to the origin when the distance reaches 0 and, the solver taking the shortest step that fits, keeps the side it was drawn on when the value comes back. Check every distance expression against the whole allowed range of each parameter in it, counts included; the walk in step 3 catches the failure, and only the volume or the position catches a point that ended up on the other side. For a point on an axis, passx=Noneory=Nonetoplace: it aligns the point instead of dimensioning it. For a position that does reach 0, such as the first of a centred row of one, dimension it from a sketch point placed outside the part: a point at x = -100 mm, then the distance100 mm - (n - 1) / 2 * pitchfrom it. - Counts. Solid patterns take counts 1..1000; a count that reaches 0 fails the rebuild. A fractional count rounds to the nearest whole number without an error (6.5 gives 7 copies), while every other expression uses the exact value, so a centred row shifts. Nothing in SolidCraft enforces a parameter range during a parameter change (configuration rules apply only when a configuration row is activated): choose a range that keeps every count at 1 or more, write "whole number" and the range in the comment, and use
round(n)wherever the count also positions something. - Circumscribed polygons.
sketch.polygon.circumscribedwith a size dimension and one vertical side still has 1 dof: its corners can alternate in and out.sketch.constraint.polygonmakes it regular;scb.hexagonadds it. - Boolean retries. A
Boolean retry: ...warning means the result may be wrong (see "Boolean warning" in thesolidcraft-modelingreference), so check the volume of that state.temporary coincident-face separationcomes from faces that coincide. A tapered tool whose start or end lies on a face of a plain block, or a straight cylinder joined onto the floor of a filleted, shelled box, does not log it; atool displacementwarning shows up when a join and a cut share one location, as in a standoff built as a joined cylinder with a cut pilot hole, patterned together. That case reports the warning but its volume agrees with the analytic growth, and a single ring profile removes the warning. Starting cutters about 1 mm past the faces they pierce and sinking joins about 1 mm into the body remain good practice on a single feature. Check the volume of every state either way. - Measurement accuracy. The
solidcraft-modelingreference gives how far measured volumes stray from computed ones. Centre of mass and bounding box come out up to about 5e-5 of the part size off. Set test tolerances as the template says. - Expressions. They have
+ - * / ^ %,sin cos tan asin acos atan atan2 sqrt abs min max floor ceil round mod trunc exp ln log log10 pow sign hypot(logis base 10),piand units; noifand no comparisons. Build steps fromfloor,mod,min,maxandsign, which gives 1 at 0.asin acos atan atan2return angles, so a unitless parameter cannot hold them. - Snapping. A point created exactly on an existing point or the origin becomes coincident with it (
connectdefaults to true). - Repeated body names. A repeated
body_nameis renamed (Body1) without an error, sotargetsreach only the first body. - Offset sign. On a rectangle chain
sketch.offsetgoes inward with a positive distance (0.29.0). The wrong sign still succeeds and gives a wrong volume (a full block): the volume check catches it.
Conventions
taperpositive widens along the extrude direction, negative narrows it, also withdirection: negative.sketch.polygon.circumscribedwith 6 sides andangle: 0puts vertices up and down and flat sides facing ±x.- A pattern of a join or cut feature repeats that join or cut. Put every join before the cuts that must stay open: a later join fills them.
- When a timeline feature fails,
solidcraft-cli runwrites nothing and the error names the feature.run --inandsnapshotalso accept a command script in place of a design. - To build in the user's open app, see the bridged mode in docs/mcp.md: the app and the server both start with extra flags, so ask the user.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

