# Drawio

> Create or edit editable draw.io diagrams, optionally export PNG/SVG/PDF with embedded diagram data, or produce a diagrams.net URL. Use when draw.io format is requested; use native text diagrams for simple explanations that need no draw.io artifact.

- Skill: `garyld1962/drawio-3` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add garyld1962/drawio-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/garyld1962/drawio-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: garyld1962 (https://skillmd.com/u/garyld1962)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/garyld1962/drawio-3

---


# Draw.io

## Workflow
1. Identify the relationships, desired diagram type, source artifact and output path.
   Inspect an existing diagram before editing; preserve pages, IDs, links and styling
   outside the requested change.
2. Read [XML reference](references/xml.md). Write editable, uncompressed mxGraph XML
   to a .drawio file. Use stable IDs, readable geometry and edges attached to nodes.
3. Parse the XML, check duplicate IDs and dangling edge endpoints, then inspect it in
   an available renderer/editor. XML validity alone does not prove visual quality.
4. Default to returning the editable source. For a requested image or PDF, check the
   installed draw.io desktop CLI's --help and supported flags; export with embedded
   diagram data when that format supports it. Verify the output exists and inspect it.
   Keep the .drawio source even after export. If no renderer is available, return the
   source and clearly say the requested export/visual check is still unavailable.
5. For a requested URL, use [the URL helper](scripts/drawio_url.py) with the source file.
   It creates a diagrams.net #R fragment locally, without uploading or opening it.
   A shared link contains the diagram content; do not publish or open it automatically.

## Examples
- "Make an editable architecture diagram" → create a .drawio with real components,
  ownership boundaries and labeled relationships.
- "Export this to SVG too" → retain the source, export and verify SVG if supported.

## Closed decisions and open decisions
Honor the user's notation, names and architecture. Clarify unknown relationships instead
of inventing systems. Layout choices can follow the existing diagram.

## Do not
Do not depend on absent vendor skills or MCP servers, delete editable source after
export, or silently send private diagrams to an online conversion service.

## Copilot integration
This skill is the durable entrypoint for Copilot hosts that load agent skills.
The matching prompt file is an optional VS Code shortcut. Read repository instructions
before edits; use the tools actually exposed by the host, including connected GitHub
access when available. A prompt or skill does not itself grant additional permissions.

