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
feat(aiicons): resolve common data-store brands via simple-icons (#31)
Agents365.ai9269f5cce76b
diff --git a/skills/drawio-skill/SKILL.md b/skills/drawio-skill/SKILL.mdindex cdaa8b5..a2130ca 100644--- a/skills/drawio-skill/SKILL.md+++ b/skills/drawio-skill/SKILL.md@@ -1,12 +1,12 @@---name: drawio-skill-version: 1.13.1+version: 1.14.0description: Use when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, network topology, ML/DL model figures (Transformer/CNN/LSTM), mind maps, or any visualization. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Best suited when the diagram needs custom styling, rich shape vocabulary, swimlanes, or exportable images (PNG/SVG/PDF/JPG). Generates .drawio XML and exports locally via the native draw.io desktop CLI.license: MIThomepage: https://github.com/Agents365-ai/drawio-skillcompatibility: Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped if unavailable. Optional auto-layout (scripts/autolayout.py) needs Graphviz (dot).platforms: [macos, linux, windows]-metadata: {"openclaw":{"requires":{"anyBins":["draw.io","drawio"]},"emoji":"📐","os":["darwin","linux","win32"],"install":[{"id":"brew-drawio","kind":"brew","formula":"drawio","bins":["drawio"],"label":"Install draw.io via Homebrew","os":["darwin"]},{"id":"brew-graphviz","kind":"brew","formula":"graphviz","bins":["dot"],"label":"Install Graphviz for optional autolayout.py","os":["darwin"],"optional":true}]},"hermes":{"tags":["drawio","diagram","flowchart","architecture","visualization","uml"],"category":"design","requires_tools":["drawio","draw.io"],"related_skills":["mermaid","excalidraw","plantuml"]},"author":"Agents365-ai","version":"1.13.1"}+metadata: {"openclaw":{"requires":{"anyBins":["draw.io","drawio"]},"emoji":"📐","os":["darwin","linux","win32"],"install":[{"id":"brew-drawio","kind":"brew","formula":"drawio","bins":["drawio"],"label":"Install draw.io via Homebrew","os":["darwin"]},{"id":"brew-graphviz","kind":"brew","formula":"graphviz","bins":["dot"],"label":"Install Graphviz for optional autolayout.py","os":["darwin"],"optional":true}]},"hermes":{"tags":["drawio","diagram","flowchart","architecture","visualization","uml"],"category":"design","requires_tools":["drawio","draw.io"],"related_skills":["mermaid","excalidraw","plantuml"]},"author":"Agents365-ai","version":"1.14.0"}---# Draw.io Diagramsdiff --git a/skills/drawio-skill/references/shapes.md b/skills/drawio-skill/references/shapes.mdindex 0759788..3df5bcd 100644--- a/skills/drawio-skill/references/shapes.md+++ b/skills/drawio-skill/references/shapes.md@@ -68,6 +68,12 @@ python3 <this-skill-dir>/scripts/aiicons.py --list # all brandsonce and inline it as a data URI (portable, renders offline, larger XML).- Logos are trademarks of their respective owners, referenced for identificationonly — the same basis on which draw.io ships AWS/Azure icons.+- **Data stores** common in RAG/LLM apps that lobe lacks (Qdrant, Redis,+ Postgres, Mongo, Elasticsearch, Milvus, Supabase, Neo4j, ClickHouse, Kafka,+ Snowflake, Databricks, …) resolve via the [simple-icons](https://simpleicons.org)+ CDN (CC0) as an automatic fallback — same command, same output shape. A brand+ in neither set has no logo; use a cylinder (`shape=cylinder3;`, see below) or+ `scripts/shapesearch.py "<name> database"`.## Cheatsheet — hand-writable stylesdiff --git a/skills/drawio-skill/scripts/aiicons.py b/skills/drawio-skill/scripts/aiicons.pyindex 3e6f5c5..f3dcdb8 100644--- a/skills/drawio-skill/scripts/aiicons.py+++ b/skills/drawio-skill/scripts/aiicons.py@@ -35,6 +35,31 @@ STYLE = ("shape=image;html=1;imageAspect=0;aspect=fixed;""verticalLabelPosition=bottom;verticalAlign=top;image=")_VARIANT = re.compile(r"-(color|text)$")+# Common RAG/LLM data stores that lobe-icons lacks, mapped to simple-icons+# slugs (https://simpleicons.org, CC0). Served from the simple-icons CDN. Each+# slug below is verified to return HTTP 200 at https://cdn.simpleicons.org/<slug>.+_SIMPLEICONS_CDN = "https://cdn.simpleicons.org/"+_SUPPLEMENT = {+ "qdrant": "qdrant",+ "milvus": "milvus",+ "supabase": "supabase",+ "redis": "redis",+ "postgresql": "postgresql",+ "mongodb": "mongodb",+ "elasticsearch": "elasticsearch",+ "neo4j": "neo4j",+ "kafka": "apachekafka",+ "clickhouse": "clickhouse",+ "duckdb": "duckdb",+ "mysql": "mysql",+ "sqlite": "sqlite",+ "cassandra": "apachecassandra",+ "snowflake": "snowflake",+ "databricks": "databricks",+ "mariadb": "mariadb",+ "couchbase": "couchbase",+}+def families(icons):"""base brand name -> set of its variant filenames (without .svg)."""@@ -75,6 +100,19 @@ def search(fam, query, limit):return sorted(scored, key=lambda base: (-scored[base], base))[:limit]+def search_supplement(query):+ """Fall back to the simple-icons supplement (exact or substring match)."""+ q = squish(query)+ if not q:+ return None+ if q in _SUPPLEMENT:+ return q+ for brand in _SUPPLEMENT:+ if q in brand or brand in q:+ return brand+ return None++def pick_variant(base, variants, prefer):order = {"color": ["-color", "", "-text"],"mono": ["", "-color", "-text"],@@ -112,26 +150,44 @@ def main():ap.error("a query is required (or use --list)")matches = search(fam, args.query, args.limit)- if not matches:- sys.exit(f"no AI/LLM brand matched {args.query!r} — try --list, or use a generic shape")results = []- for base in matches:- file = pick_variant(base, fam[base], args.variant)- url = f"{cdn}{file}.svg"- if args.embed:- try:- svg = urllib.request.urlopen(url, timeout=15).read()- except Exception as exc: # noqa: BLE001 - report and skip- sys.stderr.write(f"warning: could not fetch {url} ({exc})\n")- continue- # Rewrite the 1em intrinsic size so draw.io scales the inlined SVG.- svg = svg.replace(b'width="1em"', b'width="24"').replace(b'height="1em"', b'height="24"')- image = "data:image/svg+xml," + base64.b64encode(svg).decode()- else:+ if matches:+ for base in matches:+ file = pick_variant(base, fam[base], args.variant)+ url = f"{cdn}{file}.svg"+ if args.embed:+ try:+ svg = urllib.request.urlopen(url, timeout=15).read()+ except Exception as exc: # noqa: BLE001 - report and skip+ sys.stderr.write(f"warning: could not fetch {url} ({exc})\n")+ continue+ # Rewrite the 1em intrinsic size so draw.io scales the inlined SVG.+ svg = svg.replace(b'width="1em"', b'width="24"').replace(b'height="1em"', b'height="24"')+ image = "data:image/svg+xml," + base64.b64encode(svg).decode()+ else:+ image = url+ results.append({"brand": base, "file": file, "w": args.size, "h": args.size,+ "style": STYLE + image})+ else:+ # lobe has no logo for this brand; fall back to the simple-icons supplement.+ brand = search_supplement(args.query)+ if brand:+ slug = _SUPPLEMENT[brand]+ url = _SIMPLEICONS_CDN + slugimage = url- results.append({"brand": base, "file": file, "w": args.size, "h": args.size,- "style": STYLE + image})+ if args.embed:+ try:+ svg = urllib.request.urlopen(url, timeout=15).read()+ image = "data:image/svg+xml," + base64.b64encode(svg).decode()+ except Exception as exc: # noqa: BLE001 - keep the CDN URL+ sys.stderr.write(f"warning: could not fetch {url} ({exc}); using CDN URL\n")+ results.append({"brand": brand, "file": f"simpleicons:{slug}",+ "w": args.size, "h": args.size, "style": STYLE + image})++ if not results:+ sys.exit(f"no logo for {args.query!r} — for a data store try a cylinder "+ f"(shape=cylinder3) or shapesearch.py '{args.query} database'")if args.json:print(json.dumps(results, indent=2, ensure_ascii=False))