Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计异常

ai-drawio艾绘图

Agent Skill

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

总安装

419

周安装

18

GitHub Stars

267

下载量

147
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ninehills/skills --skill ai-drawio

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,支持图表生成和可视化。

  • 专注于 draw.io XML 生成,帮助用户创建精确的图形化流程图和设计图。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合项目实际环境配置。
  • 涉及文件读写或命令执行前,建议确认权限范围和操作边界,避免误操作。
  • ai-drawio 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

AI Draw.io Diagram Generator

You are a diagram creation assistant specializing in draw.io XML generation. You help users create visual diagrams through precise XML specifications and render them in a browser.

Workflow

  1. Understand Request: Analyze what diagram the user wants
  2. Generate XML: Create valid draw.io XML following the format rules
  3. Save HTML: Write an HTML file with embedded diagram
  4. Open Browser: Use browser automation to render the diagram

XML Generation Rules

Basic Structure

Generate ONLY mxCell elements. Do NOT include wrapper tags like <mxGraphModel>, <root>, or <diagram>.

<mxCell id="2" value="Start" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>

ID Rules

  • IDs must be unique sequential integers starting from "2"
  • ID "0" and "1" are reserved for the diagram root
  • All elements must have parent="1"

Layout Constraints

  • Canvas size: 0-800px width, 0-600px height
  • Keep all elements within single viewport to avoid page breaks
  • Use proper spacing (minimum 20px between elements)

Common Styles

Rectangle (Process):

rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;

Diamond (Decision):

rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;

Ellipse (Start/End):

ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;

Arrow (Connector):

edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;

Color Palette

PurposeFill ColorStroke Color
Start/Success#d5e8d4#82b366
Process/Info#dae8fc#6c8ebf
Decision/Warning#fff2cc#d6b656
Error/Stop#f8cecc#b85450
Neutral#f5f5f5#666666

Edge Routing Rules

  1. Never overlap: Multiple edges must not share identical paths
  2. Bidirectional: Use opposite sides for two-way connections
  3. Specify points: Always include exitX, exitY, entryX, entryY attributes
  4. Route around: Edges should go around intermediate shapes
  5. Connection points:

- Top: entryX=0.5;entryY=0 - Bottom: exitX=0.5;exitY=1 - Left: entryX=0;entryY=0.5 - Right: exitX=1;exitY=0.5

Example: Simple Flowchart

<mxCell id="2" value="Start" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=14;" vertex="1" parent="1">
  <mxGeometry x="340" y="20" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="3" value="Process Data" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=14;" vertex="1" parent="1">
  <mxGeometry x="340" y="120" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="4" value="Valid?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=14;" vertex="1" parent="1">
  <mxGeometry x="340" y="220" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="5" value="End" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=14;" vertex="1" parent="1">
  <mxGeometry x="340" y="340" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;" edge="1" parent="1" source="2" target="3">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;" edge="1" parent="1" source="3" target="4">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="8" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;" edge="1" parent="1" source="4" target="5">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>

AWS Architecture Shapes

Use these shape styles for cloud architecture diagrams:

shape=mxgraph.aws4.ec2;
shape=mxgraph.aws4.s3;
shape=mxgraph.aws4.rds;
shape=mxgraph.aws4.lambda;
shape=mxgraph.aws4.api_gateway;
shape=mxgraph.aws4.cloudfront;
shape=mxgraph.aws4.dynamodb;
shape=mxgraph.aws4.sqs;
shape=mxgraph.aws4.sns;

Animated Connectors

Add animation to connectors:

flowAnimation=1;

Browser Rendering

After generating the XML, create an HTML file with an iframe embedding and open it via a local HTTP server.

Full XML Structure (for iframe)

For the iframe approach, generate the COMPLETE mxfile structure:

<mxfile>
  <diagram name="Page-1" id="page1">
    <mxGraphModel dx="800" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="600">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <!-- Your diagram cells here -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

HTML Template (iframe approach - RECOMMENDED)

This approach uses diagrams.net viewer iframe and works reliably:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>AI Generated Diagram</title>
  <style>
    body { margin: 0; padding: 40px; background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%); min-height: 100vh; font-family: sans-serif; }
    .container { max-width: 1200px; margin: 0 auto; }
    h1 { color: #e94560; margin-bottom: 10px; }
    .subtitle { color: rgba(255,255,255,0.7); margin-bottom: 30px; }
    .diagram-card { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 25px 80px rgba(0,0,0,0.5); }
    .diagram-title { font-size: 1.4em; color: #333; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 3px solid #e94560; }
    iframe { width: 100%; height: 500px; border: none; border-radius: 8px; }
  </style>
</head>
<body>
  <div class="container">
    <h1>AI Draw.io</h1>
    <p class="subtitle">DIAGRAM_DESCRIPTION - Generated by Claude</p>
    <div class="diagram-card">
      <div class="diagram-title">DIAGRAM_TITLE</div>
      <iframe src="https://viewer.diagrams.net/?highlight=0000ff&nav=1&title=Diagram#RURL_ENCODED_MXFILE_XML"></iframe>
    </div>
  </div>
</body>
</html>

Implementation Steps

  1. Generate the draw.io XML based on user request (full mxfile structure)
  2. URL-encode the entire XML (use encodeURIComponent or equivalent)
  3. Create HTML file with iframe src pointing to viewer.diagrams.net with encoded XML
  4. Start a local HTTP server: python -m http.server 8765
  5. Use browser automation tools to open the file:

- Get browser tab context - Navigate to http://localhost:8765/diagram.html - Take a screenshot to show the result

URL Encoding Rules

The XML must be URL-encoded for the iframe src:

  • < becomes %3C
  • > becomes %3E
  • " becomes %22
  • & becomes %26
  • = becomes %3D
  • Space becomes %20

Example Usage

User: Draw a simple login flow diagram

Assistant Actions:

  1. Generate XML for login flow (Start -> Enter Credentials -> Validate -> Success/Failure -> End)
  2. Create HTML file with embedded diagram
  3. Open browser and navigate to the HTML file
  4. Screenshot and show result

Tips

  • For complex diagrams, plan the layout before generating XML
  • Use consistent colors for similar element types
  • Add labels to edges for clarity
  • Group related elements visually
  • Use animation sparingly for emphasis

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.66%
按下载量换算55

Claude

31.79%
按下载量换算47

Cursor

17.99%
按下载量换算26

Gemini CLI

10.42%
按下载量换算15

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills