π‘ Summary
This skill enables AI-powered diagram creation and editing with real-time browser preview across multiple platforms.
π― Target Audience
π€ AI Roast: βA diagramming tool that might just draw you in, but donβt expect it to sketch your dreams.β
The skill may expose risks related to external command execution via 'npx', which could lead to dependency vulnerabilities. To mitigate, ensure all dependencies are regularly updated and audited.
Draw.io Skill for Claude, Gemini & Codex
Note: This skill was created using skill-seekers to convert the next-ai-draw-io project into a Claude Code skill format.
English | δΈζζζ‘£ | π Documentation
An MCP skill that enables AI-powered diagram creation and editing with real-time browser preview. Works with Claude Desktop, Gemini CLI, and Codex.
β¨ Features
- π¨ Natural Language β Diagram: Describe what you need, get a professional diagram
- π Real-time Preview: See changes instantly in your browser
- π Multiple Diagram Types: Flowcharts, architecture diagrams, sequence diagrams, and more
- βοΈ Cloud Architecture Support: AWS, GCP, and Azure with official icons
- βοΈ Edit Existing Diagrams: Modify diagrams using ID-based operations
- πΎ Export: Save diagrams as
.drawiofiles - π¬ Animated Connectors: Create dynamic and animated connectors between elements
- π Version History: Restore previous diagram versions with visual thumbnails
π Relationship with Upstream Project
This skill is built on top of next-ai-draw-io by @DayuanJiang.
| Project | Purpose | |---------|---------| | next-ai-draw-io | MCP Server that provides draw.io diagram tools | | This Project (drawio-skills) | MCP skill that wraps the MCP server with workflow guidance, XML format references, and diagram examples. Compatible with Claude Desktop, Gemini CLI, and Codex |
What This Skill Adds
- β Comprehensive Documentation: Detailed guides for creating various diagram types
- β XML Format Reference: Complete documentation of draw.io XML format and style properties
- β Diagram Examples: Ready-to-use examples for flowcharts, architecture diagrams, and more
- β MCP Tools Reference: Detailed documentation of all available MCP tools
- β
Automatic MCP Configuration: Pre-configured
.mcp.jsonfor seamless integration - β Installation Scripts: Easy setup for Windows, Linux, and macOS
π¦ Installation
Prerequisites
- Node.js (for npx command)
- One of the following AI platforms:
Quick Install
Step 1: Clone the repository
git clone https://github.com/bahayonghang/drawio-skills.git cd drawio-skills
Step 2: Copy to your AI platform's config directory
Choose your platform and run the corresponding command:
For Claude Desktop
macOS:
cp -r skills/drawio ~/Library/Application\ Support/Claude/skills/
Windows (PowerShell):
Copy-Item -Recurse skills/drawio "$env:APPDATA\Claude\skills\"
Linux:
cp -r skills/drawio ~/.config/Claude/skills/
Then add to claude_desktop_config.json:
{ "mcpServers": { "drawio": { "command": "npx", "args": ["--yes", "@next-ai-drawio/mcp-server@0.1.15"] } } }
For Gemini CLI
macOS:
cp -r skills/drawio ~/Library/Application\ Support/gemini/skills/
Windows (PowerShell):
Copy-Item -Recurse skills/drawio "$env:APPDATA\gemini\skills\"
Linux:
cp -r skills/drawio ~/.gemini/skills/
Then add to settings.json:
{ "mcpServers": { "drawio": { "command": "npx", "args": ["--yes", "@next-ai-drawio/mcp-server@0.1.15"] } } }
For Codex
All platforms:
cp -r skills/drawio ~/.codex/skills/
Then add to ~/.codex/config.toml:
[mcp_servers.drawio] command = "npx" args = ["--yes", "@next-ai-drawio/mcp-server@0.1.15"]
The skill will be available automatically after restarting your AI client.
π Usage
Once the skill is installed, simply ask Claude to create a diagram:
Basic Examples
"Create a flowchart for user login process"
"Draw a three-tier architecture diagram"
"Generate a microservices architecture for an e-commerce system"
π― Real Example: E-Commerce Microservices Architecture
β οΈ Note: This example is for reference only. The current workflow may have some issues (e.g., element overlapping). We are actively optimizing the workflow to improve diagram generation quality.

Prompt used:
Design a microservices e-commerce system architecture diagram with the following components:
API Gateway
βββ User Service (authentication, user profiles)
βββ Product Catalog Service (inventory management, product search, categories)
βββ Shopping Cart Service (cart management, session handling)
βββ Order Service (order processing, order history)
βββ Payment Service (payment gateway, transactions)
βββ Notification Service (emails, SMS, push notifications)
Infrastructure:
- API Gateway (entry point for all requests)
- Service Mesh (service-to-service communication)
- Message Queue (RabbitMQ/Kafka for async events)
- Cache Layer (Redis for session and product caching)
- Databases (PostgreSQL per service)
- CDN/Load Balancer
- Monitoring (Prometheus, Grafana)
Result: examples/ecommerce-microservices.drawio
This example demonstrates:
- β Clear layering (KISS principle): Client β CDN β API Gateway β Microservices β Database
- β Service independence (SOLID): Each service has its own database
- β Async communication: Message queue for order/payment β notification events
- β Observability: Prometheus + Grafana monitoring
- β Optimized routing: Non-overlapping connection lines with Chinese labels
Advanced Examples
AWS Architecture
"Generate an AWS architecture diagram with Lambda, API Gateway, DynamoDB,
and S3 for a serverless REST API. Use AWS icons."
GCP Architecture
"Generate a GCP architecture diagram with Cloud Run, Cloud SQL, and
Cloud Storage for a web application. Use GCP icons."
Sequence Diagram
"Create a sequence diagram showing OAuth 2.0 authorization code flow
between user, client app, auth server, and resource server"
Animated Connectors
"Give me an animated connector diagram of transformer's architecture"
π οΈ MCP Tools
This skill uses the following MCP tools from @next-ai-drawio/mcp-server:
| Tool | Purpose |
|------|---------|
| start_session | Open browser with real-time preview |
| create_new_diagram | Create new diagram from XML |
| get_diagram | Retrieve current diagram XML |
| edit_diagram | Modify diagram by cell ID |
| export_diagram | Save as .drawio file |
For detailed documentation of each tool, see references/mcp-tools.md.
π Documentation
References
- MCP Tools Reference: Detailed documentation of all available MCP tools
- XML Format Reference: Complete guide to draw.io XML format and style properties
- Diagram Examples: Ready-to-use examples for various diagram types
Diagram Types
This skill supports creating the following diagram types:
- Flowcharts: Process flows, decision trees, workflows
- Architecture Diagrams: System architecture, microservices, deployment diagrams
- Sequence Diagrams: Interaction flows, API calls, message sequences
- Network Diagrams: Network topology, VPC architecture, security zones
- Data Flow Diagrams: Data pipelines, ETL processes, analytics workflows
- UML Diagrams: Class diagrams, state diagrams, component diagrams
- Cloud Architecture: AWS, GCP, Azure with official icons
π Project Structure
drawio-skills/
βββ skills/
β βββ drawio/
β βββ .mcp.json # MCP server configuration
β βββ SKILL.md # Main skill documentation
β βββ scripts/
β β βββ install.sh # Linux/macOS installation script
β β βββ install.bat # Windows installation script
β βββ references/
β βββ mcp-tools.md # MCP tools reference
β βββ xml-format.md # Draw.io XML format reference
β βββ examples.md # Diagram examples
βββ README.md # English documentation
βββ README_CN.md # Chinese documentation
π§ Configuration
The skill uses the following default configuration:
{ "mcpServers": { "drawio": { "command": "npx", "args": ["--yes", "@next-ai-drawio/mcp-server@0.1.15"] } } }
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| PORT | 6002 | Port for the embedded HTTP server |
| DRAWIO_BASE_URL | https://embed.diagrams.net | Base URL for draw.io (for self-hosted deployments) |
π Troubleshooting
Port already in use
If port 6002 is in use, the server will automatically try the next available port (up to 6020).
"No active session"
Call start_session first to open the browser window.
Browser not updating
Check that the browse
Pros
- Supports multiple diagram types
- Real-time preview enhances usability
- Comprehensive documentation available
- Easy installation across platforms
Cons
- May have issues with complex diagrams
- Dependency on external AI platforms
- Limited to specific diagramming tools
- Requires configuration for each platform
Related Skills
pytorch
SβIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.β
agno
SβIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.β
nuxt-skills
SβIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.β
Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.
Copyright belongs to the original author bahayonghang.
