Agent-ready CAD skills and Python utilities for DWG/DXF conversion, quick summaries, focused inspection, and readable previews.
한국어 | English
Quickstart | Skills | Commands | Examples | Workflow
CAD files are rarely just pictures. A single drawing can contain nested blocks, layers, dimensions, labels, attributes, construction geometry, and huge coordinate spaces. CAD Plugins gives agents a practical CAD workflow:
- Preserve original DWG/DXF inputs.
- Normalize DWG to canonical DXF when needed.
- Parse CAD structure into annotation-aware JSON.
- Render purpose-specific previews instead of one overloaded screenshot.
- Inspect by layer, block, text, entity type, keyword, or coordinate region.
| Area | Path | Purpose |
|---|---|---|
| Conversion | skills/cad-convert |
Normalize DWG/DXF inputs into canonical DXF and validate results. |
| Quicklook | skills/cad-quicklook |
Produce concise first-pass summaries for non-CAD specialists. |
| Rendering | skills/cad-render |
Generate readable PNG/SVG/HTML previews from CAD analysis JSON. |
| Inspection | skills/cad-inspect |
Extract focused answers about layers, labels, blocks, entities, and regions. |
| Python utilities | cad_parser/ |
Shared conversion, parsing, modeling, and visualization code used by the skills. |
git clone https://github.com/GirinMan/cad-plugins.git
cd cad-plugins
python3 --version # must be Python 3.10+
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -r requirements.txt
python -m unittest discover -vIf macOS python3 points to Python 3.9, use a newer interpreter such as python3.13 -m venv .venv.
Windows PowerShell:
git clone https://github.com/GirinMan/cad-plugins.git
cd cad-plugins
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -U pip
python -m pip install -r requirements.txt
python -m unittest discover -vAny Python 3.10+ interpreter is fine on Windows; py -3.11 is just a concrete example.
Codex local skill install:
mkdir -p ~/.codex/skills
cp -R skills/cad-* ~/.codex/skills/Claude-compatible local skill copy:
mkdir -p ~/.claude/skills
cp -R skills/cad-* ~/.claude/skills/Windows PowerShell:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex\skills"
Copy-Item -Recurse -Force .\skills\cad-* "$env:USERPROFILE\.codex\skills\"
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\skills"
Copy-Item -Recurse -Force .\skills\cad-* "$env:USERPROFILE\.claude\skills\"The plugin manifest lives at .codex-plugin/plugin.json and points to ./skills/.
DXF files can be parsed directly with Python. DWG conversion needs a local converter.
Recommended DWG converter:
- ODA File Converter for macOS and Windows.
- LibreDWG
dwgreadas an open-source fallback when available, with per-file validation.
macOS ODA path example:
export CAD_PARSER_ODA_PATH="/Applications/ODAFileConverter.app/Contents/MacOS/ODAFileConverter"
python -m cad_parser.convert --checkWindows ODA path example:
$env:CAD_PARSER_ODA_PATH = "C:\Program Files\ODA\ODAFileConverter\ODAFileConverter.exe"
python -m cad_parser.convert --checkIf you need the Windows installer itself, use the ODA File Converter MSI and install it first:
https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_vc16_amd64dll_27.1.msi Persist it for future Windows shells if desired:
[Environment]::SetEnvironmentVariable(
"CAD_PARSER_ODA_PATH",
"C:\Program Files\ODA\ODAFileConverter\ODAFileConverter.exe",
"User"
)Check converter availability:
python -m cad_parser.convert --checkConvert one DWG to canonical DXF:
python -m cad_parser.convert input.dwg \
--out data/intermediate/input.dxf \
--manifest data/processed/input_conversion_manifest.jsonAnalyze DXF or DWG into JSON and PNG:
python -m cad_parser.cli input.dxf \
--out data/processed/input_analysis.json \
--png-out data/processed/input_preview.png \
--png-width 2400 \
--png-height 1800 \
--png-clip-percentile 0.01Render again from an existing JSON analysis:
python -m cad_parser.visualize data/processed/input_analysis.json \
--png-out data/processed/input_linework.png \
--width 2400 \
--height 1800 \
--clip-percentile 0.01This sample behaves like a map-style DXF: layer-centered geometry with meaningful labels. A quicklook/render pass produces a readable clipped preview suitable for orientation before deeper label inspection.
This DWG is normalized to DXF first, then rendered as CAD-derived previews. The useful view is not a single full screenshot: clipped linework and block-aware previews make the dense plan easier to inspect.
Block-aware preview:
- Start with
cad-convertfor every DWG/DXF input so downstream steps use canonical DXF. - Use
cad-quicklookwhen the user asks "what is this file?" or needs a short summary. - Use
cad-renderwhen the user needs to see the drawing, but pick a purpose-specific view. - Use
cad-inspectonly after the target is specific: keyword, layer, block, coordinate area, or facility label.
Do not commit customer CAD originals, huge normalized JSON reports, or generated intermediate DXF files by default. Put reusable public examples under assets/examples/ after confirming they are safe to share.
Before publishing changes, run:
python -m json.tool .codex-plugin/plugin.json >/dev/null
python -m unittest discover -v
python ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/cad-convert
python ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/cad-quicklook
python ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/cad-render
python ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/cad-inspect


