← 返回 Skills 市场
dolphindz

Gcadclaw

作者 Boxi · GitHub ↗ · v1.0.0 · MIT-0
win32 ✓ 安全检测通过
46
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gcadclaw
功能描述
通过 pygcadwin 实现 GstarCAD 二维图纸的自然语言生成、修改、校验与修复。支持机械零件、装配体、工程图纸的 DWG 自动化输出,包含截图反馈和实体验证。
使用说明 (SKILL.md)

\r \r

GcadClaw\r

\r

Note on naming. gcadclaw is the external, marketplace-style skill\r bundle (Windows setup-wizard payload, agents/openai.yaml persona) and is\r configured to install pygcadwin directly from PyPI. It is distinct from the in-app\r cadclaw agent in data/graphs/agents_config.json, which is an llm_tool\r agent driven by the gcad-coder-general and gcad-design2d-general skills. Both can coexist.\r \r

Purpose\r

\r Create or modify 2D GstarCAD drawings from natural-language requirements using the pygcadwin PyPI package, then prove the result with structured feedback artifacts.\r \r

Defaults\r

\r Use these defaults unless the user specifies otherwise. Do not ask for clarification just because the user omitted units, "2D", output format, base plane, origin, or common drafting conventions.\r \r

  • Task type: a 2D GstarCAD DWG drawing generated through pygcadwin.\r
  • Units: millimeters.\r
  • CAD target: live GstarCAD through pygcadwin.Gcad.\r
  • Output: .dwg plus feedback artifacts.\r
  • Base drawing plane: XY model space unless the user requests paper-space layout.\r
  • Up/elevation axis: positive Z for side, front, section, and elevation references.\r
  • Origin: center of the main part or assembly unless a mating interface, pivot, fixed root component, or datum feature suggests a better origin.\r
  • View selection: for ordinary part designs, default to a standard three-view orthographic drawing: top/plan, front/elevation, and right-side view. Replace one side view with a section/detail view only when it communicates the design better. For assemblies, include the top/plan arrangement plus front/side/section views needed to show stack-up, pivots, travel, or mating relationships.\r
  • Geometry representation: closed 2D outlines for visible profiles; centerlines for axes, bolt circles, symmetry, and rotation; hidden/dashed lines only when useful; hatches for cut material in sections.\r
  • Layers: create named layers for outline/body, cut/hole, centerline, hidden, dimensions, text/notes, construction, and optional part-specific layers.\r
  • Dimensions and notes: include critical overall sizes, hole diameters, spacing, bolt circles, thickness/height notes, fillet/chamfer notes, view labels, section/detail labels, part labels, and assumptions.\r
  • Assembly structure: fixed root part or datum, named part outlines/layers, explicit generated placements, pivot axes, mating holes, travel arcs, and labels for separate moving parts.\r
  • Small plastic enclosure wall: 2.0-3.0 mm when unspecified.\r
  • Cosmetic fillet: 1.0-3.0 mm when safe for local geometry.\r
  • M3/M4/M5 normal clearance holes: 3.4/4.5/5.5 mm unless another standard is requested.\r
  • Feedback: mandatory before/after entity evidence plus at least one PNG screenshot.\r \r Ask one focused clarification only when the drawing is impossible, fit-critical, safety-critical, compliance-bound, or lacks any usable dimensions. Otherwise proceed with explicit assumptions and record them in the brief.\r \r

Required Workflow\r

\r

  1. Write a brief. Record intent, dimensions, units, assumptions, layers, expected entities, annotations/dimensions, output paths, and validation targets in brief.md.\r
  2. Capture before state. Use scripts/capture_feedback.py or equivalent pygcadwin enumeration to write before_entities.json.\r
  3. Plan actions. Prefer a Python script or pygcadwin.run_actions() sequence that uses typed APIs: ensure_layer, create_segment, create_circle, create_arc, create_polyline, create_rect, create_text, create_dimension, create_hatch, create_table, zoom_extents, save_as, and snapshot.\r
  4. Execute drawing edits. Use pygcadwin.Gcad(create_if_missing=True, visible=True) and cad.context; keep calculations explicit and named before creating geometry.\r
  5. Capture after state. Write after_entities.json and compare entity counts, layers, object names, handles, colors, linetypes, and lineweights against the brief.\r
  6. Capture screenshot. Call ctx.zoom_extents() or a scoped view operation, then ctx.view.snapshot().save(\x3Cpng>) or the snapshot tool. Verify that the PNG is nonblank. Do not mark a drawing-modifying task complete without a nonblank PNG screenshot.\r
  7. Repair if needed. If validation or screenshot capture fails, classify the issue, make the smallest responsible change, rerun the failed check, and update feedback.\r
  8. Report final feedback. Write feedback.md or feedback.json with files, checks run, screenshot path, repair attempts, assumptions, and remaining caveats.\r \r

Non-Negotiables\r

\r

  • Do not claim success from code generation alone.\r
  • Do not skip screenshots for drawing-modifying tasks.\r
  • Do not accept all-black/all-white screenshots as successful evidence.\r
  • Do not use raw CAD commands when a typed pygcadwin API exists.\r
  • Do not invent unavailable pygcadwin API names; inspect the installed package or PyPI project docs when uncertain.\r
  • Do not report validation that was not actually run.\r \r

Feedback Artifacts\r

\r Every completed drawing workflow must persist:\r \r

  • brief.md\r
  • actions.jsonl\r
  • before_entities.json\r
  • after_entities.json\r
  • review.png or a more specific PNG screenshot name\r
  • feedback.md or feedback.json\r
  • final .dwg path when save succeeds\r \r Read references/feedback-loop.md before implementing or repairing a feedback-producing workflow. Read references/2d-pygcadwin-workflow.md when translating prose into pygcadwin drawing code.\r \r

External Prerequisites\r

\r Live drawing, DWG save, and screenshot workflows require Windows with GstarCAD installed and registered as a COM server. Install pygcadwin from PyPI with python scripts/setup_python_env.py; the PyPI package declares its Windows automation dependencies.\r \r

Repair Loop\r

\r When a check fails:\r \r

  1. Read the failing output or screenshot capture error.\r
  2. Classify it as source error, COM connection error, missing geometry, wrong layer/style, wrong scale, missing dimension/annotation, screenshot failure, or save failure.\r
  3. Change the smallest responsible source/action.\r
  4. Rerun the failed command and dependent validation.\r
  5. Update feedback.md with the failed attempt and final state.\r \r If screenshot capture fails after one repair attempt, report partial completion and keep entity evidence, action logs, and DWG output available. Do not call the workflow fully successful.\r \r \x3C!-- BEGIN AUTO-GENERATED PYTHON PACKAGE SETUP -->\r \r

Python package setup\r

\r This Skill installs pygcadwin directly from PyPI:\r \r

https://pypi.org/project/pygcadwin/\r
```\r
\r
When this Skill is used in a fresh Python environment:\r
\r
1. Validate the import:\r
\r
   ```bash\r
   python scripts/validate_env.py\r
   ```\r
\r
2. If validation fails, install the PyPI package:\r
\r
   ```bash\r
   python scripts/setup_python_env.py\r
   ```\r
\r
3. Validate again:\r
\r
   ```bash\r
   python scripts/validate_env.py\r
   ```\r
\r
The expected import is `pygcadwin`. The skill does not bundle a local wheel for this package.\r
\r
\x3C!-- END AUTO-GENERATED PYTHON PACKAGE SETUP -->\r
安全使用建议
Install only in a Windows environment where you intend to let the agent control GstarCAD. Use a dedicated project/output folder, avoid opening confidential or irreplaceable drawings unless backed up, and review generated screenshots, JSON entity exports, and DWG files before sharing them because they may contain sensitive design information.
能力评估
Purpose & Capability
The requested capabilities align with the stated purpose: generating, modifying, saving, validating, and screenshotting 2D GstarCAD DWG drawings through pygcadwin.
Instruction Scope
The workflow explicitly requires local brief, action log, before/after entity JSON, screenshot, feedback, and DWG outputs; users should understand these may contain sensitive CAD details.
Install Mechanism
Installation is disclosed and limited to validating/importing Python and installing the pygcadwin package from PyPI; no hidden installer, credential use, or persistence mechanism was found.
Credentials
Windows, Python, filesystem, and GstarCAD COM access are proportionate for CAD automation, though the manifest includes broad exec access rather than a narrower command wrapper.
Persistence & Privilege
Persistence is limited to generated local artifacts and saved DWG files; there is no autorun, background worker, privilege escalation, or credential/session handling, but output paths and retention are left to the workflow/user.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gcadclaw
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gcadclaw 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of gcadclaw skill for natural language-driven GstarCAD 2D drawing automation. - Enables natural language creation, modification, validation, and repair of GstarCAD DWG files via the pygcadwin package. - Supports mechanical part, assembly, and engineering drawing generation, including mandatory before/after feedback and PNG screenshot evidence. - Defines strict defaults for units, drawing conventions, layers, and feedback artifacts to standardize output. - Details a required workflow with explicit steps for brief creation, geometry planning, drawing edits, validation, and automated repair. - Enforces non-negotiable requirements for validation, typed API usage, and feedback artifact output. - Runs on Windows with live GstarCAD via pygcadwin, installed directly from PyPI.
元数据
Slug gcadclaw
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Gcadclaw 是什么?

通过 pygcadwin 实现 GstarCAD 二维图纸的自然语言生成、修改、校验与修复。支持机械零件、装配体、工程图纸的 DWG 自动化输出,包含截图反馈和实体验证。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 46 次。

如何安装 Gcadclaw?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gcadclaw」即可一键安装,无需额外配置。

Gcadclaw 是免费的吗?

是的,Gcadclaw 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Gcadclaw 支持哪些平台?

Gcadclaw 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(win32)。

谁开发了 Gcadclaw?

由 Boxi(@dolphindz)开发并维护,当前版本 v1.0.0。

💬 留言讨论