Zerox Architecture Diagram 标志

Zerox Architecture Diagram

社区
ZeroxZhang
zerox-architecture-diagram

Create and review professional system architecture, infrastructure, cloud, security, network-topology, deployment, and data-flow diagrams as self-contained HTML plus standalone SVG. Use this skill whenever a user wants to visualize technical components or service relationships, especially when layout, swimlanes, edge routing, multi-region grouping, presentation mode, or export quality matters.

Add to TypingMind

概览

发布者ZeroxZhang
代码仓库zerox-skills
技能名称zerox-architecture-diagram
星标数
40
复刻数
5
附带文件
15
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 15 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 ZeroxZhang 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Zerox Architecture Diagram AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/ZeroxZhang/zerox-skills/tree/main/zerox-architecture-diagram
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZeroxZhang/zerox-skills.git /tmp/zerox-skills
mkdir -p .claude/skills
cp -r /tmp/zerox-skills/zerox-architecture-diagram .claude/skills/zerox-architecture-diagram
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Zerox Architecture Diagram,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Zerox Architecture Diagram。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Zerox Architecture Diagram 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Architecture Diagram Skill

Create readable architecture diagrams whose layout remains correct after SVG extraction, browser resizing, and presentation export. Treat layout as a deterministic pipeline, not a collection of hand-tuned coordinates.

Required resources

Read these files before generating a diagram:

  1. references/layout.md — graph model, sizing, placement, ports, routing, labels, and viewBox calculation.
  2. references/design-system.md — themes, typography, component styles, icons, and SVG patterns.
  3. references/quality-gates.md — semantic SVG contract, validator usage, visual review, and output requirements.

Use assets/template.html for standard scrollable output. For presentation output, use assets/template-presentation.html; changing only CSS does not create a valid 16:9 layout.

Workflow

Follow the seven stages in order. A later stage may send the work back to an earlier stage when validation exposes a layout defect.

1. Resolve requirements

Infer values from context when safe. Otherwise ask only for choices that materially change the diagram.

SettingDefaultOptions
ThemeLightLight, Dark
LanguageChineseChinese, English
ModeStandardStandard, Presentation
StyleIcon when availableIcon, Text-only
Flow directionAutoLR, TB
ScopeSingle regionSingle region, Multi-region / Multi-AZ

Direction rules:

  • Use TB when horizontal bands represent primary tiers such as 接入层 / 应用层 / 数据层.
  • Use LR for request or data pipelines without primary horizontal tiers.
  • Do not use layer ambiguously. rank means graph depth, lane means a visual band, and group means a containing boundary such as Region, AZ, cluster, or trust domain.

2. Normalize the graph

Assign every object a stable ASCII ID before choosing coordinates.

  • Node: id, label, sublabel, type, icon, rank, lane, group.
  • Edge: id, source, target, kind, label, preferred ports, optional bus ID.
  • Lane: id, label, order.
  • Group: id, label, parent group, padding.

Treat message buses and gateways as real nodes when they have independent semantics. Preserve cycles; mark their return edges for an outer route channel.

3. Write the layout plan

Place this plan as an HTML comment immediately before the SVG. List every node and edge.

text
MODE standard  THEME light  DIRECTION TB  GRID base=10 major=20
LANE access       order=0 label="接入层"
GROUP aws-west    parent=- label="AWS 区域: us-west-2"
NODE api          rank=1 lane=application group=aws-west x=420 y=240 w=140 h=60 type=backend icon=server
EDGE api-db       api:right -> db:left kind=sync label="SQL" bus=api-data

The plan is the source of truth for graph completeness; SVG metadata must use the same IDs.

4. Run the layout pipeline

Use the algorithms and constants in references/layout.md:

  1. Measure text and determine node sizes.
  2. Assign ranks and order nodes to reduce crossings.
  3. Size lanes and nested groups from their content.
  4. Assign coordinates using actual rank widths and node heights.
  5. Assign source and target ports.
  6. Route orthogonal edges around inflated obstacles.
  7. Place labels, legend, and title; then derive the viewBox from the union of all geometry.

Do not write SVG routes until node, lane, and group geometry is stable.

5. Generate semantic SVG and HTML

Start from the mode-specific template and preserve its semantic hooks:

  • data-role="boundary|lane|edge-route|bus-trunk|component|edge-label|legend"
  • stable data-id, data-edge-id, data-source, and data-target
  • explicit geometry in data-bbox and route points in data-points
  • SVG-local styles, font stack, markers, title, and description

Render in this order:

text
background -> boundaries -> lanes -> edge routes / bus trunks
-> component masks and boxes -> component text/icons
-> edge labels -> legend

Draw a shared bus trunk once. Draw each branch once from its junction to its target. Use a neutral trunk if branches have different semantics.

6. Extract and validate

Extract the exact inline SVG:

bash
python3 scripts/extract_svg.py output.html output.svg

Run the deterministic quality gate on both artifacts:

bash
python3 scripts/validate_diagram.py output.html --strict
python3 scripts/validate_diagram.py output.svg --strict
python3 scripts/validate_diagram.py output.html --compare output.svg --strict

Fix the layout model or algorithm that caused a failure. Do not silence a check or move a single label without re-running the complete gate.

7. Rendered review

Run the browser-backed geometry probe when Chrome/Chromium is available:

bash
python3 scripts/render_check.py output.html --width 1440 --height 900
python3 scripts/render_check.py output.svg --width 1000 --height 760
# Presentation mode:
python3 scripts/render_check.py output.html --width 1280 --height 720

Then open both files and inspect the actual rendered result.

  • Standard: desktop and narrow viewport; horizontal scrolling is allowed only inside the diagram region.
  • Presentation: exact 1280×720 viewBox with no clipping.
  • Verify long Chinese/English labels, marker tips, tooltips, dark theme, and standalone SVG fonts.
  • Inspect at 100% and 200% zoom.

The static validator checks declared geometry. Browser review remains required because final glyph metrics vary by platform.

Layout invariants

These are hard constraints; the detailed calculations live in references/layout.md.

  • Base grid: 10px for node coordinates and sizes. Major grid: 20px for lanes, groups, rank origins, and viewBox dimensions.
  • Node gap: at least 40px on the axis where their projections overlap.
  • Route clearance: at least 20px from unrelated nodes and 8px between parallel routes.
  • Source endpoint: on the declared source boundary. Target endpoint: 2px before the declared target boundary, with the final segment pointing toward it.
  • Route shape: absolute orthogonal M/L segments only; no diagonal segment unless the user explicitly requests free-form routing.
  • Labels: reserve a label corridor and keep a 4px gap from components, boundaries, and other labels.
  • Lanes: reserve a label gutter; nodes must lie inside the lane content rectangle.
  • Groups: derive size from contained geometry plus title gutter and padding. Layout inner groups before outer groups.
  • Standard legend: centered horizontally and at least 20px below all content boundaries.
  • Presentation legend: bottom-right with 20px right/bottom margins; it is not subject to the standard centering rule.
  • Standard viewBox: content-derived, at least 1000×680, snapped up to the 20px major grid.
  • Presentation viewBox: exactly 0 0 1280 720.

Language and accessibility

Chinese is the default for titles, node labels, lane labels, edge labels, legends, and summaries. Keep proper nouns, protocols, ports, and technologies in their conventional form.

Every SVG must include:

  • xmlns="http://www.w3.org/2000/svg"
  • numeric intrinsic width and height matching the viewBox
  • role="img" and aria-labelledby
  • one overall <title> and <desc>
  • one native <title> as the first child of every component group
  • an SVG-local font stack; do not rely on HTML inheritance or remote fonts

Output

Always return two self-contained files:

  1. .html — inline SVG, embedded CSS, optional summary cards, no runtime JavaScript, no external fonts/images/stylesheets.
  2. .svg — the exact extracted SVG, with local styles/defs/tooltips and no HTML dependency.

Report the chosen mode, direction, validator result, and any intentionally allowed crossing or exception.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Zerox Architecture Diagram AI 技能有什么作用?

Create and review professional system architecture, infrastructure, cloud, security, network-topology, deployment, and data-flow diagrams as self-contained HTML plus standalone SVG. Use this skill whenever a user wants to visualize technical components or service relationships, especially when layout, swimlanes, edge routing, multi-region grouping, presentation mode, or export quality matters.

为什么在 TypingMind 中使用 Zerox Architecture Diagram?

因为您只需安装一次,就能搭配任何模型使用。Zerox Architecture Diagram 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Zerox Architecture Diagram?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/ZeroxZhang/zerox-skills/tree/main/zerox-architecture-diagram。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Zerox Architecture Diagram?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Zerox Architecture Diagram 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Zerox Architecture Diagram 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Zerox Architecture Diagram AI 技能免费吗?

是的。ZeroxZhang 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇