Skip to content

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.

fix: browser fallback URL encoding (issue #4)

Agents365-ai7dfd928986f3
diff --git a/SKILL.md b/SKILL.md
index 83bde9d..c19d55a 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -463,8 +463,11 @@ When the draw.io desktop CLI is unavailable, generate a browser-editable URL by
python3 -c "
import zlib, base64, urllib.parse, sys
xml = open(sys.argv[1]).read()
-compressed = zlib.compress(xml.encode('utf-8'), 9)
-encoded = base64.urlsafe_b64encode(compressed).decode('utf-8')
+# Raw deflate (no zlib header) — diagrams.net uses mxGraph's raw inflate
+c = zlib.compressobj(9, zlib.DEFLATED, -zlib.MAX_WBITS)
+compressed = c.compress(xml.encode('utf-8')) + c.flush()
+# Standard base64 (atob rejects url-safe -/_); strip any newlines
+encoded = base64.b64encode(compressed).decode('utf-8').replace('\n', '')
print('https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&edit=_blank#R' + urllib.parse.quote(encoded, safe=''))
" input.drawio
```