autocad-automation

autocad-automation is a skill for Claude Code, Codex from wzyn20051216/solidworks-automation-skill. It costs 151 tokens per session (3,986 once invoked), scanned A, original, MIT.

An automation skill for AutoCAD, a computer-aided design program commonly used for 2D technical drawings. It works with drawing formats such as DWG and DXF and can use Windows automation or other supported scripting routes.

In plain words
What is it for?
Use it to inspect drawings, work with supported layers, text, entities, blocks, exports, previews, and checks, or to write AutoLISP, script, or AutoCAD .NET code.
Why use it?
It avoids relying on improvised commands and makes the limits of direct AutoCAD control explicit, especially where native DWG editing is not verified.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to inspect drawings, work with supported layers, text, entities, blocks, exports, previews, and checks, or to write AutoLISP, script, or AutoCAD .NET code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wzyn20051216/solidworks-automation-skill/autocad-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wzyn20051216/solidworks-automation-skill --skill autocad-automation
Clone the repo
git clone --depth 1 https://github.com/wzyn20051216/solidworks-automation-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for autocad-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/wzyn20051216/solidworks-automation-skill/autocad-automation/github.svg)](https://agentmods.dev/skills/wzyn20051216/solidworks-automation-skill/autocad-automation)
Your own site
<a href="https://agentmods.dev/skills/wzyn20051216/solidworks-automation-skill/autocad-automation"><img src="https://agentmods.dev/badge/skills/wzyn20051216/solidworks-automation-skill/autocad-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for autocad-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/wzyn20051216/solidworks-automation-skill/autocad-automation"><img src="https://agentmods.dev/badge/skills/wzyn20051216/solidworks-automation-skill/autocad-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.03986
Opus 5 $0.00076 $0.01993
Sonnet 5 $0.00030 $0.00797
Haiku 4.5 $0.00015 $0.00399

Measured 13d ago against content hash 9ae911c71a31, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

autocad-automation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (examples/draw_mounting_plate.py, scripts/acad_dotnet_preflight.py, scripts/acad_dotnet_regression.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

subskills/autocad-automation/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AutoCAD 自动化技能

本目录作为 solidworks-automation-skill 的 AutoCAD/DWG 子技能使用。父技能负责 SolidWorks 建模、装配、工程图和三维导出;本子技能负责 AutoCAD 二维 DWG/DXF 绘制、批量改图、线稿矢量化、出图预览和图纸自检。涉及 SolidWorks 原生零件/装配体建模时回到父技能,涉及 AutoCAD 图纸或 DWG/DXF 时读取本子技能。

目标

让代理在本机 Windows 桌面环境中可靠控制 AutoCAD,而不是每次凭记忆临时拼命令。默认路线是 Python + COM/ActiveX,但原生写入必须先通过 capabilities.yaml 门禁和本机真机回归;当前 AutoCAD 2024 的 Documents/Layers/SelectionSets 动态代理不稳定,因此 COM 原生 DWG 绘图按 not_implemented 处理。DXF 无头读取、预览和结构审查可直接使用。AutoCAD 2024 .NET 白名单后端已连续通过真实 DWG 保存重开、PDF/PNG 和实体/图层/尺寸回归,运行时证据完整时为 verified;只允许固定命令,不得推广成任意代码执行。

适用场景

使用本技能处理:

  • 新建或修改 DWG/DXF 图纸,绘制线、圆、圆弧、多段线、矩形、文字、块、图层和简单标注。
  • 批量打开 DWG,检查图层、实体数量、文字、块参照、外部参照或输出文件。
  • 让 Codex 直接连接本机 AutoCAD、保存 DWG、导出 DXF/PDF,并生成复核报告。
  • 编写 AutoLISP、.scr 命令脚本或 C# AutoCAD .NET 插件。
  • 需要查 Autodesk 官方 API、ADN/GitHub 示例、ObjectARX SDK 或 APS Design Automation 模式。

不要把本技能用于纯渲染效果图、BIM/Revit 模型、机械 STEP-first 建模、CAM 刀路或工程认证结论;这些需求优先转给相应 CAD、BIM、仿真或制造流程。

默认假设

  • 操作系统:Windows。
  • AutoCAD:用户本机已安装,最好已手动启动一次完成 COM 注册。
  • 自动化入口:AutoCAD.Application COM ProgID。
  • 可视化默认:新建绘图任务默认先显示并激活 AutoCAD,再逐步落图元;只有批处理或用户明确要求提速时才关闭。
  • 绘图单位:默认按毫米理解;AutoCAD 数据库本身是无单位数值,必须在图纸说明中记录单位。
  • 空间:几何默认进入 ModelSpace;版面、标题栏和打印配置单独处理。
  • 坐标:默认 WCS,二维对象使用 Z=0
  • 输出:优先保存 DWG,同时按用户需求导出 DXF/PDF;所有输出路径使用绝对路径。
  • 文件安全:修改既有 DWG 前先另存副本,除非用户明确允许覆盖。

缺少版本、单位、图纸标准、输出路径或是否允许覆盖时,先做一次简短确认。简单草图可以直接假设毫米、ModelSpace、新建 DWG,并在结果中说明。

入口自检

执行 AutoCAD 自动化前先运行:

python subskills\autocad-automation\scripts\acad_preflight.py

如果用户允许自动启动 AutoCAD:

python subskills\autocad-automation\scripts\acad_preflight.py --launch

自检失败时:

  • pywin32:提示用户安装 python -m pip install pywin32,得到明确同意后再安装。
  • 找不到 AutoCAD COM:提示用户安装 AutoCAD、启动一次 AutoCAD,或确认安装的是 LT/受限环境。
  • AutoCAD 已运行但无活动文档:可以新建文档,不要误判为连接失败。

核心工作流

  1. 分类任务:判断是新建图纸、修改既有 DWG、批处理、出图导出、API 开发、插件开发还是故障排查。
  2. 确认关键约束:单位、版本、目标文件、输出格式、是否允许覆盖、图层/线型/标注标准、是否需要按企业模板绘图。
  3. 运行自检:先用 acad_preflight.py 确认 Python COM 和 AutoCAD 状态。
  4. 查证 API:未封装 API 必须先读 references/api-lookup.md,再查 Autodesk 官方文档或可信 GitHub 示例;不要猜长参数、枚举值和命令行为。
  5. 制定绘图计划:写明图层、坐标基准、对象清单、尺寸、文本、输出路径和复核点。
  6. 先把软件拉起来:连接或启动 AutoCAD,确保窗口可见并尽量切到前台,再开始落图。
  7. 优先复用脚本:简单几何用 scripts/acad_draw.py 的 JSON 输入;复杂逻辑用 scripts/acad_session.py 组合 COM 调用。
  8. 串行执行 COM:AutoCAD 桌面 COM 操作不要并行;一个脚本连接、逐步绘制、保存、复核后退出。
  9. 保存和导出:保存 DWG/DXF/PDF 前确保目录存在;修改原图时保留备份或另存。
  10. 复核结果:运行 scripts/acad_review.py 统计实体、图层、包围盒和目标文件;再运行 scripts/acad_preview.py 导出 AutoCAD 原生 BMP/PNG 预览,并用图片查看工具做视觉审查。窗口截图可作为补充,但若被其它窗口遮挡,不可作为通过依据。 若输入是 DXF 且只需无头只读检查,可先运行 scripts/acad_headless.py;它不支持 DWG 写入,最终 DWG/PDF 仍须走 AutoCAD COM。
  11. 沉淀经验:遇到新坑、命令差异、版本限制或稳定封装,补进 references/troubleshooting.md 或脚本。

Read the full file on GitHub · 200 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 200 lines · 151 tokens per session scan A 9ae911c71a31

Subscribe to this mod's changes

autocad-automation is a skill published in the GitHub repository wzyn20051216/solidworks-automation-skill (890 stars, last pushed 5d ago), licensed MIT. It adds 151 tokens to every session and 3,986 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

autocad-agent

Automate AutoCAD drafting and CAD workflows through doc-driven execution: discover installed AutoCAD/Core Console/API access, retrieve official/local command and API documentation, generate AutoLISP, scripts, .NET guidance, DXF transformations, or command sequences, validate drawings, diagnose blockers, and search…

walterkken/doc-driven-engineering-software-skills · 111 tokens

solidworks-agent

Automate SOLIDWORKS modeling, assembly, drawing, and export workflows through doc-driven execution: discover installed SOLIDWORKS/API access, retrieve official/local API documentation, generate VBA/API macro or COM automation guidance, diagnose blockers, and search trusted SOLIDWORKS forums when needed. Use when Codex…

walterkken/doc-driven-engineering-software-skills · 107 tokens

ifoxcad

Use when developing AutoCAD plugins with .NET/C# — entity creation, layer management, block references, transaction handling. iFoxCAD: AutoCAD .NET secondary development framework with simplified API wrappers.

znlgis/opengis-skills · 44 tokens

lightningcad

Use when doing architectural facade panel layout and detailing in AutoCAD or ZWCAD — panel numbering, shop drawing generation, material optimization. LightningCAD: building envelope detailing plugin for AutoCAD/ZWCAD.

znlgis/opengis-skills · 45 tokens

tongwen

Use when translating engineering CAD drawings between languages — DWG text extraction, translation workspace with terminology management, quality-checked write-back. TongWen (同文): local-first CAD/BIM lossless translation suite for AutoCAD 2019-2026.

znlgis/opengis-skills · 55 tokens

qcad

Use when editing DXF files with a professional open-source 2D CAD application — CAM output, part libraries, isometric projection. QCAD: open-source 2D CAD with DXF as native format, scriptable via ECMAScript.

znlgis/opengis-skills · 53 tokens