design-drawing-svg-md

design-drawing-svg-md is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 109 tokens per session (8,047 once invoked), scanned A, original, MIT.

A method for turning vector PDF engineering drawings into linked Markdown notes and SVG geometry files. It is designed for drawings without a usable text layer, where labels are stored as shapes instead of readable text.

In plain words
What is it for?
It is for processing steel-structure shop drawings and similar vector engineering plans. The resulting records can support drawing search, controlled revisions, and downstream design tasks.
Why use it?
It gives an AI agent both the meaning of the drawing and its exact geometry. This helps with questions, redraws, quantity checks, bills of materials, and comparing drawing revisions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **许可证:** MIT——本技能为仓库自有方法技能,随仓库以 MIT 分发(见 [LICENSE](../../LICENSE))。.

Good fit It is for processing steel-structure shop drawings and similar vector engineering plans. The resulting records can support drawing search, controlled revisions, and downstream design tasks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills
agentmods
npx agentmods add skills/znlgis/opengis-skills/design-drawing-svg-md

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 design-drawing-svg-md

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/design-drawing-svg-md/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/design-drawing-svg-md)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/design-drawing-svg-md"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/design-drawing-svg-md/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 design-drawing-svg-md

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/design-drawing-svg-md"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/design-drawing-svg-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,047 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.00109 $0.08047
Opus 5.5 $0.00044 $0.03219
Sonnet 5.5 $0.00022 $0.01609
Haiku 4.5 $0.00011 $0.00805

Measured today against content hash 45c6f03f7403, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

design-drawing-svg-md 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 today.

The scan reads SKILL.md. This mod also ships 13 executable files (scripts/01_extract.py, scripts/02_cluster_views.py, scripts/03_render_regions.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.

cad/design-drawing-svg-md/SKILL.md · 351 lines

How it starts

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

技能定位: 设计图 SVG+MD 双载体记录方法论——把"会画不懂"的矢量 PDF 工程图,转化为大模型能准确理解、指认与复刻的交付物。

项目地址: 无上游项目仓库——本技能为内部方法论,正文与配套脚本、参考文档均位于本仓库 cad/design-drawing-svg-md/。

许可证: MIT——本技能为仓库自有方法技能,随仓库以 MIT 分发(见 LICENSE)。

方法来源: 一套钢结构施工图数字化执行方案的固化与泛化;文中数字为示例值或多图实测值,执行时以实际图纸实测为准。

适用输入: 矢量线画 + 无文字层的 PDF 工程图(彩色分层或单色均可)。

包管理器: pip install pymupdf numpy scipy pillow(PyMuPDF 2.0、2026-10-19;脚本已按新包名 import pymupdf,不再使用旧的 import fitz 别名,截至 2026-10)

依赖版本: Python 3.10+(脚本使用 str | None 等 3.10 语法)+ PyMuPDF + NumPy + SciPy + Pillow;实际运行版本由 07_validate.py 在测量当时写入 validate.json,报告读回而非另行探测,保证与交付物同源。

脚本资产: 本仓库 scripts/ 目录附带可直接复跑的泛化脚本——共用库 scripts/common.py、入口配置 scripts/config.example.json、十一阶段脚本 01_extract.py … 09_verify_deliverables.py(执行顺序与门禁见 reference/pipeline.md)。


概述

MD 是"大模型阅读主线",SVG 是"高精度几何档案 + 按需切片源",两者用统一 ID 体系互联,用校验闭环保证一致。

何时使用

  • 需要让大模型/Agent 理解一份工程图纸(几何、尺寸、语义、工艺、管理信息)
  • 源图为 PDF,且是矢量线画、无文字层(尺寸数字只是 glyph 轮廓路径,直接渲染"会画不会读")
  • 需要对图纸做问答、复刻重绘、改图、核量、生成 BOM 等下游任务
  • 图纸会换版(R00→R01),需要可 diff、可追溯的数字化档案

何时不使用

  • 源图已有文字层且无需精确几何 → 直接 PDF 文本提取即可
  • 只需一张渲染图给人看,无下游智能任务 → 不必建双载体
  • 栅格扫描件 → 本技能不覆盖矢量化(OCR/矢量化另案处理)

适用对象

A0 钢结构施工图(无文字层的矢量线画)为典型用例;任何"矢量线画 + 无文字层"的 PDF 工程图均可套用。


环境准备

# Python 3.10+
pip install pymupdf numpy scipy pillow

# 配置:从样例复制后按本机改路径与图层口径
cd scripts
cp config.example.json config.json      # 或运行时 --config /path/to/config.json

common.py 的配置解析顺序:命令行 --config <path> / --config=<path> 优先,否则回退脚本同目录的 config.json;两者都找不到时报错退出并提示。config.json 覆盖模块级常量(PDF 目录、页面尺寸与旋转、图号前缀、颜色→层映射、OCG 名单、字形阈值、字体路径),因此同一套脚本可换图复用而无需改代码。

需要按本机改的关键项:

配置项 说明
paths.pdf_dir / paths.out 源 PDF 目录与输出根目录
sheets 图号列表(含版本后缀,如 … R00),也是命令行传的图号
page.w_pt/h_pt/rotation 页面尺寸与回正方向,A0 竖放为 ccw90、pt_per_mm=2.83465
drawing_no_prefixes 图号前缀,用于从标题栏文本中识别本图
layering.color_layer / ocg_* 颜色兜底映射与 OCG 语义名单,换企业模板时必改
fonts.cjk 中文字体绝对路径,示例值为 C:/Windows/Fonts/simhei.ttf,Linux/macOS 须换成本机字体

Read the full file on GitHub · 351 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. today Changed · +48 tokens per session 45c6f03f7403
  2. 12d ago Changed · +13 lines 4e1c94b54c9a
  3. 13d ago Changed · +78 lines ce257f3abff4
  4. 1mo ago Changed · +35 lines 7cdc967be5d6
  5. 1mo ago First seen · 225 lines · 61 tokens per session scan A df7805d80d5b

Subscribe to this mod's changes

design-drawing-svg-md is a skill published in the GitHub repository znlgis/opengis-skills (75 stars, last pushed today), licensed MIT. It adds 109 tokens to every session and 8,047 once invoked, about $0.0004 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories