📦 AgentcadCAD
v0.1.5AI agent 工具。当用户要求设计、建模或构建 3D 对象时使用。agentcad 执行 CadQuery Python 脚本并生成 STEP 文件,...
1· 20·0 当前·0 累计
下载技能包
最后更新
2026/4/21
安全扫描
OpenClaw
安全
medium confidence该技能的要求和指令与 CLI CAD 工具一致:它依赖 agentcad CLI 和 Python,运行时步骤仅限于通过该 CLI 运行 CadQuery 脚本——但由于会执行用户提供的 Python 脚本,使用前请验证 agentcad 二进制文件的来源与沙箱隔离情况。
评估建议
This skill appears internally consistent for running CadQuery scripts via an `agentcad` CLI, but it relies on executing arbitrary Python code. Before installing or granting the agent access: (1) verify the provenance of the `agentcad` package/binary (PyPI project page, source repo, release checksums); (2) run it in an isolated environment (container or VM) or with OS-level sandboxing to prevent unintended file/network access; (3) avoid running untrusted scripts or review scripts before execution...详细分析 ▾
✓ 用途与能力
The name/description (CAD tool running CadQuery scripts) matches the declared requirements: it requires the agentcad CLI and Python 3.10–3.12. Nothing requested (no unrelated credentials, no odd binaries) appears out of scope for a CAD CLI.
ℹ 指令范围
SKILL.md tells the agent to run user-provided Python/CadQuery scripts via `agentcad run` and to inspect produced STEP/GLB/PNG outputs. This is coherent for a CAD tool, but executing arbitrary scripts can access filesystem, network, or other system resources depending on how the agentcad runtime runs them — the skill does not describe sandboxing or limits.
ℹ 安装机制
This is an instruction-only skill with no install spec; SKILL.md suggests `pip install agentcad` but provides no source or pinned release. Lack of an explicit, verifiable install source means you should confirm the package origin (PyPI project, GitHub repo, checksums) before installing.
✓ 凭证需求
No environment variables, credentials, or config paths are requested. The minimal requirement set (agentcad binary and a Python interpreter) is proportional to the stated purpose.
✓ 持久化与权限
The skill is user-invocable and not always-on; it does not request persistent privileges or modify other skills/configs. Autonomous invocation is enabled by default but not unusually privileged here.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv0.1.52026/4/21
agentcad v0.1.5 — 面向 AI 代理的 CAD 工具 - 执行 CadQuery 脚本的 CLI 工具,可生成 STEP 文件、PNG 渲染图、网格导出(STL/GLB/OBJ)及几何指标。 - 专为用户的 3D 建模需求设计;所有核心 CadQuery 及辅助函数已预注入。 - 依赖 Python 3.10-3.12 与已安装的 agentcad。 - 核心流程:脚本编写 → 预演验证 → 正式运行 → 结果检查 → 版本对比。 - 提供调试指引与脚本编写规范,确保可靠与灵活。 - 内置完整命令集,覆盖项目初始化、执行、渲染、导出、检查及文档访问。
● 无害
安装命令
点击复制官方npx clawhub@latest install agentcad
镜像加速npx clawhub@latest install agentcad --registry https://cn.longxiaskill.com
技能文档
你可以使用 agentcad,一个将 CadQuery Python 脚本转为 3D 几何的 CLI。所有输出为 JSON,每条命令均返回 "command" 与 "status" 键。
首次设置
``bash
agentcad init --name
agentcad --help # 必读——完整操作手册
` 核心流程
写脚本。 无需 import——cq、show_object及所有辅助函数已预注入。必须调用show_object(result)。- 先 dry-run,检查指标不消耗版本:
bash
agentcad run script.py --output test --dry-run
`
查看响应中的 volume、dimensions、is_valid。
- 正式运行,带预览/渲染:
`bash
agentcad run script.py --output label --preview --render iso
`
若无效则检查。 如果is_valid: false或几何异常:
bash
agentcad inspect v1_label/output.step
`
迭代。 修复脚本,用新--output标签运行。用agentcad diff 1 2比较版本。
脚本编写规则
必须调用show_object(result)—— 至少一次。以下已预注入(无需 import):cq、show_object、translate、rotate、mirror_fuse、loft_sections、tapered_sweep、naca_wire、bbox_point、place_at、assemble、ellipse_wire、spline_wire、polygon_wire、rounded_rect_wire、elliptical_sweep、involute_gear_profile辅助函数操作TopoDS_Shape,用.val().wrapped桥接:
python
part = cq.Workplane('XY').box(10, 20, 5).val().wrapped
moved = translate(part, 50, 0, 0)
`
- 显示辅助输出:
`python
show_object(cq.Workplane('XY').newObject([cq.Shape.cast(topo_shape)]))
`
使用 OCP 内部对象(gp_Pnt、BRepPrimAPI等)需手动 import。
关键命令
| 命令 | 用途 |
|------|------|
| agentcad init --name NAME | 初始化项目 |
| agentcad run SCRIPT --output LABEL | 执行脚本,生成 STEP + 指标 |
| agentcad run ... --dry-run | 仅指标,不消耗版本 |
| agentcad run ... --preview | 快速 256×256 iso PNG |
| agentcad run ... --render iso,front | 多视角 PNG |
| agentcad run ... --export stl,glb | 网格导出 |
| agentcad run ... --params k=v,k=v | 覆盖脚本参数 |
| agentcad render STEP --view SPEC | 事后渲染,可控相机 |
| agentcad export STEP --format stl,glb | 事后网格导出 |
| agentcad inspect STEP | 拓扑报告(有效性、自由边) |
| agentcad diff REF1 REF2 | 版本对比 |
| agentcad context | 项目状态 |
| agentcad docs [SECTION] | 深度文档(16 节) |
| agentcad view FILE | 浏览器打开 GLB/STEP | 调试手册
先看指标 ——volume与dimensions可发现多数问题。- 体积为负? 线 winding 反向(CW 而非 CCW)。
is_valid: false? 执行agentcad inspect—— 查看free_edge_count与壳体状态。空心?free_edge_count > 0表示开放壳。复杂轮廓(齿轮、样条)? 用减材构造——从圆柱/方块切除而非堆叠。见agentcad docs patterns。
常用模式
原点构建再定位: 于原点创建几何,再用translate()与rotate()放置。Compound vs Union: 装配用makeCompound()(零件保持分离),布尔融合用.union()合并为单一实体。参数化脚本: 顶层变量赋值可通过--params覆盖,便于迭代。命名零件:show_object(shape, name="wheel", options={"color": "red"})` 可导出带颜色 GLB 并输出单件指标。