excalidraw-diagram-generator by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill excalidraw-diagram-generator一个根据自然语言描述生成 Excalidraw 格式图表的技能。此技能无需手动绘制,即可帮助创建流程、系统、关系和想法的可视化表示。
当用户请求以下内容时使用此技能:
支持的图表类型:
分析用户的描述以确定:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 用户意图 | 图表类型 | 示例关键词 |
|---|---|---|
| 流程、步骤、程序 | 流程图 | "工作流", "流程", "步骤", "程序" |
| 连接、依赖、关联 | 关系图 | "关系", "连接", "依赖", "结构" |
| 概念层次、头脑风暴 | 思维导图 | "思维导图", "概念", "想法", "分解" |
| 系统设计、组件 | 架构图 | "架构", "系统", "组件", "模块" |
| 数据流、转换过程 | 数据流图 (DFD) | "数据流", "数据处理", "数据转换" |
| 跨职能流程、参与者职责 | 业务流程图 (泳道图) | "业务流程", "泳道", "参与者", "职责" |
| 面向对象设计、类结构 | 类图 | "类", "继承", "OOP", "对象模型" |
| 交互序列、消息流 | 序列图 | "序列", "交互", "消息", "时间线" |
| 数据库设计、实体关系 | ER 图 | "数据库", "实体", "关系", "数据模型" |
对于流程图:
对于关系图:
对于思维导图:
对于数据流图 (DFD):
对于业务流程图 (泳道图):
对于类图:
对于序列图:
对于 ER 图:
使用适当的元素创建 .excalidraw 文件:
可用的元素类型:
rectangle: 用于实体、步骤、概念的方框ellipse: 用于强调的替代形状diamond: 决策点arrow: 方向性连接text: 标签和注释要设置的关键属性:
x, y 坐标width, heightstrokeColor, backgroundColor, fillStylefontFamily: 5 (Excalifont - 所有文本元素必须使用)points 数组重要 : 所有文本元素必须使用 fontFamily: 5 (Excalifont) 以获得一致的视觉外观。
构建完整的 Excalidraw 文件:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
// 图表元素数组
],
"appState": {
"viewBackgroundColor": "#ffffff",
"gridSize": 20
},
"files": {}
}
<描述性名称>.excalidraw| 图表类型 | 推荐数量 | 最大数量 |
|---|---|---|
| 流程图步骤 | 3-10 | 15 |
| 关系图实体 | 3-8 | 12 |
| 思维导图分支 | 4-6 | 8 |
| 思维导图每个分支的子主题 | 2-4 | 6 |
#a5d8ff)#b2f2bb)#ffd43b)#ffc9c9)fontFamily: 5 (Excalifont)如果用户请求包含过多元素:
示例回复:
"您的请求包含 15 个组件。为了清晰起见,我建议:
1. 高级别架构图 (6 个主要组件)
2. 每个子系统的详细图表
您希望我从高级别视图开始吗?"
用户: "为用户注册创建一个流程图"
代理生成:
user-registration-flow.excalidraw用户: "绘制 User、Post 和 Comment 实体之间的关系图"
代理生成:
user-content-relationships.excalidraw用户: "关于机器学习概念的思维导图"
代理生成:
machine-learning-mindmap.excalidraw| 问题 | 解决方案 |
|---|---|
| 元素重叠 | 增加坐标之间的间距 |
| 文本在框内放不下 | 增加框宽度或减小字体大小 |
| 元素过多 | 拆分为多个图表 |
| 布局不清晰 | 使用网格布局 (行/列) 或径向布局 (思维导图) |
| 颜色不一致 | 根据元素类型预先定义调色板 |
const columns = Math.ceil(Math.sqrt(entityCount));
const x = startX + (index % columns) * horizontalGap;
const y = startY + Math.floor(index / columns) * verticalGap;
const angle = (2 * Math.PI * index) / branchCount;
const x = centerX + radius * Math.cos(angle);
const y = centerY + radius * Math.sin(angle);
使用时间戳 + 随机字符串生成唯一 ID:
const id = Date.now().toString(36) + Math.random().toString(36).substr(2);
始终提供:
.excalidraw JSON 文件示例摘要:
已创建: user-workflow.excalidraw
类型: 流程图
元素: 7 个矩形, 6 个箭头, 1 个标题文本
总计: 14 个元素
查看方法:
1. 访问 https://excalidraw.com
2. 拖放 user-workflow.excalidraw
3. 或在 Excalidraw VS Code 扩展中使用 文件 → 打开
交付图表前检查:
fontFamily: 5 (Excalifont)对于专业图表 (例如 AWS/GCP/Azure 架构图),您可以使用 Excalidraw 的预制图标库。这提供了专业、标准化的图标,而不是基本形状。
如果用户要求 AWS/云架构图或提到希望使用特定图标:
检查库是否存在 : 查找 libraries/<库名称>/reference.md
如果库存在 : 继续使用图标 (参见下方 AI 助手工作流程)
如果库不存在 : 回复设置说明:
要使用 [AWS/GCP/Azure/等] 架构图标,请按照以下步骤操作:
1. 访问 https://libraries.excalidraw.com/
2. 搜索 "[AWS Architecture Icons/等]" 并下载 .excalidrawlib 文件
3. 创建目录: skills/excalidraw-diagram-generator/libraries/[图标集名称]/
4. 将下载的文件放入该目录
5. 运行拆分脚本:
python skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/[图标集名称]/
这将把库拆分为单独的图标文件以便高效使用。
设置完成后,我可以使用实际的 AWS/云图标创建您的图表。
或者,我现在可以使用简单形状 (矩形、椭圆) 创建图表,
您稍后可以在 Excalidraw 中手动替换为图标。
步骤 1:创建库目录
mkdir -p skills/excalidraw-diagram-generator/libraries/aws-architecture-icons
步骤 2:下载库
.excalidrawlib 文件步骤 3:放置库文件
aws-architecture-icons.excalidrawlib)步骤 4:运行拆分脚本
python skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/aws-architecture-icons/
步骤 5:验证设置 运行脚本后,验证是否存在以下结构:
skills/excalidraw-diagram-generator/libraries/aws-architecture-icons/
aws-architecture-icons.excalidrawlib (原始文件)
reference.md (生成的 - 图标查找表)
icons/ (生成的 - 单个图标文件)
API-Gateway.json
CloudFront.json
EC2.json
Lambda.json
RDS.json
S3.json
...
当图标库在libraries/ 中可用时:
推荐方法:使用 Python 脚本 (高效且可靠)
仓库包含自动处理图标集成的 Python 脚本:
创建基础图表结构 :
.excalidraw 文件使用 Python 脚本添加图标 :
python skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py
<图表路径> <图标名称> <x> <y> [--label "文本"] [--library-path 路径]
.excalidraw.edit 编辑以避免覆盖问题;传递 --no-use-edit-suffix 以禁用。示例 :
# 在位置 (400, 300) 添加 EC2 图标并带标签
python scripts/add-icon-to-diagram.py diagram.excalidraw EC2 400 300 --label "Web Server"
# 在位置 (200, 150) 添加 VPC 图标
python scripts/add-icon-to-diagram.py diagram.excalidraw VPC 200 150
# 从不同库添加图标
python scripts/add-icon-to-diagram.py diagram.excalidraw Compute-Engine 500 200 \
--library-path libraries/gcp-icons --label "API Server"
3. 添加连接箭头 :
python skills/excalidraw-diagram-generator/scripts/add-arrow.py \
<图表路径> <起始-x> <起始-y> <目标-x> <目标-y> [--label "文本"] [--style solid|dashed|dotted] [--color HEX]
* 默认启用通过 `.excalidraw.edit` 编辑以避免覆盖问题;传递 `--no-use-edit-suffix` 以禁用。
示例 :
# 从 (300, 250) 到 (500, 300) 的简单箭头
python scripts/add-arrow.py diagram.excalidraw 300 250 500 300
# 带标签的箭头
python scripts/add-arrow.py diagram.excalidraw 300 250 500 300 --label "HTTPS"
# 带自定义颜色的虚线箭头
python scripts/add-arrow.py diagram.excalidraw 400 350 600 400 --style dashed --color "#7950f2"
4. 工作流程摘要 :
# 步骤 1: 创建带标题和结构的基础图表
# (创建包含初始元素的 .excalidraw 文件)
# 步骤 2: 添加带标签的图标
python scripts/add-icon-to-diagram.py my-diagram.excalidraw "Internet-gateway" 200 150 --label "Internet Gateway"
python scripts/add-icon-to-diagram.py my-diagram.excalidraw VPC 250 250
python scripts/add-icon-to-diagram.py my-diagram.excalidraw ELB 350 300 --label "Load Balancer"
python scripts/add-icon-to-diagram.py my-diagram.excalidraw EC2 450 350 --label "EC2 Instance"
python scripts/add-icon-to-diagram.py my-diagram.excalidraw RDS 550 400 --label "Database"
# 步骤 3: 添加连接箭头
python scripts/add-arrow.py my-diagram.excalidraw 250 200 300 250 # Internet → VPC
python scripts/add-arrow.py my-diagram.excalidraw 300 300 400 300 # VPC → ELB
python scripts/add-arrow.py my-diagram.excalidraw 400 330 500 350 # ELB → EC2
python scripts/add-arrow.py my-diagram.excalidraw 500 380 600 400 # EC2 → RDS
Python 脚本方法的优点 :
替代方案:手动图标集成 (不推荐)
仅在 Python 脚本不可用时使用此方法:
检查库 :
列出目录: skills/excalidraw-diagram-generator/libraries/ 查找包含 reference.md 文件的子目录
读取 reference.md :
打开: libraries/<库名称>/reference.md 这很轻量 (通常 <300 行) 并列出所有可用图标
查找相关图标 :
在 reference.md 表格中搜索与图表需求匹配的图标名称 示例: 对于包含 EC2, S3, Lambda 的 AWS 图表 → 在表格中查找 "EC2", "S3", "Lambda"
加载特定图标数据 (警告: 大文件):
仅读取需要的图标文件: - libraries/aws-architecture-icons/icons/EC2.json (200-300 行) - libraries/aws-architecture-icons/icons/S3.json (200-300 行) - libraries/aws-architecture-icons/icons/Lambda.json (200-300 行) 注意: 每个图标文件 200-1000 行 - 这会消耗大量令牌
提取和转换元素 :
每个图标 JSON 包含一个 "elements" 数组 计算边界框 (min_x, min_y, max_x, max_y) 对所有 x/y 坐标应用偏移量 为所有元素生成新的唯一 ID 更新 groupIds 引用 将转换后的元素复制到您的图表中
定位图标并添加连接 :
调整 x/y 坐标以在图表中正确定位图标 更新 ID 以确保整个图表中的唯一性 根据需要添加连接箭头和标签
手动集成挑战 :
请求 : "创建一个包含 Internet Gateway、VPC、ELB、EC2 和 RDS 的 AWS 架构图"
推荐工作流程 (使用 Python 脚本) : 请求 : "创建一个包含 Internet Gateway、VPC、ELB、EC2 和 RDS 的 AWS 架构图"
推荐工作流程 (使用 Python 脚本) :
# 步骤 1: 创建带标题的基础图表文件
# 创建 my-aws-diagram.excalidraw 并包含基本结构 (标题等)
# 步骤 2: 检查图标可用性
# 读取: libraries/aws-architecture-icons/reference.md
# 确认图标存在: Internet-gateway, VPC, ELB, EC2, RDS
# 步骤 3: 使用 Python 脚本添加图标
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw "Internet-gateway" 150 100 --label "Internet Gateway"
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw VPC 200 200
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw ELB 350 250 --label "Load Balancer"
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw EC2 500 300 --label "Web Server"
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw RDS 650 350 --label "Database"
# 步骤 4: 添加连接箭头
python scripts/add-arrow.py my-aws-diagram.excalidraw 200 150 250 200 # Internet → VPC
python scripts/add-arrow.py my-aws-diagram.excalidraw 265 230 350 250 # VPC → ELB
python scripts/add-arrow.py my-aws-diagram.excalidraw 415 280 500 300 # ELB → EC2
python scripts/add-arrow.py my-aws-diagram.excalidraw 565 330 650 350 --label "SQL" --style dashed
# 结果: 包含专业 AWS 图标、标签和连接的完整图表
优点 :
替代工作流程 (手动,如果脚本不可用) :
libraries/aws-architecture-icons/reference.md 是否存在 → 是icons/Internet-gateway.json (298 行)icons/VPC.json (550 行)icons/ELB.json (363 行)icons/EC2.json (231 行)icons/RDS.json (类似大小) 总计: 约 2000+ 行 JSON 需要处理.excalidraw 文件手动方法的挑战 :
.excalidrawlib 文件。如果未设置任何图标库:
查看捆绑的参考资料:
references/excalidraw-schema.md - 完整的 Excalidraw JSON 模式references/element-types.md - 详细的元素类型规范templates/flowchart-template.json - 基础流程图起始模板templates/relationship-template.json - 关系图起始模板templates/mindmap-template.json - 思维导图起始模板scripts/split-excalidraw-library.py - 拆分 .excalidrawlib 文件的工具scripts/README.md - 库工具的文档scripts/.gitignore - 防止本地 Python 产物被提交潜在的改进:
每周安装数
10.6K
仓库
GitHub 星标数
26.7K
首次出现
2026年2月4日
安全审计
安装于
opencode10.3K
codex10.3K
gemini-cli10.3K
github-copilot10.3K
kimi-cli10.2K
amp10.2K
A skill for generating Excalidraw-format diagrams from natural language descriptions. This skill helps create visual representations of processes, systems, relationships, and ideas without manual drawing.
Use this skill when users request:
Supported diagram types:
Analyze the user's description to determine:
| User Intent | Diagram Type | Example Keywords |
|---|---|---|
| Process flow, steps, procedures | Flowchart | "workflow", "process", "steps", "procedure" |
| Connections, dependencies, associations | Relationship Diagram | "relationship", "connections", "dependencies", "structure" |
| Concept hierarchy, brainstorming | Mind Map | "mind map", "concepts", "ideas", "breakdown" |
| System design, components | Architecture Diagram | "architecture", "system", "components", "modules" |
| Data flow, transformation processes | Data Flow Diagram (DFD) | "data flow", "data processing", "data transformation" |
| Cross-functional processes, actor responsibilities | Business Flow (Swimlane) | "business process", "swimlane", "actors", "responsibilities" |
| Object-oriented design, class structures |
For Flowcharts:
For Relationship Diagrams:
For Mind Maps:
For Data Flow Diagrams (DFD):
For Business Flow (Swimlane):
For Class Diagrams:
For Sequence Diagrams:
For ER Diagrams:
Create the .excalidraw file with appropriate elements:
Available element types:
rectangle: Boxes for entities, steps, conceptsellipse: Alternative shapes for emphasisdiamond: Decision pointsarrow: Directional connectionstext: Labels and annotationsKey properties to set:
x, y coordinateswidth, heightstrokeColor, backgroundColor, fillStylefontFamily: 5 (Excalifont - required for all text elements)points array for arrowsImportant : All text elements must use fontFamily: 5 (Excalifont) for consistent visual appearance.
Structure the complete Excalidraw file:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
// Array of diagram elements
],
"appState": {
"viewBackgroundColor": "#ffffff",
"gridSize": 20
},
"files": {}
}
<descriptive-name>.excalidraw| Diagram Type | Recommended Count | Maximum |
|---|---|---|
| Flowchart steps | 3-10 | 15 |
| Relationship entities | 3-8 | 12 |
| Mind map branches | 4-6 | 8 |
| Mind map sub-topics per branch | 2-4 | 6 |
#a5d8ff)#b2f2bb)#ffd43b)#ffc9c9)fontFamily: 5 (Excalifont) for all text elementsIf user request has too many elements:
Example response:
"Your request includes 15 components. For clarity, I recommend:
1. High-level architecture diagram (6 main components)
2. Detailed diagram for each subsystem
Would you like me to start with the high-level view?"
User: "Create a flowchart for user registration"
Agent generates:
user-registration-flow.excalidrawUser: "Diagram the relationship between User, Post, and Comment entities"
Agent generates:
user-content-relationships.excalidrawUser: "Mind map about machine learning concepts"
Agent generates:
machine-learning-mindmap.excalidraw| Issue | Solution |
|---|---|
| Elements overlap | Increase spacing between coordinates |
| Text doesn't fit in boxes | Increase box width or reduce font size |
| Too many elements | Break into multiple diagrams |
| Unclear layout | Use grid layout (rows/columns) or radial layout (mind maps) |
| Colors inconsistent | Define color palette upfront based on element types |
const columns = Math.ceil(Math.sqrt(entityCount));
const x = startX + (index % columns) * horizontalGap;
const y = startY + Math.floor(index / columns) * verticalGap;
const angle = (2 * Math.PI * index) / branchCount;
const x = centerX + radius * Math.cos(angle);
const y = centerY + radius * Math.sin(angle);
Use timestamp + random string for unique IDs:
const id = Date.now().toString(36) + Math.random().toString(36).substr(2);
Always provide:
.excalidraw JSON fileExample summary:
Created: user-workflow.excalidraw
Type: Flowchart
Elements: 7 rectangles, 6 arrows, 1 title text
Total: 14 elements
To view:
1. Visit https://excalidraw.com
2. Drag and drop user-workflow.excalidraw
3. Or use File → Open in Excalidraw VS Code extension
Before delivering the diagram:
fontFamily: 5 (Excalifont)For specialized diagrams (e.g., AWS/GCP/Azure architecture diagrams), you can use pre-made icon libraries from Excalidraw. This provides professional, standardized icons instead of basic shapes.
If user asks for AWS/cloud architecture diagrams or mentions wanting to use specific icons:
Check if library exists : Look for libraries/<library-name>/reference.md
If library exists : Proceed to use icons (see AI Assistant Workflow below)
If library does NOT exist : Respond with setup instructions:
To use [AWS/GCP/Azure/etc.] architecture icons, please follow these steps:
1. Visit https://libraries.excalidraw.com/
2. Search for "[AWS Architecture Icons/etc.]" and download the .excalidrawlib file
3. Create directory: skills/excalidraw-diagram-generator/libraries/[icon-set-name]/
4. Place the downloaded file in that directory
5. Run the splitter script:
python skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/[icon-set-name]/
This will split the library into individual icon files for efficient use.
After setup is complete, I can create your diagram using the actual AWS/cloud icons.
Alternatively, I can create the diagram now using simple shapes (rectangles, ellipses)
which you can later replace with icons manually in Excalidraw.
Step 1: Create Library Directory
mkdir -p skills/excalidraw-diagram-generator/libraries/aws-architecture-icons
Step 2: Download Library
.excalidrawlib fileStep 3: Place Library File
aws-architecture-icons.excalidrawlib)Step 4: Run Splitter Script
python skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/aws-architecture-icons/
Step 5: Verify Setup After running the script, verify the following structure exists:
skills/excalidraw-diagram-generator/libraries/aws-architecture-icons/
aws-architecture-icons.excalidrawlib (original)
reference.md (generated - icon lookup table)
icons/ (generated - individual icon files)
API-Gateway.json
CloudFront.json
EC2.json
Lambda.json
RDS.json
S3.json
...
When icon libraries are available inlibraries/:
RECOMMENDED APPROACH: Use Python Scripts (Efficient & Reliable)
The repository includes Python scripts that handle icon integration automatically:
Create base diagram structure :
.excalidraw file with basic layout (title, boxes, regions)Add icons using Python script :
python skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py
<diagram-path> <icon-name> <x> <y> [--label "Text"] [--library-path PATH]
.excalidraw.edit is enabled by default to avoid overwrite issues; pass --no-use-edit-suffix to disable.Examples :
# Add EC2 icon at position (400, 300) with label
python scripts/add-icon-to-diagram.py diagram.excalidraw EC2 400 300 --label "Web Server"
# Add VPC icon at position (200, 150)
python scripts/add-icon-to-diagram.py diagram.excalidraw VPC 200 150
# Add icon from different library
python scripts/add-icon-to-diagram.py diagram.excalidraw Compute-Engine 500 200 \
--library-path libraries/gcp-icons --label "API Server"
3. Add connecting arrows :
python skills/excalidraw-diagram-generator/scripts/add-arrow.py \
<diagram-path> <from-x> <from-y> <to-x> <to-y> [--label "Text"] [--style solid|dashed|dotted] [--color HEX]
* Edit via `.excalidraw.edit` is enabled by default to avoid overwrite issues; pass `--no-use-edit-suffix` to disable.
Examples :
# Simple arrow from (300, 250) to (500, 300)
python scripts/add-arrow.py diagram.excalidraw 300 250 500 300
# Arrow with label
python scripts/add-arrow.py diagram.excalidraw 300 250 500 300 --label "HTTPS"
# Dashed arrow with custom color
python scripts/add-arrow.py diagram.excalidraw 400 350 600 400 --style dashed --color "#7950f2"
4. Workflow summary :
# Step 1: Create base diagram with title and structure
# (Create .excalidraw file with initial elements)
# Step 2: Add icons with labels
python scripts/add-icon-to-diagram.py my-diagram.excalidraw "Internet-gateway" 200 150 --label "Internet Gateway"
python scripts/add-icon-to-diagram.py my-diagram.excalidraw VPC 250 250
python scripts/add-icon-to-diagram.py my-diagram.excalidraw ELB 350 300 --label "Load Balancer"
python scripts/add-icon-to-diagram.py my-diagram.excalidraw EC2 450 350 --label "EC2 Instance"
python scripts/add-icon-to-diagram.py my-diagram.excalidraw RDS 550 400 --label "Database"
# Step 3: Add connecting arrows
python scripts/add-arrow.py my-diagram.excalidraw 250 200 300 250 # Internet → VPC
python scripts/add-arrow.py my-diagram.excalidraw 300 300 400 300 # VPC → ELB
python scripts/add-arrow.py my-diagram.excalidraw 400 330 500 350 # ELB → EC2
python scripts/add-arrow.py my-diagram.excalidraw 500 380 600 400 # EC2 → RDS
Benefits of Python Script Approach :
ALTERNATIVE: Manual Icon Integration (Not Recommended)
Only use this if Python scripts are unavailable:
Check for libraries :
List directory: skills/excalidraw-diagram-generator/libraries/ Look for subdirectories containing reference.md files
Read reference.md :
Open: libraries/<library-name>/reference.md This is lightweight (typically <300 lines) and lists all available icons
Find relevant icons :
Search the reference.md table for icon names matching diagram needs Example: For AWS diagram with EC2, S3, Lambda → Find "EC2", "S3", "Lambda" in table
Load specific icon data (WARNING: Large files):
Read ONLY the needed icon files: - libraries/aws-architecture-icons/icons/EC2.json (200-300 lines) - libraries/aws-architecture-icons/icons/S3.json (200-300 lines) - libraries/aws-architecture-icons/icons/Lambda.json (200-300 lines) Note: Each icon file is 200-1000 lines - this consumes significant tokens
Extract and transform elements :
Each icon JSON contains an "elements" array Calculate bounding box (min_x, min_y, max_x, max_y) Apply offset to all x/y coordinates Generate new unique IDs for all elements Update groupIds references Copy transformed elements into your diagram
Position icons and add connections :
Adjust x/y coordinates to position icons correctly in the diagram Update IDs to ensure uniqueness across diagram Add connecting arrows and labels as needed
Manual Integration Challenges :
Request : "Create an AWS architecture diagram with Internet Gateway, VPC, ELB, EC2, and RDS"
Recommended Workflow (using Python scripts) : Request : "Create an AWS architecture diagram with Internet Gateway, VPC, ELB, EC2, and RDS"
Recommended Workflow (using Python scripts) :
# Step 1: Create base diagram file with title
# Create my-aws-diagram.excalidraw with basic structure (title, etc.)
# Step 2: Check icon availability
# Read: libraries/aws-architecture-icons/reference.md
# Confirm icons exist: Internet-gateway, VPC, ELB, EC2, RDS
# Step 3: Add icons with Python script
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw "Internet-gateway" 150 100 --label "Internet Gateway"
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw VPC 200 200
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw ELB 350 250 --label "Load Balancer"
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw EC2 500 300 --label "Web Server"
python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw RDS 650 350 --label "Database"
# Step 4: Add connecting arrows
python scripts/add-arrow.py my-aws-diagram.excalidraw 200 150 250 200 # Internet → VPC
python scripts/add-arrow.py my-aws-diagram.excalidraw 265 230 350 250 # VPC → ELB
python scripts/add-arrow.py my-aws-diagram.excalidraw 415 280 500 300 # ELB → EC2
python scripts/add-arrow.py my-aws-diagram.excalidraw 565 330 650 350 --label "SQL" --style dashed
# Result: Complete diagram with professional AWS icons, labels, and connections
Benefits :
Alternative Workflow (manual, if scripts unavailable) :
libraries/aws-architecture-icons/reference.md exists → Yesicons/Internet-gateway.json (298 lines)icons/VPC.json (550 lines)icons/ELB.json (363 lines)icons/EC2.json (231 lines)icons/RDS.json (similar size) Total: ~2000+ lines of JSON to process.excalidraw fileChallenges with manual approach :
.excalidrawlib file you provide.If no icon libraries are set up:
See bundled references for:
references/excalidraw-schema.md - Complete Excalidraw JSON schemareferences/element-types.md - Detailed element type specificationstemplates/flowchart-template.json - Basic flowchart startertemplates/relationship-template.json - Relationship diagram startertemplates/mindmap-template.json - Mind map starterscripts/split-excalidraw-library.py - Tool to split .excalidrawlib filesscripts/README.md - Documentation for library toolsscripts/.gitignore - Prevents local Python artifacts from being committedPotential improvements:
Weekly Installs
10.6K
Repository
GitHub Stars
26.7K
First Seen
Feb 4, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
opencode10.3K
codex10.3K
gemini-cli10.3K
github-copilot10.3K
kimi-cli10.2K
amp10.2K
97,600 周安装
| "class", "inheritance", "OOP", "object model" |
| Interaction sequences, message flows | Sequence Diagram | "sequence", "interaction", "messages", "timeline" |
| Database design, entity relationships | ER Diagram | "database", "entity", "relationship", "data model" |