---
name: "drawio-xml-diagram-automator"
description: "Generate, parse, and automate cloud architecture diagrams in Draw.io / diagrams.net XML."
metadata:
  author: "JGraph"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "generate draw.io xml python"
  - "export draw.io diagram cli"
  - "automate cloud architecture diagram"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Draw.io XML Architecture Diagram Automator

Programmatically reads and generates Draw.io XML graph files: mxGraphModel elements, mxCell vertices, edges, style strings, and cloud provider icon stencils (AWS, GCP, Azure).

## When to Invoke
Invoke this skill whenever you need to:
- generate draw.io xml python
- export draw.io diagram cli
- automate cloud architecture diagram

## Execution SOP & Rules
1. Construct valid mxGraphModel XML structures with root, mxCell parent, and vertex definitions.
2. Apply official cloud stencil styles (e.g. shape=mxgraph.aws4.compute_instance).
3. Connect nodes with directed edges declaring source and target vertex cell IDs.
4. Export diagrams automatically using drawio -x -f svg -o output.svg input.drawio.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
