Tcloud Arch Diagram logo

Tcloud Arch Diagram

Community
darker2016
tcloud-arch-diagram

系统架构图绘制。当需要绘制任何系统架构图、云架构设计图、微服务架构图、Serverless架构图、混合云架构图时使用此技能,支持腾讯云及通用架构场景。基于 Draw.io XML 生成 .drawio 文件,支持二次可视化编辑。

Overview

Publisherdarker2016
Repositoryworkbuddy-skill-groups
Skill nametcloud-arch-diagram
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 Tcloud Arch Diagram 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/tcloud-arch-diagram
  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/tcloud-arch-diagram .claude/skills/tcloud-arch-diagram
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tcloud Arch Diagram 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 Tcloud Arch Diagram 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 Tcloud Arch Diagram 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.

系统架构图绘制 · AI 操作手册

你是系统架构图专家。接收到用户描述后,直接生成 Draw.io XML 文件,不输出任何中间步骤(无需坐标表、无需策略表)。如果架构包含腾讯云产品,使用腾讯云官方图标占位符,生成后自动注入。


执行流程(一步直出)

收到需求 → 内部规划(不输出)→ 生成完整 XML 文件 → 自动注入图标 → 输出完成通知

内部规划规则(AI 思考,不输出给用户)

在生成 XML 之前,AI 必须在思考中完成以下所有计算,但不向用户输出过程。

规则1:层次识别

从用户描述中提取层次结构,常见层次:

  • 外部用户层(无容器,游离节点)
  • 接入/安全层(WAF、CDN、CLB、DDoS 等)
  • 应用层(微服务、TKE、SCF 等,通常在 VPC 内)
  • 数据层(数据库、缓存、存储,通常在 VPC 内)
  • 监控/运维层(CM、CLS、CWP 等)

层次不限于以上,根据用户需求灵活调整(可以是左右分栏、3层、6层等)。

规则2:坐标计算(均匀居中分布)

画布宽度:1654px。容器从 x=30 开始,宽 1594px。

容器 y 坐标:

  • 层0(外部,无容器):y=30,高度 120px
  • 层1:y=190
  • 层n:y = 上一层容器底部 + 60(层间走廊)

容器高度:

height = 40 + 行数 × (节点高 + 40) + 40
图标节点高=60,文字节点高=40
1行图标=180,2行图标=280,3行图标=390

节点水平均匀分布(强制,防止节点堆积左侧):

间距 = (1594 - 80 - 节点数×节点宽) ÷ (节点数 - 1)
若间距 > 160px:改为固定间距120px,整组居中
  总占用 = 节点数×宽 + (节点数-1)×120
  起始x = (1514 - 总占用) ÷ 2 + 40

第i个节点相对x = 起始x + i × (节点宽 + 间距)
多行时每行独立计算,行间距60px

规则3:连线策略(三策略决策树)

走廊Y = 上层容器底部y + 30(路径点必须落在这里,禁止落在节点区域)

源节点出线数 = 1   → 策略A:exitX=0.5,exitY=1 → 路径点走廊Y → entryX=0.5,entryY=0
源节点出线数 = 2   → 策略B:exitX=0.3/0.7 分槽位
源节点出线数 = 3   → 策略C:exitX=0.25/0.5/0.75 分槽位
源节点出线数 ≥ 4  → 策略D:Bus汇聚节点(强制)
  在走廊Y处放小圆点 Bus 节点(style见4.3)
  源→Bus(1条),Bus→各目标(多条)

只画核心数据流:全图连线 ≤ 15 条,同层服务间不画线,容器间用代表性连线(1-2条)。

容器内连线(parent=容器id,路径点为容器内相对坐标):

  • 相邻无阻挡:直连,不加路径点
  • 中间有阻挡:底部绕行,bypassY = 容器高度 - 10

绝对坐标换算:

节点绝对中心X = 容器.x + 节点相对x + 节点宽/2
节点绝对中心Y = 容器.y + 30 + 节点相对y + 节点高/2

XML 生成规范

文件模板

xml
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="tcloud-arch-diagram" version="21.0.0">
  <diagram id="arch-main" name="架构图">
    <mxGraphModel dx="1422" dy="762" grid="1" gridSize="10" guides="1"
      tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1"
      pageWidth="1654" pageHeight="1169" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <!-- 写入顺序:容器 → 节点 → Bus节点 → 连线 -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

容器

xml
<mxCell id="layer1" value="接入层(安全 &amp; 分发)"
  style="swimlane;startSize=30;fillColor=#FCE8E6;strokeColor=#C62828;
  fontColor=#C62828;fontStyle=1;fontSize=13;html=0;"
  vertex="1" parent="1">
  <mxGeometry x="30" y="190" width="1594" height="180" as="geometry"/>
</mxCell>

容器颜色:

层次fillColorstrokeColor
外部用户#F5F5F5#9E9E9E
接入/安全层#FCE8E6#C62828
应用层(VPC)#E6F4EA#00875A
数据层(VPC)#EDE7F6#7B2FA0
监控/运维层#E3F2FD#1565C0

节点

腾讯云产品(占位符格式):

xml
<mxCell id="clb1" value="CLB&#xa;负载均衡"
  style="tcloud-icon:clb;html=0;"
  vertex="1" parent="layer1">
  <mxGeometry x="240" y="40" width="60" height="60" as="geometry"/>
</mxCell>

自定义服务节点:

xml
<mxCell id="svc1" value="推荐服务&#xa;(TKE)"
  style="rounded=1;arcSize=15;fillColor=#E8F0FE;strokeColor=#0052D9;
  fontSize=11;fontColor=#333333;html=0;"
  vertex="1" parent="layer2">
  <mxGeometry x="40" y="40" width="120" height="50" as="geometry"/>
</mxCell>

Bus 汇聚节点(≥4 条出线时):

xml
<mxCell id="bus1" value=""
  style="ellipse;fillColor=#000000;strokeColor=none;html=0;"
  vertex="1" parent="1">
  <mxGeometry x="550" y="490" width="8" height="8" as="geometry"/>
</mxCell>

文字规范(强制):

  • 所有节点 style 必须包含 html=0;
  • value 只写纯文本,禁止 <b> <br> 等 HTML 标签
  • 多行文字用 &#xa;

连线

基础模板(跨层连线必须提供路径点):

xml
<mxCell id="e1"
  style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;
  jettySize=auto;html=0;
  exitX=0.5;exitY=1;exitDx=0;exitDy=0;
  entryX=0.5;entryY=0;entryDx=0;entryDy=0;
  strokeColor=#0052D9;strokeWidth=2;endArrow=block;endFill=1;"
  edge="1" parent="1" source="clb1" target="svc1">
  <mxGeometry relative="1" as="geometry">
    <Array as="points">
      <mxPoint x="270" y="400"/>
      <mxPoint x="100" y="400"/>
    </Array>
  </mxGeometry>
</mxCell>

连线颜色:

类型strokeColorstrokeWidth
主调用链路#0052D92
数据流/写入#00875A1.5
控制/管理#7B2FA01,dashed=1
监控/弱依赖#9E9E9E1,dashed=1

禁止清单

  • ❌ 跨层连线使用空 <mxGeometry/> → ✅ 必须提供 <Array as="points">
  • ❌ 容器内连线穿越图标节点 → ✅ 有阻挡时底部绕行(bypassY = 容器高度-10)
  • ❌ 同层服务间画多余连线 → ✅ 只画层间核心数据流
  • ❌ 子节点 parent="1" → ✅ 必须 parent="容器id"
  • ❌ ≥4 条出线直接分叉 → ✅ 使用 Bus 汇聚节点
  • ❌ value 含 HTML 标签 → ✅ 纯文本 + html=0;
  • ❌ 同侧多线重复 exitX → ✅ 分槽位(0.25/0.5/0.75)

完成交付

生成 XML 文件后,AI 自动执行:

bash
python scripts/inject_icons.py <文件名>.drawio

然后向用户输出:


✅ 架构图已完成:<文件名>.drawio

架构共分为 N 层:

层次主要组件
接入层WAF、CDN、CLB
应用层推荐服务、视频服务 ...
数据层MySQL、Redis、COS ...

查看方式:

修改方式: 在 Draw.io 中可直接拖动节点、双击改文字、右键 Edit Style 改样式,修改后可导出 PNG/SVG。


将层次表替换为本次实际内容。


图标速查表

腾讯云产品节点使用 style="tcloud-icon:key;html=0;",宽高均为 60px。

分类key产品名
外部user用户
外部internet互联网
网络cdnCDN
网络clbCLB 负载均衡
网络natNAT 网关
网络eip弹性公网 IP
网络direct_connect专线接入
安全wafWAF
安全ddosDDoS 防护
安全cwp主机安全 CWP
安全tcss容器安全 TCSS
计算cvmCVM 云服务器
计算tkeTKE 容器服务
计算scfSCF 云函数
计算lighthouseLighthouse
计算as弹性伸缩 AS
存储cosCOS 对象存储
存储cbsCBS 云硬盘
存储cfsCFS 文件存储
数据库mysqlTencentDB MySQL
数据库redisTencentDB Redis
数据库mongodbMongoDB
数据库tdsqlTDSQL
数据库cynosdbTDSQL-C
中间件apigwAPI 网关
中间件ckafkaCKafka
中间件tsfTSF 微服务
监控cm云监控
监控clsCLS 日志服务
监控cat云拨测
大数据emrEMR
大数据esElasticsearch

自检清单(生成 XML 后逐项检查,不输出给用户)

布局

  • 每层节点均匀居中分布(无左堆积,右侧无大量空白)
  • 多行节点每行独立居中计算
  • 容器高度足够,节点不溢出
  • 子节点 parent = 容器id

连线

  • 全图连线 ≤ 15 条
  • 跨层连线有路径点,y 落在走廊范围内
  • 容器内阻挡连线已绕行
  • ≥4 条出线使用 Bus 节点
  • 同侧无重复 exitX

文字与图标

  • 所有节点含 html=0;
  • 腾讯云节点使用 tcloud-icon:key 占位符

Frequently asked questions

What does the Tcloud Arch Diagram AI skill do?

系统架构图绘制。当需要绘制任何系统架构图、云架构设计图、微服务架构图、Serverless架构图、混合云架构图时使用此技能,支持腾讯云及通用架构场景。基于 Draw.io XML 生成 .drawio 文件,支持二次可视化编辑。

Why use Tcloud Arch Diagram on TypingMind?

Because you install it once and use it with any model. Tcloud Arch Diagram 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 Tcloud Arch Diagram 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/tcloud-arch-diagram. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Tcloud Arch Diagram?

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 Tcloud Arch Diagram?

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

Is the Tcloud Arch Diagram 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 👇