GcadClaw for Openclaw

An AI agent skill for automated 2D GstarCAD drawing generation, modification, and feedback loop verification using Python.

gstarcad
v1.0.0
Jun 3, 2026
0
757
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install gcadclaw

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install gcadclaw using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is GcadClaw?

GcadClaw is a powerful automation skill designed for AI agents to interact with GstarCAD on Windows environments. By leveraging the pygcadwin library, this skill translates natural language instructions into precise 2D DWG drawings, making it an essential addition to the repository of Openclaw Skills.

Whether you need to design mechanical parts, layout electrical outlines, or update architectural annotations, GcadClaw handles coordinate calculations, layer management, and entity validation programmatically. By integrating tightly with GstarCAD via COM, the skill ensures that AI-generated drawings are fully operational, compliant with drafting standards, and validated through real-time feedback loops.

GcadClaw Use Cases

  • Automated Mechanical Part Design: Create standard orthographic views (top, front, side) of parts like small plastic enclosures or bracket assemblies with precise dimensions.
  • Natural Language CAD Editing: Instruct an AI agent to add, modify, or repair layers, dimensions, and annotations within an existing DWG file.
  • CAD Drawing Verification: Automatically audit DWG drawings by capturing before-and-after entity states and outputting visual verification artifacts.
  • Standardized Clearance Modeling: Generate standardized M3, M4, and M5 clearance holes and cosmetic fillets dynamically based on natural language prompts.

How GcadClaw Works

  1. Brief Definition: The agent captures project parameters (dimensions, tolerances, and layers) and writes a comprehensive brief.md definition.
  2. Pre-State Capture: It analyzes the current DWG space (if active) and logs existing entities to before_entities.json using pygcadwin API enumeration.
  3. Execution Scripting: The skill maps commands into python execution steps, choosing structured pygcadwin APIs over raw command-line CAD commands.
  4. Drawing & Annotation: It executes geometric construction (points, polylines, circles, text, hatches, and dimensions) directly in the GstarCAD model or paper space.
  5. Post-State Audit: The agent records the modified entity list in after_entities.json and compares standard indicators (layer structures, colors, object counts).
  6. Visual Validation: A zoom-extents command runs, followed by a viewport snapshot to save a high-resolution PNG, ensuring the output is visually correct and non-blank.

GcadClaw Setup

To run this skill successfully, ensure you are on a Windows platform with GstarCAD installed and registered as a COM server. GcadClaw installs dependencies directly from PyPI. This is a highlighted workflow among Openclaw Skills for CAD pipeline management.

First, validate your current Python environment:

python scripts/validate_env.py

If validation fails, install the pygcadwin package and its dependencies via the environment setup script:

python scripts/setup_python_env.py

Re-verify the installation to confirm readiness:

python scripts/validate_env.py

GcadClaw Data Schema & Taxonomy

GcadClaw enforces a rigorous data schema to verify CAD operations. Every execution creates and modifies specific feedback artifacts:

Generated Artifact Taxonomy

File Name Format Purpose
brief.md Markdown Logs user intent, dimensions, units, layers, and validation targets.
actions.jsonl JSON Lines Records the precise sequence of pygcadwin drawing commands executed.
before_entities.json JSON A complete dump of CAD entities present prior to executing the edits.
after_entities.json JSON A dump of CAD entities present after the drawing updates have finished.
review.png PNG A viewport screenshot confirming the output is valid and not blank.
feedback.md / feedback.json MD / JSON Summarizes executed steps, visual confirmations, and any repair loop logs.
*.dwg DWG Binary The final saved GstarCAD drawing file ready for CAD engineering.

GcadClaw Advanced Features

  • Closed-Loop Repair System: Automatically detects failing COM operations or missing geometry, initiating a targeted code fix and rerunning validations.
  • Strict Entity Audit: Compares entity handles, layer states, linetypes, and scale factors before and after generation to prevent invisible errors.
  • Intelligent Defaulting Engine: Automatically applies engineering standards (e.g., M3/M4/M5 clearances, 2-3mm plastic enclosure walls) when details are omitted.
  • Robust Multi-View Orthographics: Handles complex multi-view generation, layers arrangement, and annotations as one of the most advanced CAD-focused Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*