Agent skill that turns natural language, code, Terraform/K8s, SQL, OpenAPI, AsyncAPI, Protobuf and GraphQL sources into editable, tested draw.io architecture diagrams: incremental sync, multi-view projection, drift diff, CI architecture tests, whiteboard derasterize, interactive HTML/PPTX/Mermaid exports.
Python agent-skillsarchitecturearchitecture-diagramasyncapibpmnc4-modelclaude-codediagramdiagrams-as-codedrawioflowchartgithub-actionsgraphqlimage-to-diagramkubernetesmcp-serverprotobufsysmlterraformuml
Embed images in SVG exports
Rajesh Jain3438d8724e0c
diff --git a/skills/drawio-skill/SKILL.md b/skills/drawio-skill/SKILL.mdindex eb2ceeb..82f8590 100644--- a/skills/drawio-skill/SKILL.md+++ b/skills/drawio-skill/SKILL.md@@ -247,7 +247,7 @@ xvfb-run -a --server-args="-screen 0 1280x1024x24" \# Running as root (CI / Docker)? Append --no-sandbox AT THE END (placing it earlier makes drawio treat it as the input filename)# SVG export (final — -e is safe; SVG is text)-drawio -x -f svg -e -o diagram.svg input.drawio+drawio -x -f svg -e --embed-svg-images -o diagram.svg input.drawio# PDF export (final)drawio -x -f pdf -e -o diagram.pdf input.drawiodiff --git a/skills/drawio-skill/scripts/drawiohtml.py b/skills/drawio-skill/scripts/drawiohtml.pyindex a67b937..29bf3f1 100644--- a/skills/drawio-skill/scripts/drawiohtml.py+++ b/skills/drawio-skill/scripts/drawiohtml.py@@ -54,7 +54,8 @@ def rewrite_page_links(tree):def export_svg(drawio_file, index, out_svg):"""Export one page (1-based index) to SVG via the draw.io CLI."""- r = subprocess.run(["drawio", "-x", "-f", "svg", "--page-index", str(index),+ r = subprocess.run(["drawio", "-x", "-f", "svg", "--embed-svg-images",+ "--page-index", str(index),"-o", out_svg, drawio_file], capture_output=True)return r.returncode == 0 and os.path.exists(out_svg)diff --git a/skills/drawio-skill/scripts/svgflow.py b/skills/drawio-skill/scripts/svgflow.pyindex 288d0ed..ece652e 100644--- a/skills/drawio-skill/scripts/svgflow.py+++ b/skills/drawio-skill/scripts/svgflow.py@@ -35,7 +35,7 @@ def to_svg(path):return f.read()with tempfile.TemporaryDirectory() as tmp:out = os.path.join(tmp, "d.svg")- r = subprocess.run(["drawio", "-x", "-f", "svg", "-o", out, path],+ r = subprocess.run(["drawio", "-x", "-f", "svg", "--embed-svg-images", "-o", out, path],capture_output=True)if r.returncode != 0 or not os.path.exists(out):sys.exit("error: draw.io SVG export failed (is the draw.io CLI installed?)")