AgentStack
SKILL verified Apache-2.0 Self-run

Agentcad

skill-jdilla1277-agentcad-skill-agentcad-skill · by jdilla1277

CAD tool for AI agents. Use when the user asks you to design, model,

No reviews yet
0 installs
6 views
0.0% view→install

Install

$ agentstack add skill-jdilla1277-agentcad-skill-agentcad-skill

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Agentcad? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

agentcad — CAD tool for AI agents

You have access to agentcad, a CLI that turns build123d or CadQuery Python scripts into 3D geometry. All output is JSON. Every command returns "command" and "status" keys.

First-time setup

agentcad init --name 
agentcad --help   # Read this — it is your complete operational briefing

Core workflow

  1. Write a script. No imports needed — build123d primitives,

show_object, and agentcad edit helpers are pre-injected by default. show_object(result) is required.

  1. Dry-run first to check metrics without consuming a version:

``bash agentcad run script.py --output test --dry-run ` Check volume, dimensions, is_valid` in the response.

  1. Run for real. Visual feedback is on by default:

``bash agentcad run script.py --output label `` Every successful run produces (paths in the JSON response):

  • preview.png — 4-view composite (front, right, top, iso). Read this

to confirm the part looks right before iterating. One image, all 4 angles.

  • diff.side_by_side — side-by-side PNG vs the most recent successful prior

version. Read this when iterating to see what your change did.

  • diff.overlay — tinted (green prev, red this) overlay for subtle shifts.

Read only if side-by-side didn't resolve the question.

  • viewer.html — interactive 3D viewer for the user (humans only; you can't

render HTML). Mention it to the user so they open it.

Pass --no-preview only for tight parametric sweeps where latency matters.

  1. Show the user. After a successful build, open the interactive viewer:

``bash agentcad view v1_label/viewer.html # or output.step / output.glb `` Users expect to see the result in a browser. Do this every run, unprompted.

  1. Inspect if invalid. If is_valid: false or geometry looks wrong:

``bash agentcad inspect v1_label/output.step ``

  1. Measure feature sizes. For dimensions beyond top-level metrics:

``bash agentcad measure v1_label/output.step ` Use this for hole diameters, cylindrical boss diameters, edge lengths, face areas, and full per-feature measurements with --features`.

  1. Check explicit feature requirements. If the prompt names measurable

holes, bores, or cylindrical bosses, write them into spec.json before final handoff: ``json {"features":[{"name":"bolt_holes","type":"cylinder","diameter_mm":6,"count":4}]} ` Then run: `bash agentcad check-spec v1_label/output.step spec.json ` Revise the CAD if passed is false. status: success only means the comparison ran; passed is the actual spec-check result. If you include axis, copy it from agentcad measure's cylindrical_features[].axis`.

  1. Iterate. Fix the script, run with a new --output label. Use

agentcad diff 1 2 to compare versions.

Script writing rules

  • show_object(result) is required — at least one call.
  • These are pre-injected by default (no import needed):

build123d primitives like Box, Cylinder, Sphere, Plane, plus show_object, load_step, pick_face, pick_edge, fillet_edges, chamfer_edges, shell_faces, cut_pocket, boss, split_by_plane, replace_face, annular_boss, and raise_annulus.

  • For imported STEP annular edits, use the non-fuse workflow:

``python raw = load_step_shape("v1_vendor/output.step") result = raise_annulus(raw, center=(0, 0), inner_diameter=40, outer_diameter=80, height=7, z=5) show_object(Compound(result)) ``

  • CadQuery remains supported. Use import cadquery as cq, initialize with

agentcad init --runtime cadquery, or pass --runtime cadquery.

  • CadQuery helper paths operate on TopoDS_Shape. Bridge with .val().wrapped:

``python import cadquery as cq part = cq.Workplane('XY').box(10, 20, 5).val().wrapped moved = translate(part, 50, 0, 0) ``

  • To show helper output:

``python import cadquery as cq show_object(cq.Workplane('XY').newObject([cq.Shape.cast(topo_shape)])) ``

  • For OCP internals (gp_Pnt, BRepPrimAPI, etc.), import manually.

Key commands

| Command | Purpose | |---------|---------| | agentcad init --name NAME | Initialize project | | agentcad run SCRIPT --output LABEL | Execute script, produce STEP + metrics | | agentcad run ... --dry-run | Metrics only, no version consumed | | agentcad run ... --no-preview | Suppress preview (on by default) | | agentcad run ... --render iso,front | PNG views | | agentcad run ... --export stl,glb | Mesh export | | agentcad run ... --params k=v,k=v | Override script parameters | | agentcad render STEP --view SPEC | Post-hoc renders with camera control | | agentcad export STEP --format stl,glb | Post-hoc mesh export | | agentcad measure STEP | Dimensional report (overall metrics + feature sizes) | | agentcad check-spec STEP spec.json | Pass/fail checklist against intended cylindrical features | | agentcad inspect STEP | Topology report (validity, free edges) | | agentcad parts list REF | List parts captured for a version | | agentcad parts show REF ID | Show one versioned part by stable id | | agentcad diff REF1 REF2 | Compare versions | | agentcad context | Project state | | agentcad docs [SECTION] | Deep-dive docs (17 sections) | | agentcad view FILE | Run this after every successful build — opens GLB/STEP in the user's browser |

Debugging playbook

  1. Check metrics firstvolume and dimensions catch most issues.
  2. Read preview.png — the 4-view composite. Fastest way to spot obvious problems.
  3. Read diff.side_by_side if iterating — confirms your change did what you intended.
  4. Negative volume? Wire winding is backwards (CW instead of CCW).
  5. Need a hole diameter or edge length? Run agentcad measure output.step.
  6. Need to verify explicit hole/bore counts? Write spec.json, then run

agentcad check-spec output.step spec.json.

  1. is_valid: false? Run agentcad inspect — check free_edge_count and shell status.
  2. Hollow shape? free_edge_count > 0 means open shell.
  3. Complex profiles (gears, splines)? Use subtractive construction — cut from

a blank cylinder/box instead of building up. See agentcad docs patterns.

Patterns

  • Build at origin, then position: Create geometry at origin, use translate()

and rotate() to place it.

  • Compound vs Union: makeCompound() for assemblies (parts stay separate),

.union() for boolean fuse into one solid.

  • Parametric scripts: Top-level variable assignments become overridable via

--params. Use this for iteration.

  • Named parts: `showobject(shape, id="wheelleft", name="Left wheel",

options={"color": "red"})` for stable part handles, per-part metrics, and colored GLB export.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.