Back to list
aktsmm

drawio-diagram-forge

by aktsmm

2🍴 0📅 Jan 24, 2026

SKILL.md


name: drawio-diagram-forge description: Generate draw.io editable diagrams (.drawio, .drawio.svg) from text, images, or Excel. Orchestrates 3-agent workflow (Analysis → Manifest → SVG generation) with quality gates. Use when creating architecture diagrams, flowcharts, sequence diagrams, or converting existing images to editable format. Supports Azure/AWS cloud icons. license: CC BY-NC-SA 4.0 metadata: author: yamapan (https://github.com/aktsmm)

Draw.io Diagram Forge

Generate draw.io editable diagrams using AI-powered orchestrated workflow.

When to Use

  • General diagram requests - "Create a diagram", "Draw me a chart", etc.
  • Creating architecture diagrams (Azure, AWS, on-premises)
  • Converting flowcharts, system diagrams from text descriptions
  • Transforming existing images/screenshots into editable draw.io format
  • Generating swimlane diagrams, sequence diagrams from Excel/Markdown

Prerequisites

ToolPurposeRequired
VS CodeIDE
Draw.io IntegrationEdit .drawio files
GitHub CopilotAI generation

Install extension: Draw.io Integration

Quick Start

Basic Usage

Create a login flow diagram
Generate an Azure architecture diagram with Hub-Spoke topology
Convert this Excel file to a flowchart

With Input Files

From inputs/requirements.md, create a system architecture diagram
Recreate this image (inputs/architecture.png) as an editable draw.io file

Output Formats

ExtensionDescriptionWhen to Use
*.drawioNative draw.io formatRecommended - Most stable
*.drawio.svgSVG + draw.io metadataEmbedding in Markdown/Web
*.drawio.pngPNG + draw.io metadataImage with edit capability

Output directory: outputs/

Workflow Overview

USER INPUT
    │
    ▼
┌─────────────────────────────────────────────────┐
│           FLOW ORCHESTRATOR                      │
│  ┌─────────────────────────────────────────┐    │
│  │ Internal Modules:                        │    │
│  │ • Analysis (input classification)        │    │
│  │ • Review (quality scoring)               │    │
│  │ • State (context management)             │    │
│  │ • Timeout (watchdog)                     │    │
│  └─────────────────────────────────────────┘    │
└─────────────────────────────────────────────────┘
    │
    ├──► MANIFEST GATEWAY (create manifest)
    │
    └──► SVG FORGE (generate diagram + validation)
    │
    ▼
COMPLETED (.drawio file)

Quality Gates

ScoreActionDescription
90-100✅ ProceedHigh quality, continue
85-89⚠️ NoteMinor issues noted
70-84🔄 FixAuto-fix and retry
50-69📉 SimplifyReduce complexity
30-49📦 PartialDeliver partial result
0-29❌ EscalateAsk user for clarification

Iteration Limits

LimitValueOn Exceed
Manifest revision2Force proceed with warning
SVG revision2Partial success
Total revisions4Partial success
Total timeout45minCheckpoint-based decision

Advanced: Agent Delegation

For complex diagrams, explicitly invoke the orchestrator:

@flow-orchestrator Create a detailed microservices architecture from inputs/requirements.md

This triggers the full manifest → review → generation → review cycle.

Cloud Icon Usage

When generating cloud architecture diagrams, follow this icon selection logic:

Step 1: Detect Cloud Provider

Scan input for provider-specific keywords:

ProviderKeywords
AzureAzure, Microsoft Cloud, App Service, Azure AD, VNET, AKS, Key Vault
AWSAWS, Amazon, EC2, Lambda, S3, RDS, VPC, EKS, DynamoDB
GCPGCP, Google Cloud, Cloud Run, BigQuery, GKE, Cloud Functions
AlibabaAlibaba Cloud, Aliyun, ECS (Alibaba context), OSS, MaxCompute
IBMIBM Cloud, IBM Watson, IBM OpenShift
CiscoCisco, Meraki, ACI, Nexus, ISE

Step 2: Search for Matching Icon

For each cloud service mentioned:

  1. Search the appropriate icon library for a matching icon
  2. If found: Use the provider-specific format (see below)
  3. If not found: Use a generic shape with the service name as label

Step 3: Apply Provider-Specific Format

ProviderIcon FormatLibrary Path
Azureimage=img/lib/azure2/{category}/{Icon}.svgazure2
AWSshape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.{icon}mxgraph.aws4.*
GCPshape=mxgraph.gcp2.{icon}mxgraph.gcp2.*
Alibabashape=mxgraph.alibabacloud.{icon}mxgraph.alibabacloud.*
IBMimage=img/lib/ibm/{category}/{icon}.svgibm
Ciscoshape=mxgraph.cisco19.{icon}mxgraph.cisco19.*

Step 4: Fallback for Unknown Services

If no matching icon exists:

<!-- Generic rectangle with service name -->
<mxCell value="Custom Service" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" />

⚠️ Critical: Azure Format

<!-- ❌ WRONG - Will show blue square in VS Code -->
<mxCell style="shape=mxgraph.azure.front_door;..." />

<!-- ✅ CORRECT - Works everywhere -->
<mxCell style="aspect=fixed;image=img/lib/azure2/networking/Front_Doors.svg;..." />

Refer to cloud-icons.md for detailed SVG paths and style examples.

Resources

References

FileDescription
mxcell-structure.mdmxCell XML structure for draw.io
cloud-icons.mdAzure/AWS icon usage guide
style-guide.mdNode colors, edge styles

Scripts

FileDescription
validate_drawio.pyValidate mxCell structure

Cloud Icons (Azure/AWS)

To enable cloud icons in generated diagrams:

  1. Open generated .drawio file in VS Code
  2. Click "+ More Shapes" (bottom-left)
  3. Enable: ✅ Azure, ✅ AWS
  4. Click Apply

Troubleshooting

IssueCauseSolution
Blank in draw.ioMissing mxCellCheck content attribute
Edges not visibleInvalid source/targetVerify node IDs
Icons missingLibrary not enabledEnable Azure/AWS shapes

Technical Details

How It Works

AI generates XML/SVG text that renders as editable diagrams:

Natural Language  →  XML/mxGraphModel  →  Rendered Diagram
     ↑                    ↑                      ↑
  Human input        AI generates          SVG rendering

mxCell Completeness Rule

Required mxCells >= 2 + nodes + edges
  • mxCell id="0" (root)
  • mxCell id="1" (default parent)
  • One mxCell per node (vertex="1")
  • One mxCell per edge (edge="1")

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon