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
Add SysML diagram preset (bdd/ibd/req/par) — closes #83 (#84)
Agents365.aidb163fe5632f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5b6ce43..15b677d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,21 @@ All notable changes to **drawio-skill** are documented here. The format is basedon [Keep a Changelog](https://keepachangelog.com/), and the project followssemantic-ish versioning (the `version:` field in `skills/drawio-skill/SKILL.md`).+## [1.29.0] — 2026-07-13+### Added+- **SysML diagram preset** ([#83](https://github.com/Agents365-ai/drawio-skill/issues/83)) —+ new SysML section in `references/diagram-types.md` covering the four SysML-unique+ diagram kinds: Block Definition (bdd, «block» compartments + composite/reference+ associations), Internal Block (ibd, parts + `mxgraph.sysml.port` ports + item flows),+ Requirement (req, id/text compartments + containment/satisfy/derive/verify/refine+ edges), and Parametric (par, constraint blocks + binding connectors). Behavioral+ SysML diagrams (activity, state machine, use case, sequence) reuse the UML presets;+ the shape index already ships ~60 native `mxgraph.sysml.*` shapes, discoverable via+ `shapesearch.py "sysml <keyword>"`.+- SysML / MBSE trigger phrases in the SKILL.md frontmatter description and a SysML row+ in the diagram-type dispatch table, so "SysML", "block definition diagram",+ "requirement diagram", "parametric diagram", "MBSE" requests route to the new preset.+## [1.28.1] — 2026-07-10### Changed- **Refreshed the `vs Other draw.io Skills & Tools` comparison** (README, README_CN,diff --git a/README.md b/README.mdindex a3aa4ca..b2adee2 100644--- a/README.md+++ b/README.md@@ -21,7 +21,7 @@ A skill that turns natural-language descriptions into `.drawio` XML and exports## ✨ Highlights-- **7 diagram type presets** — ERD, UML Class, Sequence, C4, Architecture, ML/Deep Learning, Flowchart+- **8 diagram type presets** — ERD, UML Class, Sequence, C4, Architecture, ML/Deep Learning, Flowchart, SysML (BDD / IBD / Requirement / Parametric)- **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- **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- **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)@@ -226,6 +226,7 @@ Layout needs Graphviz (`brew install graphviz` / `apt install graphviz`) — opt| ML / Deep Learning | Transformer, CNN, LSTM, GRU | Tensor shape annotations, layer-type color coding || Flowcharts | business processes, workflows, decision trees, state machines | Semantic shapes (parallelogram I/O, diamond decisions) || UML | class diagrams, sequence diagrams | Inheritance / composition / aggregation arrows; lifelines + activation boxes |+| SysML / MBSE | block definition (bdd), internal block (ibd), requirement (req), parametric (par) | «block» / «requirement» compartments, satisfy/derive/verify edges, native `mxgraph.sysml.*` ports & flows || Data | ER diagrams, data flow diagrams (DFD) | Table containers, PK/FK notation || Mermaid-authored | mind maps, gantt, timeline, journey, pie, sankey, kanban + 20 more | Native CLI conversion (≥ v30) — structure only, layout free || Other | org charts, wireframes | — |diff --git a/README_CN.md b/README_CN.mdindex 7505d54..ea1206b 100644--- a/README_CN.md+++ b/README_CN.md@@ -21,7 +21,7 @@## ✨ 核心亮点-- **7 种图表类型预设** —— ER 图、UML 类图、序列图、C4、架构图、ML/深度学习、流程图+- **8 种图表类型预设** —— ER 图、UML 类图、序列图、C4、架构图、ML/深度学习、流程图、SysML(BDD / IBD / 需求图 / 参数图)- **Mermaid → 原生 .drawio**(draw.io ≥ 30)—— 28 种标准类型直接用 Mermaid 文本作图(**mindmap、gantt、timeline、journey、pie、sankey、kanban**……),CLI 原生转成已布局、可编辑的 `.drawio` —— 只管结构,布局白送- **可视化代码库** —— 提取并自动布局一个 Python / JS-TS / Go / Rust 项目的结构(导入关系图)或 Python 类继承层级 —— Graphviz 布点、传递约简、按子包嵌套的容器- **IaC → 架构图** —— 把 **Terraform** 配置、**Kubernetes** manifest 或 **docker-compose** 文件直接变成架构图,每个资源渲染为**官方 AWS / Azure / GCP / K8s 图标**,连线来自真实引用(role ARN、selector、volume 挂载)@@ -224,6 +224,7 @@ python3 scripts/autolayout.py graph.json -o diagram.drawio| ML / 深度学习 | Transformer、CNN、LSTM、GRU | 张量形状标注、层类型配色 || 流程图 | 业务流程、工作流、决策树、状态机 | 语义形状(平行四边形 I/O、菱形判断) || UML | 类图、序列图 | 继承 / 组合 / 聚合箭头;生命线 + 激活框 |+| SysML / MBSE | 模块定义图(bdd)、内部模块图(ibd)、需求图(req)、参数图(par) | «block» / «requirement» 分栏、satisfy/derive/verify 依赖边、原生 `mxgraph.sysml.*` 端口与流 || 数据图 | ER 图、数据流图(DFD) | 表容器、PK/FK 标记 || Mermaid 作图 | 思维导图、甘特图、timeline、journey、饼图、桑基图、看板等 28 种 | CLI(≥ v30)原生转换 —— 只写结构,布局白送 || 其他 | 组织架构图、线框图 | — |diff --git a/skills/drawio-skill/SKILL.md b/skills/drawio-skill/SKILL.mdindex 5ade2d9..4d1a667 100644--- a/skills/drawio-skill/SKILL.md+++ b/skills/drawio-skill/SKILL.md@@ -1,7 +1,7 @@---name: drawio-skill-version: 1.28.2-description: Use when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, network topology, cloud architecture from Terraform or Kubernetes manifests, 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.+version: 1.29.0+description: Use when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, SysML / MBSE diagrams (block definition, internal block, requirement, parametric), network topology, cloud architecture from Terraform or Kubernetes manifests, 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).@@ -37,7 +37,7 @@ When the workflow references one of these, read it on demand — none of them ne| `references/toolbox.md` | You're **not sure which bundled script fits** a request, or want to chain several — a map of all 28 scripts grouped by use-case (author / import code / import IaC / import API spec / live infra / compare / annotate / reverse-export / utilities) with an "I have X, I want Y → use Z" guide || `references/xml-authoring.md` | You're about to **hand-write `.drawio` XML** (workflow step 3) — file skeleton, shape/edge cells, containers, connection distribution, palette, spacing/grid rules. Not needed when a bundled generator writes the XML || `references/mermaid-authoring.md` | The diagram is a **standard type with no custom styling/icon needs** (flowchart, state, gantt, mindmap, timeline, journey, pie, …) and the CLI is **≥ v30** — author it as Mermaid text and let the CLI convert to native `.drawio` (structure only, layout free). Also documents the CLI's ELK `--layout` pass for XML |-| `references/diagram-types.md` | The user names a specific diagram type (ERD, UML class, sequence, C4, architecture, ML/DL, flowchart) |+| `references/diagram-types.md` | The user names a specific diagram type (ERD, UML class, sequence, C4, architecture, ML/DL, flowchart, SysML) || `references/shapes.md` + `scripts/shapesearch.py` | The diagram needs a **specific shape** — a cloud icon (AWS/Azure/GCP), Cisco/Kubernetes/network symbol, UML/BPMN/ER/electrical/P&ID element — or any time you'd otherwise guess a `style=` string. `shapesearch.py "<keywords>"` returns the exact official style for 10k+ shapes || `scripts/aiicons.py` | The diagram involves an **AI/LLM brand** (OpenAI, Claude, Gemini, Mistral, Llama, HuggingFace, Ollama, LangChain, …) — `aiicons.py "<brand>"` returns a draw.io `image` style for the brand logo (lobe-icons via CDN; `--embed` to inline). draw.io has no built-in AI logos. See `references/shapes.md` → "AI / LLM brand logos" || `references/style-presets.md` | The user asks to learn / save / list / set-default / delete a style preset, or you've resolved an active preset and need the application rules |@@ -93,7 +93,7 @@ Install draw.io desktop if missing:## WorkflowBefore starting the workflow, assess whether the user's request is specific enough. If key details are missing, ask 1-3 focused questions:-- **Diagram type** — which preset? (ERD, UML, Sequence, Architecture, ML/DL, Flowchart, or general)+- **Diagram type** — which preset? (ERD, UML, Sequence, Architecture, ML/DL, Flowchart, SysML, or general)- **Output format** — PNG (default), SVG, PDF, or JPG?- **Output location** — default is the user's working dir; honor any explicit path the user gives (e.g. "put it in `./artifacts/`"). Don't ask if they didn't mention one.- **Scope/fidelity** — how many components? Any specific technologies or labels?@@ -327,5 +327,6 @@ When the user requests a specific diagram type, read `references/diagram-types.m| "neural network", "model architecture", "ML diagram", "deep learning" | ML / Deep Learning Model || "flowchart", "decision tree", "process flow" | Flowchart || "C4", "system context diagram", "container diagram", "component diagram" | C4 Model |+| "SysML", "MBSE", "block definition diagram", "internal block diagram", "requirement diagram", "parametric diagram" | SysML |The diagram-type preset sets **structural** style keywords. If a user style preset is also active (see `## Style Presets`), keep the structural keywords and layer color/font/edge/extras on top — read `references/style-presets.md` → "Interaction with diagram-type presets" for the merge rules.diff --git a/skills/drawio-skill/references/diagram-types.md b/skills/drawio-skill/references/diagram-types.mdindex 02be470..3c4fab1 100644--- a/skills/drawio-skill/references/diagram-types.md+++ b/skills/drawio-skill/references/diagram-types.md@@ -3,7 +3,7 @@When the user requests a specific diagram type, apply the matching preset below for shapes, styles, and layout conventions. These presets set **structural** style keywords (e.g. ERD's `shape=table;childLayout=tableLayout`); a user style preset (see `references/style-presets.md`) layers color/font/edge/extras on top.Read this file when:-- The user names one of these diagram types (ERD, UML class, sequence, C4, architecture, ML/DL model, flowchart)+- The user names one of these diagram types (ERD, UML class, sequence, C4, architecture, ML/DL model, flowchart, SysML)- You're choosing shape vocabulary or layout direction for a new diagram## ERD (Entity-Relationship Diagram)@@ -91,6 +91,52 @@ For neural network architecture diagrams — ideal for papers targeting NeurIPS,**Tensor shape convention:** annotate each layer with input/output tensor dimensions in `(B, C, H, W)` or `(B, T, D)` format. Place dimensions as the second line of the label using `
`.+## SysML (Block Definition / Internal Block / Requirement / Parametric)++draw.io ships a native SysML 1.x shape library (`mxgraph.sysml.*`, ~60 shapes) — run `python3 scripts/shapesearch.py "sysml <keyword>"` for any element not listed below. Stereotype labels use guillemets as the first label line: `«block»` (HTML entities for « »). SysML behavioral diagrams (activity, state machine, use case, sequence) reuse the UML presets above; search `shapesearch.py "sysml activity"` / `"sysml state"` for the SysML-specific variants.++### Block Definition Diagram (bdd)++| Element | Style | Notes |+|---------|-------|-------|+| Block | `swimlane;fontStyle=1;align=center;startSize=40;html=1;` | Label `«block»
Name`; compartments (values / parts / operations) like UML class |+| Compartment separator | same `line;...` style as UML Class | Between compartments |+| Composite association | `html=1;endArrow=none;startArrow=diamondThin;startFill=1;` | Filled diamond at the whole (owner) end |+| Reference association | `html=1;endArrow=none;startArrow=diamondThin;startFill=0;` | Hollow diamond |+| Generalization | `edgeStyle=none;html=1;endArrow=block;endFill=0;endSize=12;` | Hollow triangle pointing at the parent block |+| Multiplicity | edge labels `1`, `0..1`, `1..*` near the ends | Offset with edge label geometry |+| Layout | TB, whole block on top, part blocks below, 250px apart | Same convention as UML class |++### Internal Block Diagram (ibd)++| Element | Style | Notes |+|---------|-------|-------|+| Frame | `rounded=0;html=1;verticalAlign=top;align=left;spacingLeft=10;fontStyle=1;container=1;` | Label `ibd [block] Name`; parts are children |+| Part | `rounded=0;whiteSpace=wrap;html=1;` | Label `partName : BlockType` |+| Port | `html=1;shape=mxgraph.sysml.port;sysMLPortType=flowN;` 20×20 | Child of the part, relative geometry pinned to its border |+| Connector | `html=1;endArrow=none;` | Solid line port-to-port |+| Item flow direction | `shape=triangle;fillColor=strokeColor;` 10×10 on the connector + item label | Triangle points along the flow |++### Requirement Diagram (req)++| Element | Style | Notes |+|---------|-------|-------|+| Requirement | `swimlane;fontStyle=1;align=center;startSize=26;html=1;` | Title `«requirement»
Name`; body compartment `id="R1.1"
text="..."` |+| Containment | `edgeStyle=none;html=1;startArrow=sysMLPackCont;startSize=12;endArrow=none;` | Crosshair-circle at the parent end |+| deriveReqt / satisfy / verify / refine | `html=1;endArrow=open;endSize=12;dashed=1;` + edge label `«satisfy»` | Dashed open arrow pointing at the requirement |+| Trace | same dashed style, label `«trace»` | |+| Layout | TB, parent requirements above children, 200px apart | Satisfy/verify sources (blocks, test cases) at the bottom |++### Parametric Diagram (par)++| Element | Style | Notes |+|---------|-------|-------|+| Constraint block | `rounded=1;whiteSpace=wrap;html=1;` | Label `«constraint»
{F = m · a}` |+| Parameter port | `rounded=0;html=1;fontSize=10;` 20×20 on the border | Label = parameter name (`m`, `a`, `F`) |+| Binding connector | `html=1;endArrow=none;` | Solid, no arrows |+| Value property | `rounded=0;whiteSpace=wrap;html=1;` | Label `name : Type` |+| Layout | LR, value properties on the outside, constraints centered | |+## Flowchart (enhanced)| Element | Style | Notes |