Agentcad计算机辅助设计(CAD)
v0.1.5用于AI代理的工具。当用户要求设计、建模或创建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 — 人工智能代理的CAD工具 - 命令行工具,用于执行CadQuery脚本,生成STEP文件、PNG渲染、网格导出(STL/GLB/OBJ)和几何度量。 - 设计用于执行用户请求的3D建模任务;所有核心CadQuery和辅助函数都预先注入。 - 需要Python 3.10-3.12和agentcad安装。 - 核心工作流:脚本编写、dry-run验证、实际运行输出、检查和版本比较。 - 提供调试指导和脚本编写规则,以确保可靠性和灵活性。 - 包括一套全面的命令,用于项目设置、执行、渲染、导出、检查和文档访问。
● 无害
安装命令
点击复制官方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 # 请阅读 —— 它是您的完整操作说明
` 核心工作流程
编写脚本。 无需导入 ——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 标签 --preview --render iso
`
检查无效的几何。 如果is_valid:false或几何看起来不正确:
bash
agentcad inspect v1_label/output.step
`
迭代。 修复脚本,并使用新标签运行。使用agentcad diff 1 2比较版本。
脚本编写规则
show_object(result)是必需的 —— 至少需要一个调用。这些是预先注入的(无需导入):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等),请手动导入。
主要命令
| 命令 | 目的 |
|---------|---------|
| agentcad init --name 名称 | 初始化项目 |
| agentcad run 脚本 --output 标签 | 执行脚本,生成 STEP + 指标 |
| agentcad run ... --dry-run | 仅指标,无版本消耗 |
| agentcad run ... --preview | 快速 256x256 iso PNG |
| agentcad run ... --render iso,front | PNG 视图 |
| agentcad run ... --export stl,glb | 网格导出 |
| agentcad run ... --params k=v,k=v | 覆盖脚本参数 |
| agentcad render STEP --view 视图 | 后期渲染,具有摄像头控制 |
| agentcad export STEP --format stl,glb | 后期网格导出 |
| agentcad inspect STEP | 拓扑报告(有效性、自由边缘) |
| agentcad diff REF1 REF2 | 比较版本 |
| agentcad context | 项目状态 |
| agentcad docs [部分] | 深入文档(16 部分) |
| agentcad view 文件 | 在浏览器中打开 GLB/STEP | 调试游戏规则
先检查指标 ——volume和dimensions可以捕获大多数问题。- 负体积? 线圈绕线方向错误(顺时针而不是逆时针)。
is_valid:false? 运行agentcad inspect—— 检查free_edge_count和壳体状态。空心形状?free_edge_count > 0表示开壳。复杂的轮廓(齿轮、样条)? 使用减法构造 —— 从空心圆柱体/盒子中减去,而不是构建。请参阅agentcad docs patterns。
模式
在原点构建,然后定位: 在原点创建几何体,使用translate()和rotate()将其放置。复合体与联合体:makeCompound()用于组装(保持部件分离),.union()用于布尔融合成一个实体。参数化脚本: 顶级变量赋值可通过--params覆盖。使用此方法进行迭代。命名部件:show_object(shape, name="wheel", options={"color": "red"})` 用于每个部件的指标和彩色 GLB 导出。