Introduction¶
Engineering drawings, GIS base maps, and manufacturing schematics are often delivered in DWG format. Performing format conversion, querying layers, or searching for text within drawings within a script or conversation typically requires installing a separate CAD ecosystem or manually invoking native libraries. The following is an introduction to the DWG File Parsing Tool (@user_463e8e26/libredwg) on SkillHub: it encapsulates CLI capabilities based on LibreDWG (a GNU open-source C library) into an Agent Skill, allowing the model to select the appropriate tool according to instructions when requirements involving DWG, DXF, layer queries, etc., are mentioned.
What is this¶
The DWG File Parsing Tool is a DWG/AutoCAD file processing Skill designed for development scenarios. Its coordinates are @user_463e8e26/libredwg, the current version is 1.0.0, the source is community, the category is dev-programming, and the tag is requires_api_key=false (no API Key required).
The Skill introduction positions it as: A CLI toolset based on LibreDWG, covering DWG reading and writing, multi-format conversion, layer and text retrieval, thumbnail and metadata operations, and creating DWG files from scratch. It is published by SkillHub user user_463e8e26; the SkillHub page attributes the author as “Ren Zhun”.
Core Functions¶
The following capabilities are derived from the official Skill introduction, summarized by purpose.
Format Conversion & Read/Write¶
- Mutual conversion or export between DWG and formats such as DXF, JSON, GeoJSON, SVG, PS (Introduction describes this as DWG↔DXF/JSON/GeoJSON/SVG/PS).
- DWG reading, writing, rewriting, and filtering; keywords in the introduction include dwgread, dwg2dxf, dxf2dwg, dwgrewrite, dwgfilter.
Query & Retrieval¶
- Layer Query: dwglayers.
- Text Search: dwggrep.
- Extract DWG metadata and thumbnails (the introduction mentions thumbnail extraction; the tool name includes dwgbmp).
Creation & Vector Output¶
- Create DWG from scratch: dwgadd.
- Convert DWG to SVG, etc.: dwg2SVG.
Trigger Conditions (When the Agent enables it)¶
When the user needs to process DWG, convert CAD formats, query layers, search text within drawings, extract metadata, convert DWG to SVG/DXF/JSON, or create DWG, the Skill instructions will guide the selection of the aforementioned CLI tools. Common keywords include: DWG, AutoCAD, CAD, DXF, and the specific tool command names.
Installation & Activation¶
The Skill follows the SkillHub general SKILL.md format. The skillhub CLI must be available on the local machine before installation; if not, check or install it according to the official installation documentation first.
Check skillhub CLI¶
command -v skillhub && skillhub --version
If not installed, the SkillHub installation documentation provides two methods: full installation (CLI + default Skills) and CLI-only. For example:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Install this Skill¶
When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, it will default to ./skills/ and may not be recognized. The general form provided in the SkillHub documentation is as follows:
skillhub install user_463e8e26/libredwg --dir <skills directory>
Common client skills paths (excerpted from SkillHub installation documentation; choose one based on the client you are actually using):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
You can also send the following instructions to an AI to let it complete the installation according to the SkillHub Installation Documentation:
Please install `@user_463e8e26/libredwg` based on https://skillhub.cn/install/skillhub.md.
Typical Usage¶
The public page does not include specific shell examples; the actual workflow is: after installing the Skill in a client like Cursor, describe the drawing task in natural language, and the Agent will read the SKILL instructions and invoke the LibreDWG CLI tools. You can organize your prompts according to the table below (capability descriptions are from the official introduction):
| Requirement | Tools/Directions to mention |
|---|---|
| View or parse DWG structure | dwgread |
| DWG → DXF | dwg2dxf |
| DXF → DWG | dxf2dwg |
| List layers | dwglayers |
| Search text in drawing | dwggrep |
| DWG → SVG | dwg2SVG |
| Thumbnail/Bitmap related | dwgbmp |
| Create new or append entities | dwgadd |
| Rewrite or filter DWG | dwgrewrite, dwgfilter |
Example prompts (illustrative; specific parameters depend on the SKILL after installation):
- “Convert this DWG to DXF and list all layer names.”
- “Search for TEXT/MTEXT containing ‘Power Distribution Room’ in the drawing.”
- “Export an SVG preview and explain what metadata can be read from the file.”
Use Cases & Notes¶
Who it is for: Developers who need to process DWG in automation, CI, documentation pipelines, or conversational development, but do not want to open full AutoCAD for single tasks; categorized as dev-programming, focusing on programming and toolchain integration.
Dependencies & Boundaries: The underlying technology is the LibreDWG CLI. The support level for complex drawings, new version DWG features, or proprietary objects depends on LibreDWG itself; this Skill does not replace professional CAD review software. This Skill does not require an API Key.
Platform Data: SkillHub crawler information shows a rating of 100000 and 3885 downloads (page statistics may change over time; please refer to SkillHub for the latest data).
Conclusion¶
The DWG File Parsing Tool consolidates LibreDWG’s CLI capabilities for DWG reading/writing, format conversion, and layer/text retrieval into @user_463e8e26/libredwg, facilitating keyword-triggered usage within Agent conversations. For installation and directory configuration, see the SkillHub Installation Documentation; Skill Homepage: https://www.skillhub.cn/skills/user_463e8e26/libredwg, API Entry: https://api.skillhub.cn/user_463e8e26/libredwg.