{
  "markdown": "# drawio-skill — From Text to Professional Diagrams\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/Agents365-ai/drawio-skill?style=flat&logo=github)](https://github.com/Agents365-ai/drawio-skill/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/Agents365-ai/drawio-skill?style=flat&logo=github)](https://github.com/Agents365-ai/drawio-skill/network/members)\n[![Latest Release](https://img.shields.io/github/v/release/Agents365-ai/drawio-skill?logo=github)](https://github.com/Agents365-ai/drawio-skill/releases/latest)\n[![Last Commit](https://img.shields.io/github/last-commit/Agents365-ai/drawio-skill?logo=github)](https://github.com/Agents365-ai/drawio-skill/commits/main)\n\n[![SkillsMP](https://img.shields.io/badge/SkillsMP-listed-1f6feb)](https://skillsmp.com/skills/agents365-ai-drawio-skill-skills-drawio-skill-skill-md)\n[![Claude Code Plugin](https://img.shields.io/badge/Claude%20Code-plugin-8a2be2)](https://github.com/Agents365-ai/365-skills)\n[![Agent Skills](https://img.shields.io/badge/Agent%20Skills-compatible-2ea44f)](https://agentskills.io)\n\n**English** · [中文](README_CN.md) · [📖 Online Docs](https://agents365-ai.github.io/drawio-skill/)\n\nA skill that turns natural language and real system sources into maintainable `.drawio` architecture models. Beyond generation and export, it incrementally synchronizes without discarding manual layout, projects multiple views from one model, enforces architecture contracts, queries dependencies, simulates failure propagation, and publishes dependency-free interactive walkthroughs. Works with **Claude Code, Cursor, Copilot, OpenClaw, Codex, Autohand Code, Hermes**, and any agent compatible with the [Agent Skills](https://agentskills.io) format.\n\n<p align=\"center\">\n  <img src=\"assets/microservices-example.png\" width=\"900\" alt=\"Microservices Architecture — generated from a single natural-language prompt\">\n</p>\n\n## ✨ Highlights\n\n- **Architecture digital twin / Diagram IR** — separate meaning, provenance, and geometry; project executive, system, deployment, data-flow, and security views from one model\n- **Incremental sync without losing manual layout** — `diagramctl sync` updates changed nodes/relations while preserving tuned coordinates, styles, and annotations; removals stay reviewable by default\n- **Diagram-as-Test** — YAML/JSON rules for direct Internet-to-database access, cycles, orphans, ownership, production observability, external timeouts, trust-boundary protocols, and color contrast\n- **Architecture query and review** — query components/owners/boundaries/paths, identify articulation points and high coupling, and emit Markdown/JSON review reports\n- **What-if + Story Mode** — simulate failure propagation with an annotated diagram; publish an offline, keyboard-accessible HTML walkthrough with text alternative, provenance, and language switching\n- **MCP server built in** — `scripts/diagramctl_mcp.py` exposes nine tools (`build/sync/views/architecture_test/review/query/whatif/story/doctor`) to Claude Desktop, Cursor, VS Code, Codex, and any MCP host; stdlib-only and offline, no `mcp` package\n- **One CLI** — `doctor/build/sync/views/query/test/review/whatif/story/publish/transform` connects the toolbox; core semantic workflows need only Python and are offline by default\n- **11 diagram type presets** — ERD, UML Class, Sequence, C4, Architecture, ML/Deep Learning, Flowchart, SysML (BDD / IBD / Requirement / Parametric), BPMN, Network Topology, Cross-Functional Swimlane\n- **Mermaid → native .drawio** (draw.io ≥ 30) — author 28 standard types as Mermaid text (**mindmap, gantt, timeline, journey, pie, sankey, kanban**…) and the CLI converts them into a laid-out, editable `.drawio` — structure in, layout free\n- **Visualize a codebase** — extract and auto-lay-out the structure of a Python / JS-TS / Go / Rust project (import graphs) or a Python class hierarchy — Graphviz placement, transitive reduction, nested module containers\n- **IaC → architecture diagram** — turn **Terraform** configs, **Kubernetes** manifests, or **docker-compose** files into an architecture diagram where every resource renders as its **official AWS / Azure / GCP / K8s icon**, edges derived from actual references (role ARNs, selectors, volume mounts)\n- **SQL DDL → ER diagram** — parse `CREATE TABLE` statements into per-table nodes with PK/FK markers and crow's-foot foreign-key edges\n- **Deterministic sequence diagrams** — describe participants + messages as JSON; lifelines, auto-tracked activation bars, and arrows are computed, never hand-placed\n- **C4 model with drill-down** — one command generates the multi-page System Context → Container → Component set with official C4 shapes; parent elements **click through** to their child page\n- **Search 10,000+ official shapes** — resolve the exact AWS / Azure / GCP / Cisco / Kubernetes / UML / BPMN icon style instead of guessing (no more blank-box `shape=mxgraph.*` typos)\n- **AI / LLM brand logos** — 321 logos (OpenAI, Claude, Gemini, Mistral, Llama, Ollama, LangChain…) that draw.io has none of, plus **18 data-store brands** (Redis, Postgres, Qdrant, Milvus…) for LLM/RAG architecture diagrams\n- **Self-check + auto-fix** — reads its own PNG output and auto-fixes overlaps, clipped labels, stacked edges, and more (up to 2 rounds)\n- **Iterative feedback loop** — up to 5 rounds of targeted refinement\n- **Style presets** — capture your visual style from a `.drawio` file or image, reuse on demand\n- **Clean layout** — grid-aligned, spacing scales with diagram size, connectors routed clear of nodes\n- **CI-ready** — official `drawio-architecture-test` GitHub Action enforces architecture contracts on every PR with no draw.io/Xvfb/Graphviz install; visual PR diff action for rendered `.drawio`\n- **Multi-agent, no daemon** — portable Agent Skills package plus an optional MCP server for host integrations (core semantic workflows need only Python; native export remains optional)\n\n## 🗺️ Feature Map\n\n<div align=\"center\">\n  <img src=\"assets/mindmap.png\" width=\"900\" alt=\"drawio-skill feature map — one mind map covering every capability, itself drawn with the skill\">\n</div>\n\nA bird's-eye view of everything the skill does — diagram types, import sources, layout engines, styling, export formats, and repurposing — in one map. Fittingly, this map was itself drawn with drawio-skill.\n\n## 🖼️ Examples\n\nThe maintained [Architecture Studio showcase](examples/architecture-studio/)\ncovers code → IR → `.drawio`, conflict-aware synchronization that preserves a\nmanually tuned layout, and architecture → policy/views/what-if/accessible Story.\nEvery artifact is regenerated by one script and verified in the test suite.\n\n> [!TIP]\n> **The hero image above was generated from this single prompt:**\n\n```\nCreate a microservices e-commerce architecture with Mobile/Web/Admin clients,\nAPI Gateway (auth + rate limiting + routing), Auth/User/Order/Product/Payment\nservices, Kafka message queue, Notification service, and User DB / Order DB /\nProduct DB / Redis Cache / Stripe API\n```\n\nThe skill is designed to route edges cleanly across different topologies, avoiding lines that cross through shapes:\n\n<table>\n  <tr>\n    <td align=\"center\" width=\"33%\">\n      <img src=\"assets/demo-star.png\" alt=\"Star topology\" width=\"100%\"><br>\n      <b>Star</b> · 7 nodes<br>\n      <sub>Central message broker with 6 microservices radiating outward, no edge crossings on this example.</sub>\n    </td>\n    <td align=\"center\" width=\"33%\">\n      <img src=\"assets/demo-layered.png\" alt=\"Layered flow\" width=\"100%\"><br>\n      <b>Layered</b> · 10 nodes / 4 tiers<br>\n      <sub>E-commerce stack with horizontal and diagonal cross-connections routed via corridors.</sub>\n    </td>\n    <td align=\"center\" width=\"33%\">\n      <img src=\"assets/demo-ring.png\" alt=\"Ring cycle\" width=\"100%\"><br>\n      <b>Ring</b> · 8 nodes<br>\n      <sub>CI/CD pipeline with a closed loop and 2 spur branches flowing along the perimeter.</sub>\n    </td>\n  </tr>\n</table>\n\nIt also speaks **Mermaid** — standard types (flowchart, mindmap, **kanban**, gitGraph, timeline…) convert straight to native, editable `.drawio`. Here's a Kanban board (this project's own roadmap) generated from a few lines of Mermaid:\n\n<div align=\"center\">\n  <img src=\"assets/kanban.png\" width=\"620\" alt=\"Kanban board generated by drawio-skill from Mermaid — this project's roadmap across Backlog / Todo / In Progress / Done\">\n</div>\n\n**Tube-Map Mode** restyles a pipeline or journey as a London-Underground-style metro map — coloured lines, octilinear (H/V/45°) routing, and white interchange circles. Here's the skill's own flow (this map is `assets/tubemap.json`, ~20 lines):\n\n<div align=\"center\">\n  <img src=\"assets/tubemap.png\" width=\"720\" alt=\"drawio-skill's pipeline drawn as a metro map — Author / Import / Repurpose / Analyze lines meeting at the Auto-layout and .drawio interchange stations\">\n</div>\n\nFull walkthrough in [docs/USAGE.md](docs/USAGE.md).\n\n## 🚀 Installation\n\n### 1. Install the draw.io desktop CLI\n\n| Platform | Command |\n| ---------- | --------- |\n| **macOS** | `brew install --cask drawio` |\n| **Windows** | [Download installer](https://github.com/jgraph/drawio-desktop/releases) |\n| **Linux** | `.deb`/`.rpm` from [releases](https://github.com/jgraph/drawio-desktop/releases); `sudo apt install xvfb` for headless |\n\nVerify with `drawio --version`. **Version ≥ 30 recommended** — it unlocks Mermaid → `.drawio` conversion and the ELK `--layout` pass (both unavailable on ≤ 29). On **WSL2** the CLI is the Windows desktop exe reached via `/mnt/c` — the skill detects this automatically (see [troubleshooting](skills/drawio-skill/references/troubleshooting.md)). Full recipes in [docs/INSTALL_CLI.md](docs/INSTALL_CLI.md).\n\n### 2. Install the skill\n\n```bash\n# Any agent (Claude Code, Cursor, Copilot, ...)\nnpx skills add Agents365-ai/365-skills -g\n```\n\n```text\n# Claude Code plugin marketplace\n> /plugin marketplace add Agents365-ai/365-skills\n> /plugin install drawio\n```\n\n```bash\n# Manual install\ngit clone https://github.com/Agents365-ai/drawio-skill.git \\\n  ~/.claude/skills/drawio-skill\n\n# Autohand Code global install\ngit clone https://github.com/Agents365-ai/drawio-skill.git \\\n  ~/.autohand/skills/drawio-skill\n\n# Autohand Code project-level install\ngit clone https://github.com/Agents365-ai/drawio-skill.git \\\n  .autohand/skills/drawio-skill\n```\n\nAutohand Code also supports `autohand --skill-install` for cataloged skills, with `--project` for workspace-level installs. Until this skill is listed there, use the direct clone path above.\n\nAlso indexed on [SkillsMP](https://skillsmp.com/skills/agents365-ai-drawio-skill-skills-drawio-skill-skill-md).\n\n**Updating:** `/plugin update drawio` (Claude Code), `skills update drawio-skill` (SkillsMP), or `git pull` for manual installs — see [docs/INSTALL_SKILL.md#updates](docs/INSTALL_SKILL.md#updates). Release history in [CHANGELOG.md](CHANGELOG.md).\n\n## ⚡ Quick Start\n\nAfter installation, just describe what you want. For example, an ML model:\n\n```\nDraw a Transformer encoder-decoder for machine translation: 6-layer encoder\nwith self-attention, 6-layer decoder with cross-attention, input embeddings\n(batch × 512 × 768), positional encoding, and a final output projection.\nAnnotate tensor shapes between layers and color-code by layer type.\n```\n\nThe skill plans the layout, generates the `.drawio` XML, exports to your chosen format, self-checks the result, and lets you iterate.\n\n## 🗺️ Visualize Code & Infrastructure\n\nBeyond hand-authored diagrams, the skill turns **existing code, infrastructure, and schemas into diagrams** — no manual coordinates. Just ask:\n\n> *\"Visualize the module structure of this Python project\"* · *\"Draw the class hierarchy of `mypackage`\"*\n\n<p align=\"center\">\n  <img src=\"assets/code-structure-example.png\" width=\"900\" alt=\"Auto-generated class hierarchy of Python's logging package — modules boxed, inheritance arrows resolved\">\n</p>\n\n<sub>↑ Python's <code>logging</code> package as a class hierarchy — one command, modules auto-boxed, every inheritance edge resolved.</sub>\n\nUnder the hood it runs a bundled extractor → auto-layout → validate pipeline:\n\n```bash\n# Import graph — Python / JS-TS / Go / Rust\npython3 scripts/pyimports.py   myproject --group -o graph.json\npython3 scripts/jsimports.py   ./src     --group -o graph.json\npython3 scripts/goimports.py   ./module  --group -o graph.json\npython3 scripts/rustimports.py ./crate   --group -o graph.json\n\n# Python class-inheritance hierarchy\npython3 scripts/pyclasses.py   mypackage --group -o graph.json\n\n# Infrastructure as Code — official cloud icons resolved automatically\npython3 scripts/tfimports.py   ./infra      -o graph.json   # Terraform → AWS/Azure/GCP icons\npython3 scripts/k8simports.py  ./manifests  -o graph.json   # K8s YAML/JSON → kind icons\npython3 scripts/composeimports.py compose.yml -o graph.json # services + named volumes\n\n# Live infrastructure — draw what's ACTUALLY running / deployed\nterraform show -json          | python3 scripts/tfstate.py -      -o graph.json  # deployed cloud\ndocker inspect $(docker ps -q)| python3 scripts/dockerimports.py -  -o graph.json  # running containers\nkubectl get all,ing,cm,secret,pvc -o json | python3 scripts/k8simports.py - -o graph.json  # live cluster\n\n# Data & interactions\npython3 scripts/sqlerd.py      schema.sql   -o graph.json   # SQL DDL → ER diagram\npython3 scripts/ciimports.py . -o graph.json              # GitHub Actions + GitLab CI -> pipeline DAG\npython3 scripts/openapiimports.py openapi.yaml -o graph.json # OpenAPI/Swagger → API diagram (by method)\npython3 scripts/seqlayout.py   seq.json  -o sequence.drawio # sequence diagram, direct to .drawio\npython3 scripts/c4.py          c4.json   -o c4.drawio       # C4 model, multi-page + drill-down\n\n# Diff two diagrams / snapshots → colour-coded \"what changed\"\npython3 scripts/drawiodiff.py old.drawio new.drawio -o graph.json # +added -removed ~changed\n\n# Architecture time-lapse → self-contained HTML player of how a codebase grew\npython3 scripts/timelapse.py src --importer pyimports # → architecture-evolution.html\n\n# Reverse: describe an existing .drawio as structured Markdown (README / PR summary)\npython3 scripts/explain.py    architecture.drawio -o architecture.md\n\n# Diagram → PowerPoint deck (one page per slide; C4 model → presentation)\npython3 scripts/drawio2pptx.py c4.drawio -o c4.pptx   # needs: pip install python-pptx\n\n# Interactive HTML viewer — pan/zoom/search/tabs + working drill-down links, one file\npython3 scripts/drawiohtml.py c4.drawio -o c4.html\n\n# Animated data-flow SVG — edges \"flow\" (marching ants); renders on GitHub\npython3 scripts/svgflow.py    architecture.drawio -o flow.svg\n\n# Reverse: .drawio → Mermaid flowchart (diagrams-as-code GitHub renders)\npython3 scripts/drawio2mermaid.py architecture.drawio --fenced -o arch.md\n\n# Language variant: extract labels → translate values → apply (layout untouched)\npython3 scripts/relabel.py architecture.drawio --extract -o labels.json\npython3 scripts/relabel.py architecture.drawio --map labels.json -o architecture_cn.drawio\n\n# Re-theme an existing .drawio with a style preset (e.g. dark mode)\npython3 scripts/restyle.py architecture.drawio --preset dark\n\n# Colour an existing .drawio by data → cost / latency / traffic heat map\npython3 scripts/heatmap.py    architecture.drawio -m latency.csv --size -o hot.drawio\n\n# any extractor → auto-layout → editable .drawio\npython3 scripts/autolayout.py  graph.json -o diagram.drawio\n\n# Image → editable .drawio — your vision extracts the graph JSON, this rebuilds it\npython3 scripts/raster2drawio.py whiteboard-graph.json -o out.drawio\n\n# Watch a diagram build itself, node by node → HTML player (+ optional GIF)\npython3 scripts/buildup.py architecture.drawio --gif build.gif  # → buildup.html\n\n# Big diagram → boardroom exec summary (clustered) + click-to-drill-down to full\npython3 scripts/compress.py  big.drawio -o exec.drawio\n\n# Decision-tree flowchart → click-through HTML triage runbook (no draw.io CLI needed)\npython3 scripts/runbook.py   triage.drawio -o triage.html\n\n# CI: render base/head/diff PNGs + Markdown report for every .drawio a PR changed\npython3 scripts/prdiff.py --base origin/main --head HEAD -o drawio-pr/report.md\n\n# Tube-Map Mode — restyle a pipeline / journey as a metro / subway map\npython3 scripts/tubemap.py metro.json -o metro.drawio\n```\n\n| Piece | What it does |\n| --- | --- |\n| **13 extractors** | import graphs for **Python · JS/TS · Go · Rust**, **Python class inheritance**, **Terraform / Kubernetes / docker-compose** resource graphs (official cloud icons), **SQL DDL → ERD**, **OpenAPI / Swagger → API diagram** (operations coloured by HTTP method + schemas), **CI pipelines → DAG** (GitHub Actions `needs:` graphs + GitLab stages, with triggers, matrix sizes, reusable-workflow calls), and **live** infra from `terraform show -json` / `docker inspect` / `kubectl get -o json` (draw what's actually deployed) |\n| **Diagram diff** | `drawiodiff.py` compares two `.drawio` (or two live snapshots) into one colour-coded graph — added=green, removed=red, changed=orange — so you can see architecture / infra **drift** at a glance |\n| **Language variants** | `relabel.py` swaps every label via a JSON map with layout/styles/ids untouched — `--extract` dumps all labels, translate the values, `--map` applies them. One diagram → EN + CN twins for bilingual docs |\n| **Re-theme** | `restyle.py` applies a style preset (built-in `dark`/`corporate`/… or your own) to an *existing* `.drawio` — palette remapped by hue so same-colored nodes stay grouped; layout and edge routing untouched |\n| **Metric heat map** | `heatmap.py` recolours an existing `.drawio` from a CSV/JSON of per-node values — cost / latency / traffic / error-rate shaded low→high on a gradient (optional size-by-value + legend), matched by cell id or label |\n| **Architecture time-lapse** | `timelapse.py` re-runs an importer across a repo's git history and assembles a self-contained HTML player — watch modules & edges appear over time (▶ play / ‹ › step) |\n| **Diagram → Markdown** | `explain.py` reverses a `.drawio` into a structured description — components by tier, relations, per-page for C4 — for dropping an architecture summary into a README or PR |\n| **Interactive viewer** | `drawiohtml.py` publishes a `.drawio` as one self-contained HTML — page tabs, drag-pan, wheel-zoom, node search, and a C4 model's drill-down links keep working. Share the file; no draw.io, no server |\n| **Diagram → PowerPoint** | `drawio2pptx.py` turns a multi-page diagram into a 16:9 deck (one page per slide, page name as title) — a C4 model becomes a ready-to-present slideshow |\n| **Animated data-flow** | `svgflow.py` makes a diagram's edges *flow* (marching-ants animation along each arrow) — a self-contained looping SVG that renders on GitHub, in docs, or as a slide background |\n| **Diagram → Mermaid** | `drawio2mermaid.py` converts a `.drawio` into a Mermaid `flowchart` (containers → subgraphs, edge labels kept) — paste it into Markdown as diagrams-as-code that GitHub renders natively |\n| **Sequence engine** | `seqlayout.py` computes lifeline / activation-bar / arrow geometry from a message list — no Graphviz, no hand placement |\n| **Auto-layout** | Graphviz places nodes and routes orthogonal edges *around* them — removes the manual-coordinate ceiling for large graphs. `--tune` tries both directions and keeps the more readable one |\n| **Transitive reduction** | drops edges implied by a longer path, turning a dense hairball into a traceable graph (asyncio: 149 → 46 edges) |\n| **Nested containers** | `--group` boxes modules by sub-package, nested for deep package trees |\n| **Deterministic validator** | `validate.py` lints the `.drawio` (dangling edges, duplicate ids, overlaps) before the visual self-check |\n\nLayout needs Graphviz (`brew install graphviz` / `apt install graphviz`) — optional; everything else works without it. Full format + flag reference in [references/autolayout.md](skills/drawio-skill/references/autolayout.md). Regenerate, validate (`--strict` gate) and render headlessly in CI: [docs/CI.md](docs/CI.md).\n\n## 🧩 Supported Diagram Types\n\n| Category | Examples | Notable features |\n| --- | --- | --- |\n| Architecture | microservices, cloud (AWS/GCP/Azure), network topology, deployment | Tier-based swimlanes, hub-center strategy |\n| C4 model | system context, containers, components | Multi-page `.drawio`, click-to-drill-down links |\n| ML / Deep Learning | Transformer, CNN, LSTM, GRU | Tensor shape annotations, layer-type color coding |\n| Flowcharts | business processes, workflows, decision trees, state machines | Semantic shapes (parallelogram I/O, diamond decisions) |\n| UML | class diagrams, sequence diagrams | Inheritance / composition / aggregation arrows; lifelines + activation boxes |\n| SysML / MBSE | block definition (bdd), internal block (ibd), requirement (req), parametric (par) | «block» / «requirement» compartments, satisfy/derive/verify edges, native `mxgraph.sysml.*` ports & flows |\n| BPMN | business processes, pools & lanes | Native `mxgraph.bpmn.*` events/tasks/gateways, sequence vs message flows |\n| Network topology | LAN/WAN, subnets, DMZ | `mxgraph.networks.*` device shapes, zone containers, link labels; Cisco/rack via shape search |\n| Cross-functional swimlane | who-does-what processes, handoffs | Pool + role lanes, flowchart vocabulary, orthogonal handoff edges |\n| Data | ER diagrams, data flow diagrams (DFD) | Table containers, PK/FK notation |\n| Mermaid-authored | mind maps, gantt, timeline, journey, pie, sankey, kanban + 20 more | Native CLI conversion (≥ v30) — structure only, layout free |\n| Other | org charts, wireframes | — |\n\n## 🔍 Shape Search\n\nNeed a real AWS / Azure / GCP / Cisco / Kubernetes / UML / BPMN icon? The skill searches **10,000+ official draw.io shapes** for the exact style string — so vendor icons render correctly instead of falling back to a blank box from a guessed `shape=mxgraph.*` name.\n\n> *\"Add an AWS Lambda wired to an S3 bucket\"* · *\"Use the real Kubernetes pod icon\"*\n\n```bash\npython3 scripts/shapesearch.py \"aws lambda\" --limit 5\n# → Lambda (77x93)\n#   outlineConnect=0;...;shape=mxgraph.aws3.lambda;fillColor=#F58534;...\n```\n\n<p align=\"center\">\n  <img src=\"assets/shape-search-example.png\" width=\"900\" alt=\"Serverless AWS architecture built from official draw.io icons resolved by shapesearch.py\">\n</p>\n\n<sub>↑ A serverless AWS architecture — every icon is the real official draw.io shape resolved by <code>shapesearch.py</code>, not a hand-guessed <code>shape=</code> string.</sub>\n\nCovers AWS / Azure / GCP / Cisco / Kubernetes / UML / BPMN / ER / electrical / P&ID and the general shape sets. Hand-writable style cheatsheet + search usage in [references/shapes.md](skills/drawio-skill/references/shapes.md).\n\n## 🤖 AI / LLM Brand Logos\n\ndraw.io ships **no** modern AI/LLM logos, so an LLM-app diagram renders as generic boxes. `aiicons.py` resolves a brand name to a draw.io image style for any of **321 logos** (OpenAI, Claude, Gemini, Mistral, Llama, Cohere, DeepSeek, Qwen, Ollama, LangChain, HuggingFace…) from [lobe-icons](https://github.com/lobehub/lobe-icons) (MIT), plus **18 data-store brands** (Redis, Postgres, MongoDB, Qdrant, Milvus, Supabase…) via [simple-icons](https://simpleicons.org) (CC0) for RAG stacks.\n\n```bash\npython3 scripts/aiicons.py \"claude\" --json      # CDN-referenced (default)\npython3 scripts/aiicons.py \"openai\" --embed     # self-contained data URI\n```\n\n<p align=\"center\">\n  <img src=\"assets/ai-logos-example.png\" width=\"900\" alt=\"Multi-provider LLM app diagram with real AI brand logos resolved by aiicons.py\">\n</p>\n\n<sub>↑ A multi-provider LLM app — every brand logo resolved by <code>aiicons.py</code>. Icons are referenced from the unpkg CDN by default (network needed at render time); <code>--embed</code> inlines them for offline use. Logos are trademarks of their owners, used for identification only.</sub>\n\n## 🎨 Style Presets\n\nCapture a visual style once, reuse it everywhere. Five presets are built in — `default`, `corporate`, `handdrawn`, `colorblind-safe` (Okabe-Ito palette), `dark` — and you can teach the skill your own style from a `.drawio` file or a flat image:\n\n```\nDraw a microservices architecture using my \"corporate\" style\n```\n\n```\nLearn my style from ~/diagrams/brand.drawio as \"mybrand\"\n```\n\nThe skill extracts colors, shapes, fonts, and edge style, renders a preview, and only saves the preset after you approve. Full preset-management commands in [docs/STYLE_PRESETS.md](docs/STYLE_PRESETS.md).\n\n## 🔄 How it works\n\n<p align=\"center\">\n  <img src=\"assets/workflow.png\" width=\"700\" alt=\"Internal workflow\">\n</p>\n\nBehind the scenes: **check dependencies → plan layout → generate `.drawio` XML → export draft PNG → self-check + auto-fix** (up to 2 rounds) → **show to user → 5-round feedback loop** until approved → **final export**.\n\n## 🆚 Comparison\n\n### vs Other draw.io Skills & Tools\n\n| Feature | drawio-skill | [jgraph/drawio-mcp](https://github.com/jgraph/drawio-mcp) (official)<br>![stars](https://img.shields.io/github/stars/jgraph/drawio-mcp?style=flat-square&logo=github&v=2) | [bahayonghang/drawio-skills](https://github.com/bahayonghang/drawio-skills)<br>![stars](https://img.shields.io/github/stars/bahayonghang/drawio-skills?style=flat-square&logo=github) | [GBSOSS/ai-drawio](https://github.com/GBSOSS/ai-drawio)<br>![stars](https://img.shields.io/github/stars/GBSOSS/ai-drawio?style=flat-square&logo=github) |\n| --- | --- | --- | --- | --- |\n| **Approach** | Pure SKILL.md + optional MCP server | MCP servers / Claude Code plugin / Project | YAML DSL + CLI (MCP optional) | Claude Code plugin |\n| **Dependencies** | draw.io desktop only | draw.io desktop | draw.io desktop (MCP optional) | draw.io plugin + browser |\n| **Multi-agent** | ✅ 6 platforms | ⚠️ MCP hosts (Claude, Cursor, VS Code) | ✅ Claude / Gemini / Codex | ❌ Claude Code only |\n| **Self-check + auto-fix** | ✅ 2-round (reads PNG) | ❌ | ✅ validation + strict mode | ❌ screenshot only |\n| **Iterative review** | ✅ 5-round loop | ❌ generate once | ✅ 3 workflows | ❌ |\n| **Diagram presets** | ✅ 7 types | ❌ | ✅ paper-mode classifier | ❌ |\n| **Mermaid authoring** | ✅ 28 types (CLI ≥ 30) | ✅ | ❌ | ❌ |\n| **ML/DL diagrams** | ✅ tensor shapes, layer colors | ❌ | ❌ | ❌ |\n| **Color system** | ✅ 7-color semantic | ❌ | ✅ 6 themes | ❌ |\n| **Official shape search** | ✅ 10k+ shapes (local) | ✅ 10k+ shapes (MCP) | ❌ | ❌ |\n| **AI/LLM brand logos** | ✅ 321 + 18 data-store | ❌ | ❌ | ❌ |\n| **Browser fallback** | ✅ diagrams.net URL (viewer + editable) | ✅ diagrams.net URL (plugin) + inline preview | ✅ via optional MCP | ✅ diagrams.net viewer (primary) |\n| **Zero-config** | ✅ copy `skills/drawio-skill/` | ✅ | ✅ desktop-only mode | ❌ needs plugin install |\n\n> **Using the official jgraph plugin?** [jgraph/drawio-mcp](https://github.com/jgraph/drawio-mcp) now ships an official Claude Code plugin (`/plugin install drawio@drawio`) that also generates `.drawio` and exports via the desktop CLI. drawio-skill is complementary — reach for it when you want the code / IaC / SQL / OpenAPI importers, AI-brand logos, deterministic sequence & C4 generators, self-check + review loop, and the interactive HTML viewer, all from a single SKILL.md with no MCP server.\n\nFull comparison + key-advantages summary in [docs/COMPARISON.md](docs/COMPARISON.md) (with audit timestamp).\n\n## 🎯 When to use (and when not to)\n\n**Good fit:**\n\n- Polished, precise diagrams — stakeholder decks, architecture, network topology, strict UML, ER diagrams\n- Solid opaque fills, 10,000+ official shapes, branded icons (AWS / Azure / GCP / Cisco / Kubernetes + AI/LLM logos), swimlanes, and custom geometry\n- Anything you'll export to PNG / SVG / PDF and keep editable\n\n**Reach for a sibling skill instead when you need:**\n\n- **A casual, hand-drawn / whiteboard look** → [excalidraw-skill](https://github.com/Agents365-ai/excalidraw-skill) or [tldraw-skill](https://github.com/Agents365-ai/tldraw-skill)\n- **Diagrams-as-code that live in git and render in Markdown** → [mermaid-skill](https://github.com/Agents365-ai/mermaid-skill) (general) or [plantuml-skill](https://github.com/Agents365-ai/plantuml-skill) (UML)\n- **Freeform infinite-canvas sketching / freehand strokes** → [tldraw-skill](https://github.com/Agents365-ai/tldraw-skill)\n\n## 🔗 Related Skills\n\nPart of the [Agents365-ai diagram-skill family](https://github.com/Agents365-ai) — pick the right tool for the job:\n\n| Skill | Style | Best for |\n| --- | --- | --- |\n| [excalidraw-skill](https://github.com/Agents365-ai/excalidraw-skill) | Hand-drawn / sketchy | Whiteboard mockups, informal diagrams |\n| [mermaid-skill](https://github.com/Agents365-ai/mermaid-skill) | Text-based, auto-layout | README-embeddable, version-control friendly |\n| [plantuml-skill](https://github.com/Agents365-ai/plantuml-skill) | UML-focused | Class / sequence diagrams in CI pipelines |\n| [tldraw-skill](https://github.com/Agents365-ai/tldraw-skill) | Whiteboard collaboration | Casual sketches, FigJam-style boards |\n\n## 👤 Author\n\n**Agents365-ai**\n\n- GitHub: <https://github.com/Agents365-ai>\n- Bilibili: <https://space.bilibili.com/441831884>\n\n## 📄 License\n\n[MIT](LICENSE)\n",
  "bytes": 29316,
  "sha": "19fe700d9c624b36a70e16b95f9e5f83d99d8f0dce19e5b7b5f991e00b5ea4b3",
  "repo_slug": "agents365-ai/drawio-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_agents365_ai_drawio_skill_drawio_skill_9aa733a9/readme"
}