Diagrams Generator logo

Diagrams Generator

Community
darker2016
diagrams-generator

Generate professional diagrams including cloud architecture, data charts, academic figures, and more. Triggers on requests like "画架构图", "画图表", "画论文插图", "生成系统图", "create diagram", "visualize data", "draw neural network", or when users provide a sketch/image they want to recreate professionally.

Overview

Publisherdarker2016
Repositoryworkbuddy-skill-groups
Skill namediagrams-generator
Stars
35
Forks
5
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by darker2016 on GitHub. Read the source before you install it.

Installation

Install the Diagrams Generator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/darker2016/workbuddy-skill-groups/tree/main/aicoding-architecture-expert-skills/skills/diagrams-generator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/darker2016/workbuddy-skill-groups.git /tmp/workbuddy-skill-groups
mkdir -p .claude/skills
cp -r /tmp/workbuddy-skill-groups/aicoding-architecture-expert-skills/skills/diagrams-generator .claude/skills/diagrams-generator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Diagrams Generator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Diagrams Generator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Diagrams Generator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Diagrams Generator

Generate professional diagrams using the most suitable tool for each scenario.

工具选择矩阵

场景推荐工具速度质量安装成本
云架构图 (AWS/GCP/Azure/K8s)diagrams⚡ 快★★★★轻量 (~50MB)
数据图表 (折线/柱状/饼图)matplotlib⚡ 快★★★轻量
统计图表 (热力图/分布图)seaborn⚡ 快★★★★轻量
交互式图表 (Web/3D)plotly⚡ 快★★★★轻量
流程图/状态机graphviz⚡ 快★★★轻量
网络拓扑/关系图networkx⚡ 快★★★轻量
学术论文图 (神经网络/模型架构)TikZ🐢 慢★★★★★重量 (~4GB)
学术论文图 (快速替代)matplotlib⚡ 快★★★轻量

Prerequisites (按需安装)

基础工具 (大多数场景)

bash
# Graphviz (diagrams 依赖)
brew install graphviz  # macOS
apt-get install graphviz  # Linux

# Python 库
pip install diagrams matplotlib seaborn plotly networkx

TikZ/LaTeX (学术论文级图表 - 可选)

bash
# macOS - 完整安装 (~4GB, 10-15分钟)
brew install --cask mactex

# macOS - 轻量安装 (~500MB)
brew install --cask basictex
sudo tlmgr install tikz-cd pgfplots standalone

# Linux
apt-get install texlive-full  # 完整版
# 或
apt-get install texlive-base texlive-pictures texlive-latex-extra  # 轻量版

Workflow

Phase 1: Requirement Understanding & Tool Recommendation (MANDATORY)

⚠️ CRITICAL: You MUST complete ALL steps in Phase 1 and receive explicit user confirmation BEFORE proceeding to Phase 2. DO NOT skip this phase or generate code without confirmation.

  1. Receive input: User provides text description and/or reference image

  2. Identify Scenario: 根据用户描述中的关键词,识别场景类型:

    检测关键词场景判断
    架构/系统/微服务/AWS/GCP/K8s→ 云架构图
    数据/趋势/统计/柱状/折线/饼图→ 数据图表
    交互/动态/Web/仪表板→ 交互图表
    热力图/分布/相关性→ 统计图表
    流程/状态机/决策树→ 流程图
    网络/拓扑/节点/关系→ 关系图
    论文/学术/神经网络/模型架构→ 学术图
  3. Analyze and extract:

    • Components (services, databases, users, layers, etc.)
    • Groupings/Clusters (VPC, regions, logical groups, network layers)
    • Connections and data flows
    • Labels and annotations
  4. ⚠️ MANDATORY OUTPUT - 输出以下结构化内容:

    你必须按照以下格式输出,缺一不可:


    4.1 架构理解 - Natural language summary of the architecture

    4.2 组件清单 - List all identified components by layer

    4.3 连接关系 - Describe all connections and data flows

    4.4 Mermaid 预览 - Provide Mermaid diagram code for quick visual preview

    4.5 ⚠️ 工具选项表 (THIS IS REQUIRED - DO NOT SKIP)

    根据识别的场景,你必须输出对应的完整工具选项表格:


    场景: 云架构图 (AWS/GCP/Azure/K8s)

    方案工具速度质量输出格式说明
    Adiagrams⚡ 快★★★★PNG/SVG云图标丰富,专业
    Bgraphviz⚡ 快★★★PNG/SVG/PDF通用流程图风格
    CPlantUML⚡ 快★★★PNG/SVG需 Java 环境

    💡 推荐: 方案 A (diagrams) - 专为云架构设计


    场景: 数据图表 (折线/柱状/饼图/散点)

    方案工具速度质量输出格式说明
    Amatplotlib⚡ 快★★★PNG/SVG/PDF即开即用,最通用
    Bplotly⚡ 快★★★★HTML/PNG交互式,可缩放
    Cpyecharts⚡ 快★★★★HTML中文友好,样式丰富

    💡 推荐: 静态图选 A,交互式选 B


    场景: 学术论文图 (神经网络/模型架构/算法流程)

    方案工具速度质量输出格式说明
    Amatplotlib⚡ 快★★★PNG/SVG/PDF即开即用,适合初稿
    BTikZ/LaTeX🐢 慢★★★★★PDF/PNG首次需下载 500MB-4GB

    💡 推荐: 赶时间选 A,正式发表选 B


    场景: 流程图/状态机/决策树

    方案工具速度质量输出格式说明
    Agraphviz⚡ 快★★★PNG/SVG/PDF专业流程图
    Bmermaid-cli⚡ 快★★★PNG/SVG需 Node.js 环境
    CPlantUML⚡ 快★★★PNG/SVG需 Java 环境

    💡 推荐: 方案 A (graphviz) - 无额外依赖


    场景: 网络拓扑/关系图/知识图谱

    方案工具速度质量输出格式说明
    Anetworkx + matplotlib⚡ 快★★★PNG/SVG静态图,轻量
    Bpyvis⚡ 快★★★★HTML交互式,可拖拽
    Cgraphviz⚡ 快★★★PNG/SVG/PDF层次布局清晰

    💡 推荐: 静态选 A,交互式选 B


    场景: 统计图表 (热力图/分布图/相关性矩阵)

    方案工具速度质量输出格式说明
    Aseaborn⚡ 快★★★★PNG/SVG/PDF统计图专用
    Bmatplotlib⚡ 快★★★PNG/SVG/PDF更灵活,需手动配置
    Cplotly⚡ 快★★★★HTML/PNG交互式热力图

    💡 推荐: 方案 A (seaborn) - 统计可视化首选


  5. MANDATORY CONFIRMATION - 你必须询问用户确认:

    • 架构理解是否正确?
    • 组件/连接是否需要增减?
    • 请选择工具方案: [A] / [B] / [C]?(或使用推荐方案)
    • ⚠️ DO NOT proceed to Phase 2 until user explicitly confirms AND chooses a tool

Required output format (MUST follow this structure):

markdown
## 1. 架构理解

我理解你需要的架构图包含以下内容:[简要描述]

## 2. 组件清单

- **用户层**: Business Analyst, Developer
- **应用层**: Cloud Run (wiki-interface, evaluator)
- **数据层**: Redis (Memorystore), Cloud SQL

## 3. 连接关系

- User → wiki-interface → evaluator
- evaluator → Redis (缓存)

## 4. Mermaid 预览

```mermaid
graph LR
    User --> wiki[wiki-interface]
    wiki --> eval[evaluator]
    eval --> Redis

5. ⚠️ 工具选项表

检测到场景: 云架构图

方案工具速度质量输出格式说明
Adiagrams⚡ 快★★★★PNG/SVG云图标丰富,专业
Bgraphviz⚡ 快★★★PNG/SVG/PDF通用流程图风格
CPlantUML⚡ 快★★★PNG/SVG需 Java 环境

💡 推荐: 方案 A (diagrams) - 专为云架构设计,图标更专业


请确认

  1. 架构理解是否正确?组件是否需要增减?
  2. 连接关系是否准确?
  3. 布局方向偏好(左右 LR / 上下 TB)?
  4. 请选择工具方案: [A] / [B] / [C]?(直接回复字母,或回复"用推荐")

确认后我将生成专业的架构图。


### Phase 2: Code Generation & Execution

After user confirms, generate Python code following these rules:

#### Output Configuration
```python
with Diagram(
    "Diagram Name",
    filename="./pic/{subfolder}/{name}",  # Output to pic subdirectory
    outformat=["png", "svg"],              # Both formats
    show=False,                            # Don't auto-open
    direction="LR"                         # Left-to-right by default
):
Directory Setup

Before execution, ensure output directory exists:

python
import os
os.makedirs("./pic/{subfolder}", exist_ok=True)
Code Structure Template
python
from diagrams import Diagram, Cluster, Edge
# Import nodes based on cloud provider
# from diagrams.gcp.compute import Run, ComputeEngine
# from diagrams.aws.compute import EC2, Lambda
# from diagrams.k8s.compute import Pod, Deployment

import os
output_dir = "./pic/{diagram_name}"
os.makedirs(output_dir, exist_ok=True)

with Diagram(
    "{Diagram Title}",
    filename=f"{output_dir}/{diagram_name}",
    outformat=["png", "svg"],
    show=False,
    direction="LR"
):
    # Define clusters and nodes
    with Cluster("Cluster Name"):
        node1 = ServiceType("Label")
    
    # Define connections
    node1 >> Edge(label="description") >> node2

Phase 3: Save Code & Result Feedback

After execution:

  1. Save the Python source code to ./pic/{name}/{name}.py (same folder as generated images)
  2. Report generated file paths:
    • ./pic/{name}/{name}.py (source code)
    • ./pic/{name}/{name}.png
    • ./pic/{name}/{name}.svg
  3. If errors occur, analyze and fix automatically

Node Import Reference

See references/diagrams-api.md for complete node import paths.

Quick Reference - Common Providers

ProviderImport PatternExample
GCPdiagrams.gcp.{category}from diagrams.gcp.compute import Run
AWSdiagrams.aws.{category}from diagrams.aws.compute import EC2
Azurediagrams.azure.{category}from diagrams.azure.compute import VM
K8sdiagrams.k8s.{category}from diagrams.k8s.compute import Pod
Genericdiagrams.generic.{category}from diagrams.generic.compute import Rack
On-Premisediagrams.onprem.{category}from diagrams.onprem.database import PostgreSQL

Common Categories

  • compute: EC2, Run, Pod, VM
  • database: RDS, SQL, PostgreSQL, Redis
  • network: ELB, VPC, DNS, CDN
  • storage: S3, GCS, PersistentDisk
  • analytics: BigQuery, Dataflow
  • ml: SageMaker, VertexAI
  • security: IAM, KMS, WAF
  • client: User, Users, Client

扩展能力:多种 Python 绑图库支持

除了 diagrams 库用于架构图,本 Skill 支持根据用户需求动态选择合适的 Python 绘图库:

场景推荐库安装命令适用场景
云架构图diagramspip install diagramsAWS/GCP/Azure/K8s 架构可视化
数据可视化matplotlibpip install matplotlib折线图、柱状图、散点图、饼图等
统计图表seabornpip install seaborn高级统计图、热力图、分布图
交互式图表plotlypip install plotly可交互的 Web 图表、3D 图
流程图/思维导图graphvizpip install graphviz流程图、状态机、决策树
网络拓扑图networkx + matplotlibpip install networkx网络关系图、图论可视化
甘特图/时序图plotly / matplotlib-项目管理、时间线

Design Best Practices

  1. Use Clusters for logical grouping (VPC, Region, Service Group)
  2. Direction: Use LR (left-right) for wide diagrams, TB (top-bottom) for tall ones
  3. Edge labels: Add Edge(label="HTTP") for connection descriptions
  4. Consistent naming: Use clear, descriptive labels
  5. Color coding: Leverage built-in provider colors for visual distinction

输出格式指南

格式适用场景工具支持
PNG通用展示、PPT、网页所有工具
SVG网页嵌入、可缩放matplotlib, diagrams, plotly
PDF论文插图、打印TikZ (原生), matplotlib
HTML交互式展示plotly

Frequently asked questions

What does the Diagrams Generator AI skill do?

Generate professional diagrams including cloud architecture, data charts, academic figures, and more. Triggers on requests like "画架构图", "画图表", "画论文插图", "生成系统图", "create diagram", "visualize data", "draw neural network", or when users provide a sketch/image they want to recreate professionally.

Why use Diagrams Generator on TypingMind?

Because you install it once and use it with any model. Diagrams Generator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Diagrams Generator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/darker2016/workbuddy-skill-groups/tree/main/aicoding-architecture-expert-skills/skills/diagrams-generator. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Diagrams Generator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Diagrams Generator?

As many as you like. As long as a model supports skills, you can use Diagrams Generator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Diagrams Generator AI skill free?

It is published on GitHub by darker2016. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇