drawio-png
Reads a *.drawio.png (.drawio, .drawio.svg) diagram as text — vertices, edges and their hidden attributes (port, tech, traced). Use FIRST for any question…
от victorrentea★ 17 звёзд на GitHub
Установить drawio-png в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
drawio-png
A *.drawio.png is a picture and the full draw.io source: the XML sits in a PNG text
chunk. Read that, never the pixels — labels in the image omit the custom attributes that
carry the semantics (e.g. traced="yes" on edges, port/tech on containers).
.claude/skills/drawio-png/drawio.py <file> # vertices + edges + attributes, as TOON
.claude/skills/drawio-png/drawio.py json <file> # same data, JSON — pipe to jq
.claude/skills/drawio-png/drawio.py xml <file> # full decoded mxGraph XML (styles, geometry)
The default output is TOON: vertices as one table
(vertices[N]{id,label,kind,…}: then a row each, null = attribute not set), edges as one
- from: … / to: … block each, listing only the attributes that edge has.
Diagrams in this repo: petclinic-backend/docs/Deployment.drawio.png,
petclinic-backend/docs/ConceptualModel.drawio.png.
What the script unwraps (so you don't redo it)
- PNG chunks
tEXt/zTXt/iTXt; keyword ismxfile(draw.io) or a baremxGraphModel(ConceptualModel.drawio.pnguses this keyword, yet its payload is still an<mxfile>). - Payload is URL-encoded; a
<diagram>body may further be base64 → raw deflate → URL-encoded. - Custom properties: draw.io wraps the cell in
<object>/<UserObject>and movesidandlabelonto the wrapper; the inner<mxCell>has no id. The script merges them. - Multi-page files print one block per page.
- Labels parented to an edge (
*,1, …) are its multiplicities: printed on the edge asfromMultiplicity/toMultiplicity(from: Owner, to: Pet, toMultiplicity: *= many pets per owner), not as vertices.
A diagram is a claim, not evidence
The picture shows what someone drew. Before answering "only X calls Y", grep the code for
the other side — base URLs, ports, RestClient/WebClient, MCP clients, .mcp.json,
compose files — and report drift. DeploymentDiagramTest compares the drawing with traces
both ways, but only the traces of the browser suites: an edge marked traced="no" — the
chatbot's, which runs no OTel agent — is checked by nothing. It once vanished from the
picture for a month (a57d5e18) with every test green.
Guardrail code
petclinic-backend/src/test/java/victor/training/petclinic/guardrail/DrawioDiagram.java
does the same decoding in Java for tests; keep both in step if the format handling changes.
Trigger eval
evals/trigger_eval.py [reps] runs every phrasing in evals/prompts.json through headless
claude -p and passes a run only if it loads this skill (~2 min, a few $). Rerun it after
touching description; the bar is 10/10 at 2 reps. It was 9/10 before the 2026-10-15
rewording ("architecture diagram" without "drawio" went grepping instead).
Cut from 688 to 320 chars on 2026-10-27: still 10/10 here and 30/30 on three extra tasks, on Sonnet 5.5.
Comprehension eval
evals/comprehension_eval.py [reps] [model …] hands the output of both diagrams, with no word
about the format, to the cheapest Copilot CLI models (gpt-*-luna, Haiku 4.5, Gemini Flash,
MAI flash) and grades 10 questions that need a correct reading: edge direction, null cells,
multiplicities (~3 min). DRAWIO=<other drawio.py> runs it against another version of the
script, for an A/B. On 2026-11-13: 148/150. The old repr text format scored 97/100, and
all-tabular TOON (edges as a table too) only 95/100: both Lunas dropped one row from "every
traced=no edge" in 10 of 12 runs, hence the keyed edges.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash(.claude/skills/drawio-png/drawio.py:*)
Вложенные файлы
- drawio.py
- evals/comprehension_eval.py
- evals/prompts.json
- evals/trigger_eval.py
FAQ
Что делает скилл drawio-png?
Reads a *.drawio.png (.drawio, .drawio.svg) diagram as text — vertices, edges and their hidden attributes (port, tech, traced). Use FIRST for any question about the deployment, architecture or conceptual-model diagram in petclinic-backend/docs/, who calls or depends on the backend, or whether a diagram matches the code.
Как установить скилл drawio-png?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл drawio-png запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…