[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77MBT2X3NHRD18QF49FFVT8":3,"skill-same:01M77MBT2X3NHRD18QF49FFVT8":100},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77MBT2X3NHRD18QF49FFVT8","draw-io-diagram-generator",null,"Use when creating, editing, or generating draw.io diagram files (.drawio, .drawio.svg, .drawio.png). Covers mxGraph XML authoring, shape libraries, style strings, flowcharts, system architecture, sequence diagrams, ER diagrams, UML class diagrams, network topology, layout strategy, the hediet.vscode-drawio VS Code extension, and the full agent workflow from request to a ready-to-open file.","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: draw-io-diagram-generator\ndescription: Use when creating, editing, or generating draw.io diagram files (.drawio, .drawio.svg, .drawio.png). Covers mxGraph XML authoring, shape libraries, style strings, flowcharts, system architecture, sequence diagrams, ER diagrams, UML class diagrams, network topology, layout strategy, the hediet.vscode-drawio VS Code extension, and the full agent workflow from request to a ready-to-open file.\n---\n\n# Draw.io Diagram Generator\n\nThis skill enables you to generate, edit, and validate draw.io (`.drawio`) diagram files with\ncorrect mxGraph XML structure. All generated files open immediately in the\n[Draw.io VS Code extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=hediet.vscode-drawio)\n(`hediet.vscode-drawio`) without any manual fixes required. You can also open the files in the draw.io web app or desktop app if you prefer.\n\n---\n\n## 1. When to Use This Skill\n\n**Trigger phrases (load this skill when you see these)**\n\n- \"create a diagram\", \"draw a flowchart\", \"generate an architecture diagram\"\n- \"design a sequence diagram\", \"make a UML class diagram\", \"build an ER diagram\"\n- \"add a .drawio file\", \"update the diagram\", \"visualise the flow\"\n- \"document the architecture\", \"show the data model\", \"diagram the service interactions\"\n- Any request to produce or modify a `.drawio`, `.drawio.svg`, or `.drawio.png` file\n\n**Supported diagram types**\n\n| Diagram Type | Template Available | Description |\n|---|---|---|\n| Flowchart | `assets\u002Ftemplates\u002Fflowchart.drawio` | Process flows with decisions and branches |\n| System Architecture | `assets\u002Ftemplates\u002Farchitecture.drawio` | Multi-tier \u002F layered service architecture |\n| Sequence Diagram | `assets\u002Ftemplates\u002Fsequence.drawio` | Actor lifelines and timed message flows |\n| ER Diagram | `assets\u002Ftemplates\u002Fer-diagram.drawio` | Database tables with relationships |\n| UML Class Diagram | `assets\u002Ftemplates\u002Fuml-class.drawio` | Classes, interfaces, enums, relationships |\n| Network Topology | (use shape library) | Routers, servers, firewalls, subnets |\n| BPMN Workflow | (use shape library) | Business process events, tasks, gateways |\n| Mind Map | (manual) | Central topic with radiating branches |\n\n---\n\n## 2. Prerequisites\n\n- If running with VS Code integration enabled, Install the drawio extension: **draw.io VS Code extension** — `hediet.vscode-drawio` (extension id). Install with:\n  ```\n  ext install hediet.vscode-drawio\n  ```\n- **Supported file extensions**: `.drawio`, `.drawio.svg`, `.drawio.png`\n- **Python 3.8+** (optional) — for the validation and shape-insertion scripts in `scripts\u002F`\n\n---\n\n## 3. Step-by-Step Agent Workflow\n\nFollow these steps in order for every diagram generation task.\n\n### Step 1 — Understand the Request\n\nAsk or infer:\n1. **Diagram type** — What kind of diagram? (flowchart, architecture, UML, ER, sequence, network...)\n2. **Entities \u002F actors** — What are the main components, actors, classes, or tables?\n3. **Relationships** — How are they connected? What direction? What cardinality?\n4. **Output path** — Where should the `.drawio` file be saved?\n5. **Existing file** — Are we creating new or editing an existing file?\n\nIf the request is ambiguous, infer the most sensible diagram type from context (e.g. \"show the tables\" → ER diagram, \"show how the API call flows\" → sequence diagram).\n\n### Step 2 — Select a Template or Start Fresh\n\n- **Use a template** when the diagram type matches one in `assets\u002Ftemplates\u002F`. Copy the template structure and replace placeholder values.\n- **Start fresh** for novel layouts. Begin with the minimal valid skeleton:\n\n```xml\n\u003C!-- Set modified=\"\" to the current ISO 8601 timestamp when generating a new file -->\n\u003Cmxfile host=\"Electron\" modified=\"\" version=\"26.0.0\">\n  \u003Cdiagram id=\"page-1\" name=\"Page-1\">\n    \u003CmxGraphModel dx=\"1422\" dy=\"762\" grid=\"1\" gridSize=\"10\" guides=\"1\"\n                  tooltips=\"1\" connect=\"1\" arrows=\"1\" fold=\"1\"\n                  page=\"1\" pageScale=\"1\" pageWidth=\"1169\" pageHeight=\"827\"\n                  math=\"0\" shadow=\"0\">\n      \u003Croot>\n        \u003CmxCell id=\"0\" \u002F>\n        \u003CmxCell id=\"1\" parent=\"0\" \u002F>\n        \u003C!-- Your cells go here -->\n      \u003C\u002Froot>\n    \u003C\u002FmxGraphModel>\n  \u003C\u002Fdiagram>\n\u003C\u002Fmxfile>\n```\n\n> **Rule**: ids `0` and `1` are ALWAYS required and must be the first two cells. Never reuse them.\n\n### Step 3 — Plan the Layout\n\nBefore generating XML, sketch the logical placement:\n- Organise into **rows** or **tiers** (use swimlanes for layers)\n- **Horizontal spacing**: 40–60px between same-row shapes\n- **Vertical spacing**: 80–120px between tier rows\n- Standard shape size: `120x60` px for process boxes, `160x80` px for swimlanes\n- Default canvas: A4 landscape = `1169 x 827` px\n\n### Step 4 — Generate the mxGraph XML\n\n**Vertex cell** (every shape):\n```xml\n\u003CmxCell id=\"unique-id\" value=\"Label\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"100\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n**Edge cell** (every connector):\n```xml\n\u003CmxCell id=\"edge-id\" value=\"Label (optional)\"\n        style=\"edgeStyle=orthogonalEdgeStyle;html=1;\"\n        edge=\"1\" source=\"source-id\" target=\"target-id\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n**Critical rules**:\n- Every cell id must be **globally unique** within the file\n- Every vertex must have an `mxGeometry` child with `x`, `y`, `width`, `height`, `as=\"geometry\"`\n- Every edge must have `source` and `target` matching existing vertex ids — **exception**: floating edges (e.g. sequence diagram lifelines) use `sourcePoint`\u002F`targetPoint` inside `\u003CmxGeometry>` instead; see §4 Sequence Diagram\n- Every cell's `parent` must reference an existing cell id\n- Use `html=1` in style when the label contains HTML (`\u003Cb>`, `\u003Ci>`, `\u003Cbr>`)\n- Escape XML special characters in labels: `&` => `&amp;`, `\u003C` => `&lt;`, `>` => `&gt;`\n\n### Step 5 — Apply Correct Styles\n\nUse the standard semantic color palette for consistency:\n\n| Purpose | fillColor | strokeColor |\n|---|---|---|\n| Primary \u002F Info | `#dae8fc` | `#6c8ebf` |\n| Success \u002F Start | `#d5e8d4` | `#82b366` |\n| Warning \u002F Decision | `#fff2cc` | `#d6b656` |\n| Error \u002F End | `#f8cecc` | `#b85450` |\n| Neutral | `#f5f5f5` | `#666666` |\n| External \u002F Partner | `#e1d5e7` | `#9673a6` |\n\nCommon style strings by diagram type:\n\n```\n# Rounded process box (flowchart)\nrounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\n\n# Decision diamond\nrhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\n\n# Start\u002FEnd terminal\nellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;\n\n# Database cylinder\nshape=mxgraph.flowchart.database;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;\n\n# Swimlane container (tier)\nswimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;\n\n# UML class box\nswimlane;fontStyle=1;align=center;startSize=40;fillColor=#dae8fc;strokeColor=#6c8ebf;\n\n# Interface \u002F stereotype box\nswimlane;fontStyle=3;align=center;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;\n\n# ER table container\nshape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;\n\n# Orthogonal connector\nedgeStyle=orthogonalEdgeStyle;html=1;\n\n# ER relationship (crow's foot)\nedgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERmany;startArrow=ERone;\n```\n\n> See `references\u002Fstyle-reference.md` for the complete style key catalog and `references\u002Fshape-libraries.md` for all shape library names.\n\n### Step 6 — Save and Validate\n\n1. **Write the file** to the requested path with `.drawio` extension\n2. **Run the validator** (optional but recommended):\n   ```bash\n   python .github\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fvalidate-drawio.py \u003Cpath-to-file.drawio>\n   ```\n3. **Tell the user** how to open the file:\n   > \"Open `\u003Cfilename>` in VS Code — it will render automatically with the draw.io extension. You can use draw.io's web app or desktop app as well if you prefer.\"\n4. **Provide a brief description** of what is in the diagram so the user knows what to expect.\n\n---\n\n## 4. Diagram-Type Recipes\n\n### Flowchart\n\nKey elements: Start (ellipse) => Process (rounded rectangle) => Decision (diamond) => End (ellipse)\n\n```xml\n\u003C!-- Start node -->\n\u003CmxCell id=\"start\" value=\"Start\"\n        style=\"ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"500\" y=\"80\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Process -->\n\u003CmxCell id=\"p1\" value=\"Process Step\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"500\" y=\"200\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Decision -->\n\u003CmxCell id=\"d1\" value=\"Condition?\"\n        style=\"rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"460\" y=\"320\" width=\"200\" height=\"100\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Arrow: start to p1 -->\n\u003CmxCell id=\"e1\" value=\"\"\n        style=\"edgeStyle=orthogonalEdgeStyle;html=1;\"\n        edge=\"1\" source=\"start\" target=\"p1\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n### Architecture Diagram (3-tier)\n\nUse **swimlane containers** for each tier. All service boxes are children of their swimlane.\n\n```xml\n\u003C!-- Tier swimlane -->\n\u003CmxCell id=\"tier1\" value=\"Client Layer\"\n        style=\"swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"60\" y=\"100\" width=\"1050\" height=\"130\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Service inside tier (parent=\"tier1\", coords are relative to tier) -->\n\u003CmxCell id=\"webapp\" value=\"Web App\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"tier1\">\n  \u003CmxGeometry x=\"80\" y=\"40\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n> Connectors between tiers use absolute coordinates with `parent=\"1\"`.\n\n### Sequence Diagram\n\nKey elements: Actors (top), Lifelines (dashed vertical lines), Activation boxes, Message arrows.\n\n- Lifelines: `edge=\"1\"` with `endArrow=none` and `dashed=1`, no source\u002Ftarget — use `sourcePoint`\u002F`targetPoint` in geometry\n- Synchronous message: `endArrow=block;endFill=1`\n- Return message: `endArrow=open;endFill=0;dashed=1`\n- Self-call: loop the edge via two Array points to the right and back\n\n**Minimal XML snippet:**\n\n```xml\n\u003C!-- Actor (stick figure) -->\n\u003CmxCell id=\"actorA\" value=\"Client\"\n        style=\"shape=mxgraph.uml.actor;pointerEvents=1;dashed=0;whiteSpace=wrap;html=1;aspect=fixed;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"110\" y=\"80\" width=\"60\" height=\"80\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Service box -->\n\u003CmxCell id=\"actorB\" value=\"API Server\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"480\" y=\"100\" width=\"160\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Lifeline — floating edge: uses sourcePoint\u002FtargetPoint, NOT source\u002Ftarget attributes -->\n\u003CmxCell id=\"lifA\" value=\"\"\n        style=\"edgeStyle=none;dashed=1;endArrow=none;\"\n        edge=\"1\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\">\n    \u003CmxPoint x=\"140\" y=\"160\" as=\"sourcePoint\" \u002F>\n    \u003CmxPoint x=\"140\" y=\"700\" as=\"targetPoint\" \u002F>\n  \u003C\u002FmxGeometry>\n\u003C\u002FmxCell>\n\n\u003C!-- Activation box (thin rectangle on lifeline) -->\n\u003CmxCell id=\"actA1\" value=\"\"\n        style=\"fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"130\" y=\"220\" width=\"20\" height=\"180\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Synchronous message -->\n\u003CmxCell id=\"msg1\" value=\"POST \u002Forders\"\n        style=\"edgeStyle=elbowEdgeStyle;elbow=vertical;html=1;endArrow=block;endFill=1;\"\n        edge=\"1\" source=\"actA1\" target=\"actorB\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Return message (dashed) -->\n\u003CmxCell id=\"msg2\" value=\"201 Created\"\n        style=\"edgeStyle=elbowEdgeStyle;elbow=vertical;dashed=1;html=1;endArrow=open;endFill=0;\"\n        edge=\"1\" source=\"actorB\" target=\"actA1\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n> **Note:** Lifelines are floating edges that use `sourcePoint`\u002F`targetPoint` in `\u003CmxGeometry>` instead of `source`\u002F`target` attributes. This is the standard draw.io pattern for sequence diagrams.\n\n### ER Diagram\n\nUse `shape=table` containers with `childLayout=tableLayout`. Rows are `shape=tableRow` cells with `portConstraint=eastwest`. Columns inside each row are `shape=partialRectangle`.\n\nRelationship arrows use `edgeStyle=entityRelationEdgeStyle`:\n- One-to-One: `startArrow=ERone;endArrow=ERone`\n- One-to-Many: `startArrow=ERone;endArrow=ERmany`\n- Many-to-Many: `startArrow=ERmany;endArrow=ERmany`\n- Mandatory: `ERmandOne`, Optional: `ERzeroToOne`\n\n### UML Class Diagram\n\nClass boxes are swimlane containers. Attributes and methods are plain text cells. Dividers are zero-height swimlane children.\n\nArrow styles by relationship type:\n\n| Relationship | Style String |\n|---|---|\n| Inheritance (extends) | `edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;endFill=0;` |\n| Realization (implements) | `edgeStyle=orthogonalEdgeStyle;dashed=1;html=1;endArrow=block;endFill=0;` |\n| Composition | `edgeStyle=orthogonalEdgeStyle;html=1;startArrow=diamond;startFill=1;endArrow=none;` |\n| Aggregation | `edgeStyle=orthogonalEdgeStyle;html=1;startArrow=diamond;startFill=0;endArrow=none;` |\n| Dependency | `edgeStyle=orthogonalEdgeStyle;dashed=1;html=1;endArrow=open;endFill=0;` |\n| Association | `edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open;endFill=0;` |\n\n---\n\n## 5. Multi-Page Diagrams\n\nAdd multiple `\u003Cdiagram>` elements for complex systems:\n\n```xml\n\u003Cmxfile host=\"Electron\" version=\"26.0.0\">\n  \u003Cdiagram id=\"overview\" name=\"Overview\">\n    \u003C!-- overview mxGraphModel -->\n  \u003C\u002Fdiagram>\n  \u003Cdiagram id=\"detail\" name=\"Detail View\">\n    \u003C!-- detail mxGraphModel -->\n  \u003C\u002Fdiagram>\n\u003C\u002Fmxfile>\n```\n\nEach page has its own independent cell id namespace. The same id value can appear in different pages without conflict.\n\n---\n\n## 6. Editing Existing Diagrams\n\nWhen modifying an existing `.drawio` file:\n\n1. **Read** the file first to understand existing cell ids, positions, and parent hierarchy\n2. **Identify the target diagram page** — by index or `name` attribute\n3. **Assign new unique ids** that do not collide with existing ids\n4. **Respect the container hierarchy** — children of a swimlane use coordinates relative to their parent\n5. **Verify edges** — after repositioning nodes, confirm edge source\u002Ftarget ids remain valid\n\nUse `scripts\u002Fadd-shape.py` to safely add a single shape without editing raw XML:\n```bash\npython .github\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fadd-shape.py docs\u002Farch.drawio \"New Service\" 700 380\n```\n\n---\n\n## 7. Best Practices\n\n**Layout**\n- Align shapes to the 10px grid (all coordinates divisible by 10)\n- Group related shapes inside swimlane containers\n- One diagram topic per page; use multi-page files for complex systems\n- Aim for 40 or fewer cells per page for readability\n\n**Labels**\n- Add a title text cell (`text;strokeColor=none;fillColor=none;fontSize=18;fontStyle=1`) at top of every page\n- Always set `whiteSpace=wrap;html=1` on vertex shapes\n- Keep labels concise — 3 words or fewer per shape where possible\n\n**Style consistency**\n- Use the semantic color palette from Section 3 Step 5 consistently across a project\n- Prefer `edgeStyle=orthogonalEdgeStyle` for clean right-angle connectors\n- Do not inline arbitrary HTML in labels unless necessary\n\n**File naming**\n- Use kebab-case: `order-service-flow.drawio`, `database-schema.drawio`\n- Place diagrams alongside the code they document: `docs\u002F` or `architecture\u002F`\n\n---\n\n## 8. Troubleshooting\n\n| Problem | Likely Cause | Fix |\n|---|---|---|\n| File opens blank in VS Code | Missing id=0 or id=1 cell | Add both root cells before any other cells |\n| Shape at wrong position | Child inside container — coords are relative | Check `parent`; adjust x\u002Fy relative to container |\n| Edge not visible | source or target id does not match any vertex | Verify both ids exist exactly as written |\n| Diagram shows \"Compressed\" | mxGraphModel is base64-encoded | Open in draw.io web, File > Export > XML (uncompressed) |\n| Shape style not rendering | Typo in shape= name | Check `references\u002Fshape-libraries.md` for exact style string |\n| Label shows escaped HTML | html=0 on a cell with HTML label | Add `html=1;` to the cell style |\n| Container children overlap container edge | Container height too small | Increase container height in mxGeometry |\n\n---\n\n## 9. Validation Checklist\n\nBefore delivering any generated `.drawio` file, verify:\n\n- [ ] File starts with `\u003Cmxfile>` root element\n- [ ] Every `\u003Cdiagram>` has a non-empty `id` attribute\n- [ ] `\u003CmxCell id=\"0\" \u002F>` is the first cell in every diagram\n- [ ] `\u003CmxCell id=\"1\" parent=\"0\" \u002F>` is the second cell in every diagram\n- [ ] All cell `id` values are unique within each diagram\n- [ ] Every vertex cell has `vertex=\"1\"` and a child `\u003CmxGeometry as=\"geometry\">`\n- [ ] Every edge cell has `edge=\"1\"` and either: (a) `source`\u002F`target` pointing to existing vertex ids, or (b) `\u003CmxPoint as=\"sourcePoint\">` and `\u003CmxPoint as=\"targetPoint\">` in its `\u003CmxGeometry>` (floating edge — used for sequence diagram lifelines)\n- [ ] Every cell (except id=0) has a `parent` pointing to an existing id\n- [ ] `html=1` is in the style for any label containing HTML tags\n- [ ] XML is well-formed (no unclosed tags, no unescaped `&`, `\u003C`, `>` in attribute values)\n- [ ] A title label cell exists at the top of each page\n\nRun the automated validator:\n```bash\npython .github\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fvalidate-drawio.py \u003Cfile.drawio>\n```\n\n---\n\n## 10. Output Format\n\nWhen delivering a diagram, always provide:\n\n1. **The `.drawio` file** written to the requested path\n2. **A one-sentence summary** of what the diagram shows\n3. **How to open it**:\n   > \"Open `\u003Cfilename>` in VS Code — the draw.io extension will render it automatically. Or you can open it in the draw.io web app or desktop app if you prefer.\"\n4. **How to edit it** (if the user is likely to customise):\n   > \"Click any shape to select it. Double-click to edit the label. Drag to reposition.\"\n5. **Validation status** — whether the validator script was run and passed\n\n---\n\n## 11. References\n\nAll companion files are in `.github\u002Fskills\u002Fdraw-io-diagram-generator\u002F`:\n\n| File | Contents |\n|---|---|\n| `references\u002Fdrawio-xml-schema.md` | Complete mxfile \u002F mxGraphModel \u002F mxCell attribute reference, coordinate system, reserved cells, validation rules |\n| `references\u002Fstyle-reference.md` | All style keys with allowed values, vertex and edge style keys, shape catalog, semantic color palette |\n| `references\u002Fshape-libraries.md` | All shape library categories (General, Flowchart, UML, ER, Network, BPMN, Mockup, K8s) with style strings |\n| `assets\u002Ftemplates\u002Fflowchart.drawio` | Ready-to-use flowchart template |\n| `assets\u002Ftemplates\u002Farchitecture.drawio` | 4-tier system architecture template |\n| `assets\u002Ftemplates\u002Fsequence.drawio` | 3-actor sequence diagram template |\n| `assets\u002Ftemplates\u002Fer-diagram.drawio` | 3-table ER diagram with crow's foot relationships |\n| `assets\u002Ftemplates\u002Fuml-class.drawio` | Interface + 2 classes + enum with relationship arrows |\n| `scripts\u002Fvalidate-drawio.py` | Python script to validate XML structure of any .drawio file |\n| `scripts\u002Fadd-shape.py` | Python CLI to add a new shape to an existing diagram |\n| `scripts\u002FREADME.md` | How to use the scripts with examples |\n","# Draw.io Diagram Generator\n\nThis skill enables you to generate, edit, and validate draw.io (`.drawio`) diagram files with\ncorrect mxGraph XML structure. All generated files open immediately in the\n[Draw.io VS Code extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=hediet.vscode-drawio)\n(`hediet.vscode-drawio`) without any manual fixes required. You can also open the files in the draw.io web app or desktop app if you prefer.\n\n---\n\n## 1. When to Use This Skill\n\n**Trigger phrases (load this skill when you see these)**\n\n- \"create a diagram\", \"draw a flowchart\", \"generate an architecture diagram\"\n- \"design a sequence diagram\", \"make a UML class diagram\", \"build an ER diagram\"\n- \"add a .drawio file\", \"update the diagram\", \"visualise the flow\"\n- \"document the architecture\", \"show the data model\", \"diagram the service interactions\"\n- Any request to produce or modify a `.drawio`, `.drawio.svg`, or `.drawio.png` file\n\n**Supported diagram types**\n\n| Diagram Type | Template Available | Description |\n|---|---|---|\n| Flowchart | `assets\u002Ftemplates\u002Fflowchart.drawio` | Process flows with decisions and branches |\n| System Architecture | `assets\u002Ftemplates\u002Farchitecture.drawio` | Multi-tier \u002F layered service architecture |\n| Sequence Diagram | `assets\u002Ftemplates\u002Fsequence.drawio` | Actor lifelines and timed message flows |\n| ER Diagram | `assets\u002Ftemplates\u002Fer-diagram.drawio` | Database tables with relationships |\n| UML Class Diagram | `assets\u002Ftemplates\u002Fuml-class.drawio` | Classes, interfaces, enums, relationships |\n| Network Topology | (use shape library) | Routers, servers, firewalls, subnets |\n| BPMN Workflow | (use shape library) | Business process events, tasks, gateways |\n| Mind Map | (manual) | Central topic with radiating branches |\n\n---\n\n## 2. Prerequisites\n\n- If running with VS Code integration enabled, Install the drawio extension: **draw.io VS Code extension** — `hediet.vscode-drawio` (extension id). Install with:\n  ```\n  ext install hediet.vscode-drawio\n  ```\n- **Supported file extensions**: `.drawio`, `.drawio.svg`, `.drawio.png`\n- **Python 3.8+** (optional) — for the validation and shape-insertion scripts in `scripts\u002F`\n\n---\n\n## 3. Step-by-Step Agent Workflow\n\nFollow these steps in order for every diagram generation task.\n\n### Step 1 — Understand the Request\n\nAsk or infer:\n1. **Diagram type** — What kind of diagram? (flowchart, architecture, UML, ER, sequence, network...)\n2. **Entities \u002F actors** — What are the main components, actors, classes, or tables?\n3. **Relationships** — How are they connected? What direction? What cardinality?\n4. **Output path** — Where should the `.drawio` file be saved?\n5. **Existing file** — Are we creating new or editing an existing file?\n\nIf the request is ambiguous, infer the most sensible diagram type from context (e.g. \"show the tables\" → ER diagram, \"show how the API call flows\" → sequence diagram).\n\n### Step 2 — Select a Template or Start Fresh\n\n- **Use a template** when the diagram type matches one in `assets\u002Ftemplates\u002F`. Copy the template structure and replace placeholder values.\n- **Start fresh** for novel layouts. Begin with the minimal valid skeleton:\n\n```xml\n\u003C!-- Set modified=\"\" to the current ISO 8601 timestamp when generating a new file -->\n\u003Cmxfile host=\"Electron\" modified=\"\" version=\"26.0.0\">\n  \u003Cdiagram id=\"page-1\" name=\"Page-1\">\n    \u003CmxGraphModel dx=\"1422\" dy=\"762\" grid=\"1\" gridSize=\"10\" guides=\"1\"\n                  tooltips=\"1\" connect=\"1\" arrows=\"1\" fold=\"1\"\n                  page=\"1\" pageScale=\"1\" pageWidth=\"1169\" pageHeight=\"827\"\n                  math=\"0\" shadow=\"0\">\n      \u003Croot>\n        \u003CmxCell id=\"0\" \u002F>\n        \u003CmxCell id=\"1\" parent=\"0\" \u002F>\n        \u003C!-- Your cells go here -->\n      \u003C\u002Froot>\n    \u003C\u002FmxGraphModel>\n  \u003C\u002Fdiagram>\n\u003C\u002Fmxfile>\n```\n\n> **Rule**: ids `0` and `1` are ALWAYS required and must be the first two cells. Never reuse them.\n\n### Step 3 — Plan the Layout\n\nBefore generating XML, sketch the logical placement:\n- Organise into **rows** or **tiers** (use swimlanes for layers)\n- **Horizontal spacing**: 40–60px between same-row shapes\n- **Vertical spacing**: 80–120px between tier rows\n- Standard shape size: `120x60` px for process boxes, `160x80` px for swimlanes\n- Default canvas: A4 landscape = `1169 x 827` px\n\n### Step 4 — Generate the mxGraph XML\n\n**Vertex cell** (every shape):\n```xml\n\u003CmxCell id=\"unique-id\" value=\"Label\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"100\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n**Edge cell** (every connector):\n```xml\n\u003CmxCell id=\"edge-id\" value=\"Label (optional)\"\n        style=\"edgeStyle=orthogonalEdgeStyle;html=1;\"\n        edge=\"1\" source=\"source-id\" target=\"target-id\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n**Critical rules**:\n- Every cell id must be **globally unique** within the file\n- Every vertex must have an `mxGeometry` child with `x`, `y`, `width`, `height`, `as=\"geometry\"`\n- Every edge must have `source` and `target` matching existing vertex ids — **exception**: floating edges (e.g. sequence diagram lifelines) use `sourcePoint`\u002F`targetPoint` inside `\u003CmxGeometry>` instead; see §4 Sequence Diagram\n- Every cell's `parent` must reference an existing cell id\n- Use `html=1` in style when the label contains HTML (`\u003Cb>`, `\u003Ci>`, `\u003Cbr>`)\n- Escape XML special characters in labels: `&` => `&amp;`, `\u003C` => `&lt;`, `>` => `&gt;`\n\n### Step 5 — Apply Correct Styles\n\nUse the standard semantic color palette for consistency:\n\n| Purpose | fillColor | strokeColor |\n|---|---|---|\n| Primary \u002F Info | `#dae8fc` | `#6c8ebf` |\n| Success \u002F Start | `#d5e8d4` | `#82b366` |\n| Warning \u002F Decision | `#fff2cc` | `#d6b656` |\n| Error \u002F End | `#f8cecc` | `#b85450` |\n| Neutral | `#f5f5f5` | `#666666` |\n| External \u002F Partner | `#e1d5e7` | `#9673a6` |\n\nCommon style strings by diagram type:\n\n```\n# Rounded process box (flowchart)\nrounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\n\n# Decision diamond\nrhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\n\n# Start\u002FEnd terminal\nellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;\n\n# Database cylinder\nshape=mxgraph.flowchart.database;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;\n\n# Swimlane container (tier)\nswimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;\n\n# UML class box\nswimlane;fontStyle=1;align=center;startSize=40;fillColor=#dae8fc;strokeColor=#6c8ebf;\n\n# Interface \u002F stereotype box\nswimlane;fontStyle=3;align=center;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;\n\n# ER table container\nshape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;\n\n# Orthogonal connector\nedgeStyle=orthogonalEdgeStyle;html=1;\n\n# ER relationship (crow's foot)\nedgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERmany;startArrow=ERone;\n```\n\n> See `references\u002Fstyle-reference.md` for the complete style key catalog and `references\u002Fshape-libraries.md` for all shape library names.\n\n### Step 6 — Save and Validate\n\n1. **Write the file** to the requested path with `.drawio` extension\n2. **Run the validator** (optional but recommended):\n   ```bash\n   python .github\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fvalidate-drawio.py \u003Cpath-to-file.drawio>\n   ```\n3. **Tell the user** how to open the file:\n   > \"Open `\u003Cfilename>` in VS Code — it will render automatically with the draw.io extension. You can use draw.io's web app or desktop app as well if you prefer.\"\n4. **Provide a brief description** of what is in the diagram so the user knows what to expect.\n\n---\n\n## 4. Diagram-Type Recipes\n\n### Flowchart\n\nKey elements: Start (ellipse) => Process (rounded rectangle) => Decision (diamond) => End (ellipse)\n\n```xml\n\u003C!-- Start node -->\n\u003CmxCell id=\"start\" value=\"Start\"\n        style=\"ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"500\" y=\"80\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Process -->\n\u003CmxCell id=\"p1\" value=\"Process Step\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"500\" y=\"200\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Decision -->\n\u003CmxCell id=\"d1\" value=\"Condition?\"\n        style=\"rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"460\" y=\"320\" width=\"200\" height=\"100\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Arrow: start to p1 -->\n\u003CmxCell id=\"e1\" value=\"\"\n        style=\"edgeStyle=orthogonalEdgeStyle;html=1;\"\n        edge=\"1\" source=\"start\" target=\"p1\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n### Architecture Diagram (3-tier)\n\nUse **swimlane containers** for each tier. All service boxes are children of their swimlane.\n\n```xml\n\u003C!-- Tier swimlane -->\n\u003CmxCell id=\"tier1\" value=\"Client Layer\"\n        style=\"swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"60\" y=\"100\" width=\"1050\" height=\"130\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Service inside tier (parent=\"tier1\", coords are relative to tier) -->\n\u003CmxCell id=\"webapp\" value=\"Web App\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"tier1\">\n  \u003CmxGeometry x=\"80\" y=\"40\" width=\"120\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n> Connectors between tiers use absolute coordinates with `parent=\"1\"`.\n\n### Sequence Diagram\n\nKey elements: Actors (top), Lifelines (dashed vertical lines), Activation boxes, Message arrows.\n\n- Lifelines: `edge=\"1\"` with `endArrow=none` and `dashed=1`, no source\u002Ftarget — use `sourcePoint`\u002F`targetPoint` in geometry\n- Synchronous message: `endArrow=block;endFill=1`\n- Return message: `endArrow=open;endFill=0;dashed=1`\n- Self-call: loop the edge via two Array points to the right and back\n\n**Minimal XML snippet:**\n\n```xml\n\u003C!-- Actor (stick figure) -->\n\u003CmxCell id=\"actorA\" value=\"Client\"\n        style=\"shape=mxgraph.uml.actor;pointerEvents=1;dashed=0;whiteSpace=wrap;html=1;aspect=fixed;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"110\" y=\"80\" width=\"60\" height=\"80\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Service box -->\n\u003CmxCell id=\"actorB\" value=\"API Server\"\n        style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"480\" y=\"100\" width=\"160\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Lifeline — floating edge: uses sourcePoint\u002FtargetPoint, NOT source\u002Ftarget attributes -->\n\u003CmxCell id=\"lifA\" value=\"\"\n        style=\"edgeStyle=none;dashed=1;endArrow=none;\"\n        edge=\"1\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\">\n    \u003CmxPoint x=\"140\" y=\"160\" as=\"sourcePoint\" \u002F>\n    \u003CmxPoint x=\"140\" y=\"700\" as=\"targetPoint\" \u002F>\n  \u003C\u002FmxGeometry>\n\u003C\u002FmxCell>\n\n\u003C!-- Activation box (thin rectangle on lifeline) -->\n\u003CmxCell id=\"actA1\" value=\"\"\n        style=\"fillColor=#dae8fc;strokeColor=#6c8ebf;\"\n        vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"130\" y=\"220\" width=\"20\" height=\"180\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Synchronous message -->\n\u003CmxCell id=\"msg1\" value=\"POST \u002Forders\"\n        style=\"edgeStyle=elbowEdgeStyle;elbow=vertical;html=1;endArrow=block;endFill=1;\"\n        edge=\"1\" source=\"actA1\" target=\"actorB\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Return message (dashed) -->\n\u003CmxCell id=\"msg2\" value=\"201 Created\"\n        style=\"edgeStyle=elbowEdgeStyle;elbow=vertical;dashed=1;html=1;endArrow=open;endFill=0;\"\n        edge=\"1\" source=\"actorB\" target=\"actA1\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n> **Note:** Lifelines are floating edges that use `sourcePoint`\u002F`targetPoint` in `\u003CmxGeometry>` instead of `source`\u002F`target` attributes. This is the standard draw.io pattern for sequence diagrams.\n\n### ER Diagram\n\nUse `shape=table` containers with `childLayout=tableLayout`. Rows are `shape=tableRow` cells with `portConstraint=eastwest`. Columns inside each row are `shape=partialRectangle`.\n\nRelationship arrows use `edgeStyle=entityRelationEdgeStyle`:\n- One-to-One: `startArrow=ERone;endArrow=ERone`\n- One-to-Many: `startArrow=ERone;endArrow=ERmany`\n- Many-to-Many: `startArrow=ERmany;endArrow=ERmany`\n- Mandatory: `ERmandOne`, Optional: `ERzeroToOne`\n\n### UML Class Diagram\n\nClass boxes are swimlane containers. Attributes and methods are plain text cells. Dividers are zero-height swimlane children.\n\nArrow styles by relationship type:\n\n| Relationship | Style String |\n|---|---|\n| Inheritance (extends) | `edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;endFill=0;` |\n| Realization (implements) | `edgeStyle=orthogonalEdgeStyle;dashed=1;html=1;endArrow=block;endFill=0;` |\n| Composition | `edgeStyle=orthogonalEdgeStyle;html=1;startArrow=diamond;startFill=1;endArrow=none;` |\n| Aggregation | `edgeStyle=orthogonalEdgeStyle;html=1;startArrow=diamond;startFill=0;endArrow=none;` |\n| Dependency | `edgeStyle=orthogonalEdgeStyle;dashed=1;html=1;endArrow=open;endFill=0;` |\n| Association | `edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open;endFill=0;` |\n\n---\n\n## 5. Multi-Page Diagrams\n\nAdd multiple `\u003Cdiagram>` elements for complex systems:\n\n```xml\n\u003Cmxfile host=\"Electron\" version=\"26.0.0\">\n  \u003Cdiagram id=\"overview\" name=\"Overview\">\n    \u003C!-- overview mxGraphModel -->\n  \u003C\u002Fdiagram>\n  \u003Cdiagram id=\"detail\" name=\"Detail View\">\n    \u003C!-- detail mxGraphModel -->\n  \u003C\u002Fdiagram>\n\u003C\u002Fmxfile>\n```\n\nEach page has its own independent cell id namespace. The same id value can appear in different pages without conflict.\n\n---\n\n## 6. Editing Existing Diagrams\n\nWhen modifying an existing `.drawio` file:\n\n1. **Read** the file first to understand existing cell ids, positions, and parent hierarchy\n2. **Identify the target diagram page** — by index or `name` attribute\n3. **Assign new unique ids** that do not collide with existing ids\n4. **Respect the container hierarchy** — children of a swimlane use coordinates relative to their parent\n5. **Verify edges** — after repositioning nodes, confirm edge source\u002Ftarget ids remain valid\n\nUse `scripts\u002Fadd-shape.py` to safely add a single shape without editing raw XML:\n```bash\npython .github\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fadd-shape.py docs\u002Farch.drawio \"New Service\" 700 380\n```\n\n---\n\n## 7. Best Practices\n\n**Layout**\n- Align shapes to the 10px grid (all coordinates divisible by 10)\n- Group related shapes inside swimlane containers\n- One diagram topic per page; use multi-page files for complex systems\n- Aim for 40 or fewer cells per page for readability\n\n**Labels**\n- Add a title text cell (`text;strokeColor=none;fillColor=none;fontSize=18;fontStyle=1`) at top of every page\n- Always set `whiteSpace=wrap;html=1` on vertex shapes\n- Keep labels concise — 3 words or fewer per shape where possible\n\n**Style consistency**\n- Use the semantic color palette from Section 3 Step 5 consistently across a project\n- Prefer `edgeStyle=orthogonalEdgeStyle` for clean right-angle connectors\n- Do not inline arbitrary HTML in labels unless necessary\n\n**File naming**\n- Use kebab-case: `order-service-flow.drawio`, `database-schema.drawio`\n- Place diagrams alongside the code they document: `docs\u002F` or `architecture\u002F`\n\n---\n\n## 8. Troubleshooting\n\n| Problem | Likely Cause | Fix |\n|---|---|---|\n| File opens blank in VS Code | Missing id=0 or id=1 cell | Add both root cells before any other cells |\n| Shape at wrong position | Child inside container — coords are relative | Check `parent`; adjust x\u002Fy relative to container |\n| Edge not visible | source or target id does not match any vertex | Verify both ids exist exactly as written |\n| Diagram shows \"Compressed\" | mxGraphModel is base64-encoded | Open in draw.io web, File > Export > XML (uncompressed) |\n| Shape style not rendering | Typo in shape= name | Check `references\u002Fshape-libraries.md` for exact style string |\n| Label shows escaped HTML | html=0 on a cell with HTML label | Add `html=1;` to the cell style |\n| Container children overlap container edge | Container height too small | Increase container height in mxGeometry |\n\n---\n\n## 9. Validation Checklist\n\nBefore delivering any generated `.drawio` file, verify:\n\n- [ ] File starts with `\u003Cmxfile>` root element\n- [ ] Every `\u003Cdiagram>` has a non-empty `id` attribute\n- [ ] `\u003CmxCell id=\"0\" \u002F>` is the first cell in every diagram\n- [ ] `\u003CmxCell id=\"1\" parent=\"0\" \u002F>` is the second cell in every diagram\n- [ ] All cell `id` values are unique within each diagram\n- [ ] Every vertex cell has `vertex=\"1\"` and a child `\u003CmxGeometry as=\"geometry\">`\n- [ ] Every edge cell has `edge=\"1\"` and either: (a) `source`\u002F`target` pointing to existing vertex ids, or (b) `\u003CmxPoint as=\"sourcePoint\">` and `\u003CmxPoint as=\"targetPoint\">` in its `\u003CmxGeometry>` (floating edge — used for sequence diagram lifelines)\n- [ ] Every cell (except id=0) has a `parent` pointing to an existing id\n- [ ] `html=1` is in the style for any label containing HTML tags\n- [ ] XML is well-formed (no unclosed tags, no unescaped `&`, `\u003C`, `>` in attribute values)\n- [ ] A title label cell exists at the top of each page\n\nRun the automated validator:\n```bash\npython .github\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fvalidate-drawio.py \u003Cfile.drawio>\n```\n\n---\n\n## 10. Output Format\n\nWhen delivering a diagram, always provide:\n\n1. **The `.drawio` file** written to the requested path\n2. **A one-sentence summary** of what the diagram shows\n3. **How to open it**:\n   > \"Open `\u003Cfilename>` in VS Code — the draw.io extension will render it automatically. Or you can open it in the draw.io web app or desktop app if you prefer.\"\n4. **How to edit it** (if the user is likely to customise):\n   > \"Click any shape to select it. Double-click to edit the label. Drag to reposition.\"\n5. **Validation status** — whether the validator script was run and passed\n\n---\n\n## 11. References\n\nAll companion files are in `.github\u002Fskills\u002Fdraw-io-diagram-generator\u002F`:\n\n| File | Contents |\n|---|---|\n| `references\u002Fdrawio-xml-schema.md` | Complete mxfile \u002F mxGraphModel \u002F mxCell attribute reference, coordinate system, reserved cells, validation rules |\n| `references\u002Fstyle-reference.md` | All style keys with allowed values, vertex and edge style keys, shape catalog, semantic color palette |\n| `references\u002Fshape-libraries.md` | All shape library categories (General, Flowchart, UML, ER, Network, BPMN, Mockup, K8s) with style strings |\n| `assets\u002Ftemplates\u002Fflowchart.drawio` | Ready-to-use flowchart template |\n| `assets\u002Ftemplates\u002Farchitecture.drawio` | 4-tier system architecture template |\n| `assets\u002Ftemplates\u002Fsequence.drawio` | 3-actor sequence diagram template |\n| `assets\u002Ftemplates\u002Fer-diagram.drawio` | 3-table ER diagram with crow's foot relationships |\n| `assets\u002Ftemplates\u002Fuml-class.drawio` | Interface + 2 classes + enum with relationship arrows |\n| `scripts\u002Fvalidate-drawio.py` | Python script to validate XML structure of any .drawio file |\n| `scripts\u002Fadd-shape.py` | Python CLI to add a new shape to an existing diagram |\n| `scripts\u002FREADME.md` | How to use the scripts with examples |\n",{"name":5,"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92",".agents\u002Fskills\u002Fdraw-io-diagram-generator",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill draw-io-diagram-generator",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill draw-io-diagram-generator",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill draw-io-diagram-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002FSKILL.md",true,[46,52,56,60,64,68,74,78,82,88,92,96],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"assets\u002Ftemplates\u002Farchitecture.drawio","ASSET","资产文件",8077,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fassets\u002Ftemplates\u002Farchitecture.drawio",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"assets\u002Ftemplates\u002Fer-diagram.drawio",26593,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fassets\u002Ftemplates\u002Fer-diagram.drawio",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"assets\u002Ftemplates\u002Fflowchart.drawio",4590,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fassets\u002Ftemplates\u002Fflowchart.drawio",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"assets\u002Ftemplates\u002Fsequence.drawio",7290,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fassets\u002Ftemplates\u002Fsequence.drawio",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"assets\u002Ftemplates\u002Fuml-class.drawio",12960,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fassets\u002Ftemplates\u002Fuml-class.drawio",{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fdrawio-xml-schema.md","REFERENCE","参考文档",10796,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Freferences\u002Fdrawio-xml-schema.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fshape-libraries.md",13126,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Freferences\u002Fshape-libraries.md",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fstyle-reference.md",15491,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Freferences\u002Fstyle-reference.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002F.gitignore","SCRIPT","脚本",39,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002F.gitignore",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fadd-shape.py",6642,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fadd-shape.py",{"path":93,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002FREADME.md",3332,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002FREADME.md",{"path":97,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fvalidate-drawio.py",7643,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdraw-io-diagram-generator\u002Fscripts\u002Fvalidate-drawio.py",[101,108,115,122,129,136],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]