Token导航 LogoToken导航

Agent Skill · 前端设计

bruce-drawio(布鲁斯·德拉维奥)

bruce-drawio 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

bruce-drawio 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 7,649。

总安装 353周安装 15GitHub Stars 86下载 124核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bruce-drawio(布鲁斯·德拉维奥)
来源仓库:https://github.com/brucevanfdm/bruce-drawio
仓库路径:skills/bruce-drawio
安装命令:
npx skills add https://github.com/brucevanfdm/bruce-drawio --skill bruce-drawio
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/brucevanfdm/bruce-drawio --skill bruce-drawio

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

bruce-drawio 用于生成 Draw.io 图表,支持流程图、架构图和 UML 等多种类型。适合在 Codex、Claude、Cursor、Gemini CLI 中创建可视化设计文档。通过 XML 生成、自检和 CLI 导出三步流程输出 .drawio 文件和图片。

使用前需确认 draw.io desktop CLI 安装,注意仅限图表生成用途。建议结合原始 README 和仓库文档进一步核验具体使用方法和限制条件。

来源仓库内路径:skills/bruce-drawio

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/brucevanfdm/bruce-drawio --skill bruce-drawio;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

bruce-drawio 怎么安装?

在终端执行 npx skills add https://github.com/brucevanfdm/bruce-drawio --skill bruce-drawio。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

bruce-drawio 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

bruce-drawio 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

bruce-drawio 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

bruce-drawio 用的人多吗?

公开数据是累计安装 353 次,近一周安装 15 次,下载 124 次,GitHub 86 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

bruce-drawio 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
bruce-drawio

布鲁斯·德拉维奥 · 本页

35386需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Draw.io Diagram Generator

Workflow

1. Understand requirements  -> determine diagram type, elements, relationships
2. Generate XML directly    -> write drawio XML (read only the relevant section from references/best-practices.md)
3. Self-review (DO NOT SKIP) -> re-read XML and fix any issues found
4. Save .drawio file        -> write to user's working directory
5. CLI export               -> call draw.io desktop CLI to export image
6. Deliver to user          -> show image + provide editable .drawio file

Step 1: Understand Requirements

Determine:

  • Diagram type: flowchart / architecture / uml-sequence / uml-class / er / mindmap / network
  • Key elements: nodes, components, participants, entities
  • Relationships: connections, dependencies, flow direction
  • Output format: PNG (default) / SVG / PDF
  • Language: match the user's language for labels

Step 2: Generate XML

You MUST write the XML directly. Do not call any script to generate it.

Base XML Structure

<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" agent="drawio-skill" version="21.0.0" type="device">
  <diagram name="DiagramName" id="diagram-1">
    <mxGraphModel dx="1422" dy="762"
                   grid="1" gridSize="10"
                   guides="1" tooltips="1" connect="1"
                   arrows="1" fold="1"
                   page="1" pageScale="1"
                   pageWidth="1600" pageHeight="1200"
                   math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />

        <!-- nodes and edges here -->

      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

Node Template

<mxCell id="node-1" value="Label"
        style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=14;"
        vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="160" height="60" as="geometry" />
</mxCell>

Text Content Rules

  • For multi-line labels, encode line breaks as &#xa; inside value, for example value="API&#xa;Gateway"
  • Do not write literal \n inside value; draw.io will render it as backslash + n text
  • Keep html=1 on nodes, but still use &#xa; as the default line-break form for predictable output

Edge Template

<mxCell id="edge-1" value=""
        style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;"
        edge="1" parent="1" source="node-1" target="node-2">
  <mxGeometry relative="1" as="geometry" />
</mxCell>

Step 3: Layout Rules (CRITICAL for beautiful output)

General Principles

  1. Grid alignment: all x, y coordinates must be multiples of 10 (snap to grid)
  2. Generous spacing: minimum 80px gap between node edges (not centers)
  3. Center alignment: nodes in the same column share the same x; nodes in the same row share the same y
  4. Consistent sizing: same-type nodes use identical width and height
  5. Page margins: keep at least 60px from the canvas edge (pageWidth/pageHeight)
  6. Use whiteSpace=wrap;html=1; on all nodes so long text wraps instead of overflowing
  7. Balanced gutters: outer padding around a row/column should visually match the internal gaps; avoid one oversized blank side
  8. Symmetry first: centered groups should have roughly equal left/right and top/bottom whitespace
  9. Dense fill: containers, sub-groups, and sidebars should fit content plus consistent padding; do not leave large dead zones just because the canvas is large

Layout by Diagram Type

TypeDirectionPrimary axisSpacing (between edges)Alignment
FlowchartTop-to-bottomY increases100px verticalCenter x
ArchitectureLayered block (preferred)Y increases20px between layersLeft label + container rows
UML SequenceLeft-to-right participantsX increases200px horizontalTop-aligned
UML ClassGrid / top-to-bottomY increases100px vertical, 80px horizontalLeft-aligned columns
ER DiagramSpread / gridBoth axes120px bothGrid-aligned
MindmapCenter-outward radialBoth axes150px from center per levelRadial symmetric
NetworkHierarchical layersY increases100px vertical, 120px horizontalCenter each layer

Anti-Overlap Checklist

Before finalizing coordinates, verify:

  • No two nodes' bounding boxes overlap (check x, y, width, height)
  • Edge labels don't overlap with nodes
  • Decision branches (Yes/No) go in clearly different directions
  • For flowcharts with branches: main path goes down, alternate path goes right (or left)
  • For wide diagrams: increase pageWidth in mxGraphModel; for tall ones increase pageHeight

Calculating Coordinates

Use this formula to center N items horizontally in a row:

total_width = N * node_width + (N - 1) * gap
start_x = (pageWidth - total_width) / 2
item[i].x = start_x + i * (node_width + gap)

For vertical centering in a column, apply the same logic to Y axis.

For rows inside a fixed-width container, also check fill density:

inner_width = container_width - 2 * side_pad
gap = (inner_width - N * item_width) / (N - 1)

If gap is much larger than the item width, or side padding is much larger than gap, adjust one of:

  • increase item width moderately
  • increase item count per row only if still readable
  • reduce container width
  • split into multiple balanced rows

For incomplete last rows, center the remaining items instead of left-aligning them and leaving a large blank tail.

Standard Sizes

ElementWidthHeight
Standard node16060
Decision (rhombus)16080
Database (cylinder)14080
Actor (UML)4060
Start/End (rounded)16060
Mindmap center18080
Mindmap branch14050
Mindmap leaf12040
ER table header200varies
Group/containerautoauto

Step 4: Self-Review (DO NOT SKIP)

After generating XML, re-read your output and check each item below. If any check fails, fix the XML before proceeding. This step catches the most common rendering bugs — skipping it results in broken diagrams.

Structural checks:

  • All id values are unique across the entire file
  • Every mxCell with vertex="1" has correct parent (usually "1", but container children use the container ID)
  • Every edge's source and target reference existing node IDs
  • XML is well-formed: all tags closed, all attribute values quoted
  • mxGeometry always has as="geometry" attribute

Layout checks (these are the most common failures — actually verify the numbers):

  • No two non-container nodes overlap: for each pair, confirm their bounding boxes (x, y, x+width, y+height) don't intersect
  • All coordinates (x, y) are multiples of 10 — scan every mxGeometry element
  • Page dimensions (pageWidth, pageHeight) are large enough for all content with margins
  • Sibling items in the same row/column use equal sizes and equal gaps unless there is a clear reason not to
  • Left/right padding and top/bottom padding inside each container are visually balanced; no obvious one-sided blank area
  • Containers, sub-groups, and sidebars are sized to content plus padding; if a blank region is larger than a normal item gap or roughly a full item row, tighten the layout
  • Incomplete last rows are centered or otherwise balanced; they are not stuck to one side with a large empty remainder

Style checks:

  • All nodes include whiteSpace=wrap;html=1; in style
  • Every multi-line label uses &#xa; inside value, never literal \n
  • fontSize=14 or larger for readability
  • Edges use edgeStyle=orthogonalEdgeStyle for clean routing (except mindmaps which use curved=1)
  • Decision nodes use rhombus shape; database nodes use shape=cylinder3

Step 5: CLI Export (Cross-Platform)

5a. Detect draw.io

Run these commands in order, stop at the first one that succeeds:

# 1. Try PATH first (works if user installed globally)
which draw.io 2>/dev/null || which drawio 2>/dev/null

If that fails, check platform-specific default paths:

macOS:

ls /Applications/draw.io.app/Contents/MacOS/draw.io 2>/dev/null

Windows (bash/MSYS2):

# Check common install locations
ls "/c/Program Files/draw.io/draw.io.exe" 2>/dev/null || \
ls "$LOCALAPPDATA/Programs/draw.io/draw.io.exe" 2>/dev/null

Linux:

ls /usr/bin/drawio 2>/dev/null || ls /snap/bin/drawio 2>/dev/null

5b. If not found, guide installation

Tell the user draw.io is not installed and suggest:

PlatformInstall Command
macOSbrew install --cask drawio
Windowswinget install JGraph.Draw
Linuxsnap install drawio
AllDownload from https://github.com/jgraph/drawio-desktop/releases

Do NOT auto-install without user confirmation.

5c. Export

Use the detected path (stored as $DRAWIO) to export:

"$DRAWIO" -x -f png --scale 2 -o output.png diagram.drawio

Export flags

FlagPurpose
-xExport mode (no GUI)
-f png/svg/pdfOutput format
-o pathOutput file path
--scale 22x resolution for crisp PNG
--border 20Add border padding (px)
--width 1600Constrain output width
-p 0Export specific page (0-indexed)
--cropCrop to diagram content

Step 6: Deliver to User

After export:

  • Show the exported image
  • Tell the user the.drawio file location (can be edited at https://app.diagrams.net)
  • Mention the export format used

File Naming

  • Lowercase + hyphens: ecommerce-order-flow.drawio
  • No Chinese characters, spaces, or special characters in filenames
  • Output image uses same base name: ecommerce-order-flow.png

Architecture Diagram: Layered Block Style

For architecture diagrams, use the Layered Block Style — see references/best-practices.md for full templates and layout constants. This is the preferred style: structured block layout with no arrows, horizontal layers, left label column, and optional cross-cutting sidebar.

Modifying Existing Diagrams

When the user is not satisfied with the result and asks for modifications:

  1. Read the existing.drawio file first to understand current structure
  2. Edit based on the existing XML — do not regenerate from scratch
  3. Apply the user's requested changes while preserving the overall layout and style
  4. Run the same self-review and export steps

Reference

references/best-practices.md contains:

  • General Rules — ID management, style essentials, common mistakes
  • Architecture Diagram Templates (Layered Block Style) — the preferred architecture style with full XML templates and layout constants

For other diagram types (flowchart, UML, ER, mindmap, network, etc.), generate appropriate draw.io XML directly based on your knowledge. Read the "General Rules" section for basic formatting guidance.

平台分布

Codex

38.01%
按下载量换算47

Claude

32.05%
按下载量换算40

Cursor

18.71%
按下载量换算23

Gemini CLI

8.41%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills