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

excalidrawerexcalidrawer 命令行

Agent Skill

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

总安装

318

周安装

13

GitHub Stars

3

下载量

103
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/guohaonan-shy/excalidrawer --skill excalidrawer

简介

excalidrawer 提供模板化图表生成与自定义脚本支持,简化 Excalidraw 创作流程。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要快速生成时间轴、甘特图或其他标准图表时使用。
  • 支持 CLI 直接调用模板,也允许通过 JS 脚本使用库 API 实现定制开发。
  • 无需安装即可使用 npx 运行模板命令,仅需在自定义开发时安装 npm 包。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Excalidrawer

A diagram generation tool with built-in templates and a CLI. For supported diagram types, just provide JSON data and run the CLI. For custom diagrams, write a short JS script using the library API.

Prerequisites

No install needed for template-based workflows — npx handles everything automatically.

Only install the npm package if you need the library API for custom scripts:

npm install excalidrawer

Workflow: Template-Based (Preferred)

For supported diagram types (timeline, etc.), use the CLI directly — no script needed.

Step 1: Identify the diagram type

Check if the request matches a built-in template:

TypeUse for
timelineProject timelines, roadmaps, milestones
architectureLayered system architecture, component diagrams
flowchartDecision flows, process diagrams
sequenceSequence / interaction diagrams, swimlane flows

Run npx excalidrawer types to see all available types.

Step 2: Create a JSON data file

Write a JSON file matching the template's schema (see Template Schemas below).

Step 3: Run the CLI

npx excalidrawer generate --type <type> --input data.json --output ./path/to/output

CLI options:

  • --type, -t — Diagram type (required)
  • --input, -i — Input JSON file (reads stdin if omitted)
  • --output, -o — Output path without extension (required)
  • --format, -f — Comma-separated: excalidraw,svg,png (default: all three)
  • --seed, -s — Seed for deterministic IDs

Examples:

# Generate all formats
npx excalidrawer generate -t timeline -i timeline.json -o docs/timeline

# Only SVG and PNG
npx excalidrawer generate -t timeline -i timeline.json -o docs/timeline -f svg,png

# Pipe from stdin
echo '{"title":"My Timeline","items":[...]}' | npx excalidrawer generate -t timeline -o out/timeline

Template Schemas

Architecture

Input JSON:

{
  "title": "My System",
  "sections": [
    {
      "label": "Users",
      "color": "yellow",
      "items": [
        { "label": "Web User", "color": "yellow", "desc": "Browser-based access" },
        { "label": "API User", "color": "orange", "desc": "Programmatic access" }
      ]
    },
    {
      "label": "Services",
      "color": "blue",
      "items": [
        { "label": "Auth Service", "color": "blue" },
        { "label": "Data API",     "color": "green" }
      ]
    },
    {
      "label": "Storage",
      "color": "gray",
      "items": ["PostgreSQL", "Redis"]
    }
  ],
  "connections": [
    { "from": "Web User",     "to": "Auth Service" },
    { "from": "Auth Service", "to": "PostgreSQL",  "style": "dashed" }
  ]
}

Fields:

  • title (string, optional) — Diagram title at the top
  • sections (array) — Horizontal layers stacked top to bottom

- label (string) — Section heading (e.g. "Users", "Interface", "Backend") - color (string, optional) — Section palette: blue green yellow purple red orange gray - items (array) — Boxes inside the section, laid out horizontally - Short form: "Label string" - Full form: {label, color?, desc?} - label — Box title. Long labels auto-wrap within the box; box height grows to fit. Box width auto-sizes to the longest label across all sections, so one very long label widens every box. - desc (string, optional) — Small grey caption rendered below the box; use this for sub-details instead of cramming everything into the label

  • connections (array, optional) — Arrows between items across sections

- from / to — Must exactly match the item's label string - label (string, optional) — Text shown on the arrow - style"solid" (default) or "dashed"

Sequence

Input JSON:

{
  "title": "OAuth Login Flow",
  "actors": [
    { "label": "User / CLI",      "color": "yellow" },
    { "label": "Local Client",    "color": "blue"   },
    { "label": "OAuth Server",    "color": "purple" }
  ],
  "steps": [
    {
      "actor": "User / CLI",
      "text":  "1. Run login command"
    },
    {
      "actor": "Local Client",
      "text":  "2. Start callback server\nlocalhost:PORT",
      "from":  "User / CLI",
      "arrow": ""
    },
    {
      "actor": "OAuth Server",
      "text":  "3. Show login page",
      "from":  "Local Client",
      "arrow": "GET /authorize"
    },
    {
      "actor": "User / CLI",
      "text":  "4. User authorizes",
      "from":  "OAuth Server",
      "arrow": "(page rendered)",
      "style": "dashed"
    },
    {
      "actor": "Local Client",
      "text":  "5. Receive token",
      "color": "green",
      "from":  "OAuth Server",
      "arrow": "200 OK token"
    }
  ]
}

Fields:

  • title (string, optional) — Diagram title at the top, centered
  • actors (array) — The participant columns, left to right

- label (string) — Actor name, shown as column header; also used as reference key in steps - color (string, optional) — Header box color: yellow blue purple orange green red gray. Defaults to cycling through the palette.

  • steps (array) — Events in chronological order, each occupying one row

- actor (string) — Which actor column this step box belongs to (must match an actor label) - text (string) — Box content. Long text auto-wraps within the box; box height grows to fit. You can also use \n for explicit line breaks. - color (string, optional) — Override box color (e.g. "green" for a success/final step) - from (string, optional) — Source actor label. When set, draws a horizontal arrow from that actor's lifeline into this step box. The arrow Y is aligned to this box's center, ensuring perfect horizontal alignment. - arrow (string, optional) — Label shown above the arrow line. Use "" for an unlabelled arrow. - style (string, optional) — Arrow style: "solid" (default) or "dashed" (for return/async flows)

Flowchart

Input JSON:

{
  "title": "Deployment Pipeline",
  "direction": "horizontal",
  "nodes": [
    { "id": "start", "label": "Push Code", "type": "start" },
    { "id": "build", "label": "Build & Test", "type": "process" },
    { "id": "check", "label": "Tests Pass?", "type": "decision" },
    { "id": "deploy", "label": "Deploy to Prod", "type": "process" },
    { "id": "done", "label": "Done", "type": "end" },
    { "id": "fix", "label": "Fix Errors", "type": "end" }
  ],
  "edges": [
    { "from": "start", "to": "build" },
    { "from": "build", "to": "check" },
    { "from": "check", "to": "deploy", "label": "Yes" },
    { "from": "check", "to": "fix", "label": "No" },
    { "from": "deploy", "to": "done" }
  ]
}

Fields:

  • title (string, optional) — Diagram title
  • direction (string, optional) — "horizontal" (default) or "vertical"
  • nodes (array) — Diagram nodes

- id (string) — Unique identifier, referenced by edges - label (string) — Display text. Long labels auto-wrap; node height grows to fit. - type (string, optional) — "process" (default, rectangle), "decision" (diamond), "start" / "end" (rounded), "io" (rectangle) - color (string, optional) — Override fill color

  • edges (array) — Connections between nodes

- from / to — Node id values - label (string, optional) — Text on the edge (e.g. "Yes" / "No")

Timeline

Input JSON:

{
  "title": "Project Timeline",
  "items": [
    {
      "label": "Milestone 1",
      "time": "Jan",
      "desc": "Description line 1\nline 2"
    },
    {
      "label": "Milestone 2",
      "time": "Mar",
      "desc": "Another description",
      "color": "#a5d8ff"
    }
  ]
}

Fields:

  • title (string) — Diagram title displayed at top
  • items (array) — Milestones in chronological order

- label (string) — Milestone name (displayed in colored box) - time (string) — Time label (displayed near the axis) - desc (string) — Description text. Use \n for line breaks. - color (string, optional) — Box fill color. If omitted, cycles through: yellow → blue → green → purple → red → orange

Workflow: Custom Script (Fallback)

For diagram types not covered by templates, write a JS script using the library API.

Core API

import {
  setSeed,            // setSeed(n) — set seed for deterministic IDs
  box,                // box(rid, tid, x, y, w, h, bg, text, fontSize?) → [rect, text]
  diamondBox,         // diamondBox(rid, tid, x, y, w, h, bg, text, fontSize?) → [diamond, text]
  arrow,              // arrow(id, x, y, points, extra?) → arrow element
  textEl,             // textEl(id, x, y, w, h, text, fontSize, extra?) → text element
  rect,               // rect(id, x, y, w, h, bg, extra?) → rectangle
  diamond,            // diamond(id, x, y, w, h, bg, extra?) → diamond shape
  ellipse,            // ellipse(id, x, y, w, h, bg, extra?) → ellipse shape
  colors,             // semantic color palette
  excalidraw,         // excalidraw(elements) → JSON string for .excalidraw file
  toSvg,              // toSvg(elements) → SVG string
  toPng,              // toPng(elements, scale?) → Promise<Buffer>
  wrapText,           // wrapText(text, maxWidth, fontSize) → wrapped string with \n
  estimateTextWidth,  // estimateTextWidth(text, fontSize) → pixel width estimate
  timeline,           // timeline(data, opts?) → elements array
  flowchart,          // flowchart(data, opts?) → elements array
  architecture,       // architecture(data, opts?) → elements array
  sequence,           // sequence(data, opts?) → elements array
} from 'excalidrawer';

Color Palette

colors.blue      // "#a5d8ff"  — info / process steps
colors.green     // "#b2f2bb"  — success / output
colors.yellow    // "#ffd43b"  — start / highlight
colors.purple    // "#d0bfff"  — AI / service layer
colors.red       // "#ffc9c9"  — external / warning
colors.orange    // "#ffec99"  — decision / human-in-loop
colors.gray      // "#e9ecef"  — secondary / misc

// Lighter section backgrounds
colors.bgBlue / colors.bgGreen / colors.bgYellow / colors.bgPurple

// Stroke accents
colors.strokeBlue / colors.strokeGreen / colors.strokeYellow / colors.strokeOrange

Script Example

import { writeFileSync } from "fs";
import { setSeed, box, arrow, textEl, colors, excalidraw, toSvg, toPng } from "excalidrawer";

setSeed(100000);
const CY = 150, BH = 56, BY = CY - BH / 2;

const elements = [
  textEl("title", 20, 12, 500, 28, "My Diagram", 22),
  ...box("s1", "s1t", 20, BY, 130, BH, colors.yellow, "Start", 15),
  arrow("a1", 150, CY, [[0,0],[40,0]]),
  ...box("s2", "s2t", 190, BY, 150, BH, colors.blue, "Process", 14),
];

writeFileSync("diagram.excalidraw", excalidraw(elements));
writeFileSync("diagram.svg", toSvg(elements));
writeFileSync("diagram.png", await toPng(elements, 2));

Run: node diagram.mjs

Visual Design Guidelines

Follow these principles so diagrams feel readable and well-spaced:

Labels

  • Long labels auto-wrap — all templates automatically wrap text that exceeds the box width. Box heights grow to fit. No need to manually insert \n for line breaks.
  • Prefer concise labels — shorter labels produce cleaner diagrams. The architecture template auto-widens every box to fit the longest label, so one very long label widens all boxes.
  • Use desc for secondary info — put sub-details (URLs, tech stack, short notes) in the desc field, not in the label. desc renders as a small grey caption below the box and doesn't affect box sizing.

Titles

  • Keep titles under ~60 characters — the canvas width is driven by item count × box width. A very long title can exceed the auto-computed canvas width and appear clipped. Shorten or split into title + subtitle.

Color usage

  • Use color to encode meaning, not decoration:

- yellow / orange → users, humans, external actors - blue → primary services, interface layer - purple → AI, ML, protocol layer - green → core logic, success state, data layer - gray → infrastructure, storage, secondary systems - red → warnings, external dependencies, risky paths

  • Assign one color per architectural layer / role for visual consistency

Connections

  • Prefer direct vertical connections (same column) — they render as straight arrows
  • Diagonal connections (different columns) render as L-shaped paths; avoid too many to prevent visual clutter

Z-order (rendering layers)

When writing custom scripts, always control element order to avoid arrows obscuring text:

  1. Background rects first (bottom layer)
  2. Arrows / connections second (middle layer)
  3. Boxes, labels, desc text last (top layer)

The architecture template handles this automatically. In custom scripts, use separate arrays and spread them in the right order:

const bg = [], conn = [], fg = [];
// ... push elements into the right bucket ...
const elements = [...bg, ...conn, ...fg];

Common Mistakes to Avoid

  • Do NOT forget to spread ...box(...) — it returns an array of two elements
  • Do NOT reuse element IDs — use setSeed() with different values per diagram
  • Arrows: x, y is the start point; points are relative offsets

Export Format Decision

  • Default to all three: .excalidraw + .svg + .png
  • "for Markdown / GitHub" → .svg
  • "for Lark / Notion / slides" → .png
  • "I want to edit it" → .excalidraw

References

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.59%
按下载量换算35

Claude

30.48%
按下载量换算31

Cursor

17.75%
按下载量换算18

Gemini CLI

10.3%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills