Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问许可证需确认审计提醒

excalidraw-diagramsexcalidraw diagrams 前端

Agent Skill

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

总安装

1,223

周安装

52

GitHub Stars

125

下载量

428
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/sammcj/agentic-coding --skill excalidraw-diagrams

简介

excalidraw-diagrams 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 它能协助梳理仓库结构、跟踪 Issue 进展、分析 PR 内容或生成协作摘要。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,具体路径为 skills/excalidraw-diagrams。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Creating Excalidraw Diagrams

When creating Excalidraw diagrams, ensure you:

  • Generate the layout with correct spacing
  • Make consistent and logical use of colours, fonts, and shapes
  • Text is correctly added within shapes, not as separate text elements (unless desired)
  • Arrows and lines are correctly anchored / connected to shapes (not floating) so that when objects are moved any connections remain intact
  • You save the Excalidraw diagram content to a file and link the file path
  • Call read_me before your first create_view call each session - it provides the colour palette, camera sizes, layout rules, and element format reference.
  • If the user has asked you to create Excalidraw diagrams but you do not have the Excalidraw MCP enabled, you should ask them to add it for you, they can configured it by using the HTTP MCP URL of: https://excalidraw-mcp-app.vercel.app/mcp and they can view the MCP documentation here: https://github.com/excalidraw/excalidraw-mcp

Choose your workflow

Pick one based on what the user needs. Do not default to doing both.

Inline preview only (create_view)

Use when the diagram is for the conversation only - the user wants to see it in the chat and does not need a file.

  • Use create_view with label on shapes (works fine here)
  • Use cameraUpdate to animate and guide attention
  • No file output needed

File output only (Python script)

Use when the user needs a .excalidraw file to open, share, edit, or keep. Skip create_view entirely.

  • Generate the file with scripts/generate_excalidraw.py (see below)
  • Provide the file path to the user
  • Files can be opened by dragging into excalidraw.com, the Excalidraw desktop app, or VS Code with the Excalidraw extension

Both (inline preview + file)

Use when the user wants to see the diagram in the chat AND keep a file. Note: these are built independently with different element formats. There is no data bridge between them - you define the diagram structure once conceptually but render it twice.

  • create_view with label for the inline preview
  • Python script with labeled_rect for the .excalidraw file

Critical: text does not survive export

The label property on shapes is a create_view convenience only. It does NOT work in:

  • export_to_excalidraw uploads (shapes render, text is invisible)
  • .excalidraw files written from create_view checkpoint data

Do NOT use export_to_excalidraw for shareable diagrams. It seems to have a bug that can silently drop all text.

Native Excalidraw represents text inside shapes as two linked elements:

  1. Shape: "boundElements": [{"id": "text-id", "type": "text"}]
  2. Text: "containerId": "shape-id", "textAlign": "center", "verticalAlign": "middle"

The text element requires fields the label shorthand omits: fontFamily (1), width, height, originalText, lineHeight (1.25), autoResize (true).

All elements in.excalidraw files also need: angle, seed, version, versionNonce, isDeleted, groupIds, frameId, updated, link, locked.

Hand-writing this JSON is error-prone. Use the Python script instead.

Python script: scripts/generate_excalidraw.py

Generates native.excalidraw files with all required fields. Can be used inline in a bash heredoc or imported as a library.

Key functions:

FunctionReturnsPurpose
labeled_rect(id, x, y, w, h, bg, stroke, label,...)[rect, text]Shape with centred bound text (handles all binding and field generation)
rect(id, x, y, w, h, bg, stroke,...)elementRectangle without text
txt(id, x, y, w, h, text, size,...)elementStandalone or bound text
bound_arrow(id, elements, start_id, start_point, end_id, end_point,...)elementArrow anchored to two shapes (mutates shapes' boundElements)
arrow(id, x, y, w, h, points,...)elementUnbound/floating arrow (use bound_arrow instead when connecting shapes)
ellipse(...) / diamond(...)elementOther shape types
write_scene(elements, path)writes fileWraps in scene structure and saves

Example:

python3 << 'PYEOF'
import sys, random
sys.path.insert(0, "/Users/samm/.claude/skills/excalidraw-diagrams/scripts")
from generate_excalidraw import *

random.seed(42)
elements = []
elements.append(txt("t1", 200, 10, 300, 30, "My Diagram", 24))
elements.extend(labeled_rect("a", 50, 60, 200, 70, "#a5d8ff", "#4a9eed", "Step One"))
elements.extend(labeled_rect("b", 350, 60, 200, 70, "#b2f2bb", "#22c55e", "Step Two"))
elements.append(bound_arrow("a1", elements, "a", [1, 0.5], "b", [0, 0.5]))
write_scene(elements, "/path/to/output.excalidraw")
PYEOF

For shapes without the labeled_rect convenience, pair rect(..., bound_text="tid") with txt(..., container="rid", align="center", valign="middle").

Arrow anchoring

By default, arrows float free - moving a shape leaves the arrow behind. Use bound_arrow instead of arrow to anchor arrows to shapes. It handles the bidirectional binding automatically (arrow references shapes, shapes list the arrow in boundElements).

fixedPoint values for connection points on shapes: top=[0.5, 0], right=[1, 0.5], bottom=[0.5, 1], left=[0, 0.5]. Any [fx, fy] value works where 0,0 is the shape's top-left corner and 1,1 is bottom-right.

Important:

  • Shapes must already exist in elements before calling bound_arrow, since it looks them up and mutates their boundElements.
  • Minimum 60px between connected shapes. Excalidraw recalculates bound arrow geometry at render time. When shapes are too close together (under ~60px gap), arrows overlap and pass through boxes instead of connecting at edges. The script warns if this threshold is violated. Plan layouts with adequate spacing.
  • Avoid large background rectangles that overlap connectable shapes. Excalidraw's binding resolution can misfire when a bound arrow's endpoint falls inside a background rect that overlaps the intended target shape. If you need section backgrounds, add them after all bound arrows, or use standalone text labels and colour-coded boxes instead.

For the inline create_view workflow, use startBinding/endBinding with fixedPoint directly on arrow elements.

Privacy

Note that if the diagram contains potentially sensitive information (e.g. detailed network diagrams, identifiable information etc...) and the user asks you to upload the diagram to excalidraw.com - you should first warn them that this will make the diagram publicly accessible and ask if they want to proceed.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.31%
按下载量换算147

Claude

30.1%
按下载量换算129

Cursor

19.15%
按下载量换算82

Gemini CLI

10.16%
按下载量换算43

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills