Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

excalidrawExcalidraw 图表绘制

Agent Skill

excalidraw 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

333

周安装

14

GitHub Stars

6

下载量

116
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/acking-you/myclaude-skills --skill excalidraw

简介

excalidraw 生成手绘风格的 Excalidraw JSON 格式图表,适用于技术文档和可视化表达。

  • 适用于需要箭头绑定、背景区域计算和文本尺寸精确控制的图表绘制任务。
  • 通过 GitHub 安装,宿主包括 Codex、Claude、Cursor 和 Gemini CLI,支持双向箭头绑定。
  • 安装前应确认权限范围和维护状态,注意是否会触发文件读写或网络请求。
  • 背景区域必须完全覆盖所有元素,并添加 40px 内边距,确保渲染正确。

SKILL.md

Excalidraw Diagram Generation

Generate professional hand-drawn style diagrams in Excalidraw JSON format.

Critical Rules

  1. Arrow Binding (MUST follow): Arrows must bind to components bidirectionally:

- Arrow needs startBinding and endBinding pointing to component IDs - Rectangle needs boundElements array listing bound arrow IDs - Without both, arrows won't snap to components

  1. Text requires width/height: Text elements must have width and height fields, otherwise they won't render
  2. Arrow labels: Place below arrow (y + 30) or above (y - 30), never overlapping components
  3. Background region sizing (MUST follow): Background regions (subgraphs/phases) must fully cover all contained elements:

- Calculate bounding box: find min/max x/y of ALL elements in the region - Add padding: 40px on all sides - Formula: width = (maxX + maxWidth) - minX + 80, height = (maxY + maxHeight) - minY + 80 - Verify: every child element's bottom-right corner must be inside the region

  1. No overlaps (MUST follow): Arrows must not cross unrelated components; labels must not overlap components. See "Layout Optimization" section for strategies.
  2. Container binding (MUST follow): When connecting to grouped/nested structures, arrows must bind to the outer container (background region), NOT to internal elements:

- If a phase/subgraph contains multiple internal steps, arrows from outside should connect to the container box - Internal element connections stay internal; external connections go to the container - Example: dag → main-bg (container), NOT dag → read-main (internal element) - This keeps the diagram semantically correct and visually clean

  1. Sibling layout (MUST follow): Elements at the same hierarchy level must be placed horizontally (same row), NOT vertically:

- Siblings represent parallel/alternative paths (e.g., TCP and HTTP handlers) - Vertical stacking implies sequential execution, which is semantically wrong for siblings - Use fork arrows from parent to horizontally-aligned children

  1. Nested structure clarity (MUST follow): When a container has internal elements, ensure clear hierarchy and no overlaps:

- Internal elements must have proper vertical spacing with arrows showing call sequence - Text labels must fit entirely within their rectangles (calculate: rect.height >= text.height + 20) - Reference annotations (file paths, line numbers) go OUTSIDE the box (below or to the right) - Sub-containers within a parent should be visually distinct (different opacity or color shade)

  1. Arrow path space reservation (MUST follow): When arrows connect nested containers, ensure sufficient space for arrow routing:

- Problem: If containers are too close, arrows may pass through target containers instead of connecting to their edges - Solution: Proactively enlarge parent containers to leave 40-60px gap between child containers and the next target - When multiple sub-containers need to merge arrows to a shared target below, calculate: target.y >= max(child.y + child.height) + 60 - If arrow crossing occurs after generation, increase container heights rather than using complex bypass paths

  1. SVG export requests (MUST follow): If the user asks for SVG output/conversion, ALWAYS convert the generated .excalidraw.json file via https://kroki.io/excalidraw/svg using curl.

Mandatory Workflow (MUST follow before writing JSON)

Step 1: Arrow Path Analysis Before placing any component, list ALL arrows and their source→target pairs:

Arrow 1: A → B (horizontal)
Arrow 2: B → C (horizontal)
Arrow 3: C → A (return arrow - DANGER: will cross B if horizontal layout)

Step 2: Identify Crossing Risks For each arrow, check: "Does a straight line from source to target pass through any other component?"

  • If YES → mark as "needs layout adjustment" or "needs bypass path"
  • Common patterns that cause crossings:

- Return arrows in horizontal layouts (e.g., C → A when B is between them) - Bidirectional flows between non-adjacent components - Hub-and-spoke patterns with central component

Step 3: Choose Layout Strategy Based on crossing risks, select appropriate layout:

  • No crossings: Use simple horizontal/vertical layout
  • 1-2 crossings: Use bypass paths (multi-point arrows)
  • 3+ crossings or complex flows: Restructure to 2D layout (grid, triangle, diamond)

Step 4: Verify Before Finalizing After generating JSON, mentally trace each arrow path and confirm:

  • No arrow passes through any component it doesn't connect to
  • No label overlaps any component
  • All background regions fully contain their elements

Core Elements

Base Template

{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [],
  "appState": { "viewBackgroundColor": "#ffffff" },
  "files": {}
}

Element Templates

Rectangle (Component Box)

{
  "id": "unique-id",
  "type": "rectangle",
  "x": 100, "y": 100,
  "width": 140, "height": 60,
  "strokeColor": "#1e1e1e",
  "backgroundColor": "#a5d8ff",
  "roundness": { "type": 3 },
  "boundElements": [{"id": "arrow-id", "type": "arrow"}]
}

Text (width/height required, fontFamily: 4 required)

{
  "id": "unique-id",
  "type": "text",
  "x": 120, "y": 120,
  "width": 80, "height": 24,
  "text": "Label",
  "fontSize": 16,
  "fontFamily": 4,
  "textAlign": "center"
}

Text centering formula (to center text inside a rectangle):

  • text.x = rect.x + (rect.width - text.width) / 2
  • text.y = rect.y + (rect.height - text.height) / 2

Arrow

{
  "id": "unique-id",
  "type": "arrow",
  "x": 240, "y": 130,
  "points": [[0, 0], [100, 0]],
  "startBinding": { "elementId": "source-id", "focus": 0, "gap": 5 },
  "endBinding": { "elementId": "target-id", "focus": 0, "gap": 5 },
  "endArrowhead": "arrow"
}

Arrow coordinate system:

  • x, y: absolute position of arrow start point
  • points: relative offsets from (x, y). First point is always [0, 0]
  • Example: x: 100, y: 200, points: [[0,0], [50, 0], [50, 100]] draws L-shaped arrow starting at (100, 200)

Background Region - Use rectangle with "opacity": 30

Default Values (can be omitted)

"fillStyle": "solid", "strokeWidth": 2, "roughness": 1,
"opacity": 100, "angle": 0, "seed": 1, "version": 1

Color System

PurposeBackgroundStroke
Primary / Phase 1#a5d8ff#1971c2
Secondary / Phase 2#b2f2bb#2f9e44
Accent / Shared#fff3bf#e67700
Storage / State#d0bfff#7048e8

Layout Rules

  • Align coordinates to multiples of 20
  • Component spacing: 100-150px
  • Standard component size: 140×60
  • Background regions: opacity: 30
  • Render order: earlier elements in array appear behind

Common Diagram Patterns

Sequence Diagram Layout

For sequence diagrams (multiple participants with message flows):

  • Place participants horizontally at top (y = 100)
  • Each phase/stage gets its own vertical section below
  • Use background regions to separate phases
  • Vertical lifelines are implicit (not drawn as elements)
  • Messages flow left-to-right or right-to-left between participants

Layout strategy:

Phase 1 (y: 80-300):   [A] -----> [B] -----> [C]
                            msg1       msg2
                       [A] <----- [B]
                            response

Phase 2 (y: 320-500):  [A'] ----> [B'] ----> [C']
                       (duplicate participants at new y)

Key insight: For multi-phase sequence diagrams, duplicate participant boxes in each phase rather than drawing long vertical lifelines. This avoids arrow crossing issues.

Layout Optimization (Avoiding Overlaps)

Prevent Arrow Overlap

When multiple arrows connect to the same component:

  • Use focus parameter to offset arrow positions on component edge
  • focus: -0.5 = upper half, focus: 0.5 = lower half, focus: 0 = center
  • Example: two horizontal arrows can use focus: -0.5 and focus: 0.5 to separate vertically

Prevent Arrows Crossing Components

When arrows would cross unrelated components, restructure the layout:

3 components with return arrow (A→B→C, C→A):

  • Triangle layout: A at top, B bottom-left, C bottom-right
  • All arrows flow along triangle edges, no crossings

4 components with return arrow (A→B→C→D, D→A):

  • Diamond layout: A at top, B left, C bottom, D right
  • Or 2×2 grid with diagonal return arrow
  • Or use bypass path for return arrow (route above/below the row)

4+ components in sequence with return arrows:

  • Split into rows: forward flow on top row, return flow on bottom row
  • Or use vertical bypass: return arrows route above/below all components "points": [[0, 0], [0, -80], [-400, -80], [-400, 0]]

Hub-and-spoke (central component connects to many):

  • Place hub in center, spokes radially around it
  • Avoid placing spokes in a line with hub in middle

Default assumption: If there's a return arrow, horizontal layout will likely fail—plan for bypass or 2D layout upfront.

Complete Example

Flow with Return Arrow (using bypass path) A → B → C, then C → A (return arrow routes above to avoid crossing B)

Arrow analysis:

  • Arrow 1: A → B (horizontal) ✓
  • Arrow 2: B → C (horizontal) ✓
  • Arrow 3: C → A (return) ⚠️ Would cross B → use bypass path above
{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {"id": "a", "type": "rectangle", "x": 100, "y": 150, "width": 140, "height": 60, "backgroundColor": "#a5d8ff", "strokeColor": "#1971c2", "roundness": {"type": 3}, "boundElements": [{"id": "arr1", "type": "arrow"}, {"id": "arr3", "type": "arrow"}]},
    {"id": "a-label", "type": "text", "x": 155, "y": 168, "width": 30, "height": 24, "text": "A", "fontSize": 16, "fontFamily": 4, "textAlign": "center"},
    {"id": "b", "type": "rectangle", "x": 340, "y": 150, "width": 140, "height": 60, "backgroundColor": "#b2f2bb", "strokeColor": "#2f9e44", "roundness": {"type": 3}, "boundElements": [{"id": "arr1", "type": "arrow"}, {"id": "arr2", "type": "arrow"}]},
    {"id": "b-label", "type": "text", "x": 395, "y": 168, "width": 30, "height": 24, "text": "B", "fontSize": 16, "fontFamily": 4, "textAlign": "center"},
    {"id": "c", "type": "rectangle", "x": 580, "y": 150, "width": 140, "height": 60, "backgroundColor": "#d0bfff", "strokeColor": "#7048e8", "roundness": {"type": 3}, "boundElements": [{"id": "arr2", "type": "arrow"}, {"id": "arr3", "type": "arrow"}]},
    {"id": "c-label", "type": "text", "x": 635, "y": 168, "width": 30, "height": 24, "text": "C", "fontSize": 16, "fontFamily": 4, "textAlign": "center"},
    {"id": "arr1", "type": "arrow", "x": 245, "y": 180, "points": [[0, 0], [90, 0]], "endArrowhead": "arrow", "startBinding": {"elementId": "a", "focus": 0, "gap": 5}, "endBinding": {"elementId": "b", "focus": 0, "gap": 5}},
    {"id": "arr2", "type": "arrow", "x": 485, "y": 180, "points": [[0, 0], [90, 0]], "endArrowhead": "arrow", "startBinding": {"elementId": "b", "focus": 0, "gap": 5}, "endBinding": {"elementId": "c", "focus": 0, "gap": 5}},
    {"id": "arr3", "type": "arrow", "x": 650, "y": 145, "points": [[0, 0], [0, -60], [-480, -60], [-480, 0]], "endArrowhead": "arrow", "strokeStyle": "dashed", "startBinding": {"elementId": "c", "focus": 0, "gap": 5}, "endBinding": {"elementId": "a", "focus": 0, "gap": 5}},
    {"id": "arr3-label", "type": "text", "x": 380, "y": 60, "width": 60, "height": 20, "text": "return", "fontSize": 12, "fontFamily": 4, "textAlign": "center"}
  ],
  "appState": {"viewBackgroundColor": "#ffffff"},
  "files": {}
}

Output

  • Filename: {descriptive-name}.excalidraw.json
  • Location: project root or docs/ folder
  • Tell user: drag into https://excalidraw.com or open with VS Code Excalidraw extension

SVG conversion via Kroki (when user asks for SVG)

If user explicitly asks for SVG (e.g., "convert to svg", "need svg export"), convert with this command:

curl -sS https://kroki.io/excalidraw/svg \
  -H 'Content-Type: application/json' \
  --data-binary @diagram.excalidraw.json \
  -o diagram.svg

Notes:

  • Input must be a valid Excalidraw JSON file (*.excalidraw.json)
  • Keep both outputs: source JSON + exported SVG
  • If user asks for SVG, do not skip this conversion step

Notes

  • IDs must be unique across the file
  • fontFamily: 1=Virgil, 2=Helvetica, 3=Cascadia, 4=Comic Shanns (MUST use for hand-drawn style)
  • strokeWidth usage in software diagrams:

- 1 (thin): background regions, container borders, secondary connections - 2 (normal/default): primary components, main flow arrows - 4 (bold): emphasis, critical paths, highlighted elements

  • Dashed arrows: add "strokeStyle": "dashed"

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

windsurf

29.83%
按下载量换算35

Codex

19.92%
按下载量换算23

github-copilot

17.44%
按下载量换算20

Claude Code

13.23%
按下载量换算15

Antigravity

7.21%
按下载量换算8

Gemini CLI

3.68%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills