← 返回
未分类 中文

Visual Architecture

Render restrained architecture diagrams from structured JSON with a deterministic local SVG renderer.
使用本地确定性SVG渲染器将结构化JSON渲染为简约架构图
leostehlik leostehlik 来源
未分类 clawhub v0.2.5 3 版本 100000 Key: 无需
★ 0
Stars
📥 419
下载
💾 0
安装
3
版本
#architecture#diagrams#latest#openclaw#svg

概述

Visual Architecture

Render architecture diagrams with the bundled Python renderer instead of hand-writing SVG.

Workflow

  1. Create a JSON file with title, nodes, and edges.
  2. Snap intended node positions to the renderer grid mentally before writing them:
    • horizontal grid: 120px
    • vertical grid: 80px
  3. Run:
python3 skills/visual-architecture/scripts/render_architecture.py input.json output.svg
  1. If rsvg-convert is available and you need a bitmap preview, run:
rsvg-convert -o output.png output.svg

JSON Input Structure

{
  "title": "Service Map",
  "nodes": [
    {
      "id": "web",
      "label": "Web App",
      "subtitle": "User interface",
      "kind": "service",
      "x": 120,
      "y": 160
    },
    {
      "id": "api",
      "label": "API",
      "subtitle": "Business logic",
      "kind": "service",
      "x": 360,
      "y": 160
    }
  ],
  "edges": [
    {
      "from": "web",
      "to": "api",
      "kind": "primary-data",
      "label": "HTTP"
    }
  ]
}

Node Kinds

  • service: rounded rectangle
  • llm: double-border rounded rectangle
  • agent: hexagon
  • memory: cylinder

Each node requires:

  • id: unique string
  • label: primary title
  • kind: one of the node kinds above
  • x, y: grid-aligned center coordinates

Optional:

  • subtitle: smaller secondary label
  • show_grid: set true to display the editing grid in the exported SVG

Edge Kinds

  • primary-data: blue solid arrow
  • memory-write: green dashed arrow
  • control: slate dashed arrow

Each edge requires:

  • from: source node id
  • to: target node id

Optional:

  • label: rendered on the route with a shielding background rect
  • source_side, target_side: force edge anchors (left, right, top, bottom)
  • via: array of orthogonal turn points, each with x and y
  • label_segment: zero-based segment index to place the label on
  • label_offset: [dx, dy] shift for fine label placement

Renderer Guarantees

  • Route arrows orthogonally only
  • Render in this order: background, arrows, nodes, labels
  • Keep label shields behind arrow text for readability
  • Stay restrained: clean strokes, no decorative effects, and hide the editing grid unless explicitly requested

Usage Notes

  • Prefer this skill when the user wants architecture diagrams, routing maps, or system relationship visuals.
  • Choose semantic kinds first, then place nodes on the grid, then add only the edges needed to explain flow.
  • Keep diagrams sparse. If a diagram feels crowded, split it into two files instead of forcing a dense composite.

Example

Use examples/service-map.json as a generic starting point for web app, API, worker, database, and LLM provider diagrams.

版本历史

共 3 个版本

  • v0.2.5 当前
    2026-05-25 16:59 安全 安全
  • v0.2.0
    2026-05-23 23:33 安全 安全
  • v0.1.0
    2026-05-21 23:54 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 329 📥 93,016
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 216 📥 46,633
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 425 📥 116,245