agentleFS
omidnwomidnw/my-skills/skills/excalidraw/SKILL.md

excalidraw

Skill0 starsChanged 11 days agoMITView on GitHub

Draw and edit Excalidraw diagrams — flowcharts, architecture, sequence, ER, state, and mind-map style diagrams — as .excalidraw / .excalidraw.json files, with a declarative generator, validator, and subagent delegation that keeps verbose diagram JSON out of the main context. Use whenever the user asks to draw, sketch, create, edit, explain, or compare a flow, flowchart, diagram, architecture/sequence/ER/state diagram, mind map, or any *.excalidraw file — in any language, even when they don't say "Excalidraw".

69 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use heartmula, webhook-subscriptions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • math-incSkill

    heartmula

    Set up and run HeartMuLa, the open-source music generation model family (Suno-like). Generates full songs from lyrics + tags with multilingual support.

    Also in 9 projects that use this

  • Tommy-ywSkill

    webhook-subscriptions

    Create and manage webhook subscriptions for event-driven agent activation, or for direct push notifications (zero LLM cost). Use when the user wants external services to trigger agent runs OR push notifications to chats.

    Also in 5 projects that use this

  • john-data-chenSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 7 projects that use this

  • math-incSkill

    minecraft-modpack-server

    Set up a modded Minecraft server from a CurseForge/Modrinth server pack zip. Covers NeoForge/Forge install, Java version, JVM tuning, firewall, LAN config, backups, and launch scripts.

    Also in 5 projects that use this

  • AlekseiULSkill

    TubeScribe

    YouTube video summarizer with speaker detection, formatted documents, and audio output. Works out of the box with macOS built-in TTS. Optional recommended tools (pandoc, ffmpeg, mlx-audio) enhance quality. Requires internet for YouTube access. No paid APIs or subscriptions. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.

    Also in 3 projects that use this

  • mae616Skill

    p5js

    p5.js(クリエイティブコーディング)のProcessing由来「コードでスケッチ」思想を軸に、setup/drawループ・座標系・インタラクション・パフォーマンス最適化を整理する。p5.js、Processing、クリエイティブコーディング、ジェネラティブアート、インタラクティブ表現、ビジュアルプログラミング、Canvas描画、パーティクル、フラクタル、ノイズ表現に関する相談で必ず使うこと。ユーザーが「コードでアート」「動くビジュアル」「インタラクティブな描画」と言った場合にも適用する。

    Also in 10 projects that use this

  • +5 more from math-inc

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Not for data charts (bar/line/pie) — those are plots, not Excalidraw diagrams.

    line 29
  2. Distinctive:

    If the user explicitly requests another format (Mermaid, SVG by hand), the explicit request wins.

    line 30
  3. Very specific:

    Default output location: docs/diagrams/<name>.excalidraw.json in the current project, unless the user gives a path.

    line 36
  4. Distinctive:

    Write a spec file (JSON):

    line 48
  5. Very specific:

    If the requested diagram does not fit this shape (sequence diagram with lifelines, mind map, swimlanes, custom art), delegate instead (path …

    line 84
  6. Distinctive:

    Always run the validator after generation and after every modification.

    line 115
  7. Distinctive:

    When modifying, preserve the diagram's existing conventions (palette, font, direction).

    line 117
  8. Distinctive:

    Never paste raw element JSON into the conversation, the plan, or the final summary.

    line 121

“Common” is measured: kept by at least 6 in 10 of the 64 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Excalidraw Diagrams

Design-to-delivery integration

When a diagram is useful for the recommended design-to-delivery workflow, prefer docs/diagrams/<work-id>.excalidraw.json and validate the actual file. A diagram-first approach can expose missing branches before implementation, but the agent may adapt the sequence to the task. If tracking timing, use the linked docs/diagrams/<work-id>.metadata.md; never prepend Markdown/YAML to Excalidraw JSON. Preserve existing diagrams and decisions. This skill supplies drawing/validation; the optional playbook coordinates brainstorming/specs/tasks. A standalone diagram request does not require the full workflow.

Purpose

Produce and edit Excalidraw diagrams (*.excalidraw, *.excalidraw.json) reliably, while keeping their verbose JSON (4k–22k tokens per file, ~90% positioning/style metadata) out of the main context.

When to use

  • The user asks for a flow, flowchart, architecture diagram, sequence diagram, ER diagram, state diagram, mind map, wireflow — or mentions Excalidraw / an .excalidraw file.
  • Not for data charts (bar/line/pie) — those are plots, not Excalidraw diagrams.
  • If the user explicitly requests another format (Mermaid, SVG by hand), the explicit request wins; this skill is the default for diagram requests.

Preconditions

  • Node.js available (generator + validator are dependency-free .mjs scripts).
  • Default output location: docs/diagrams/<name>.excalidraw.json in the current project, unless the user gives a path.

Workflow

A. Create a flowchart / architecture / state diagram (default path)

The main agent does this directly — the spec is tiny, and raw Excalidraw JSON never enters the context:

  1. Draft the node/edge list from the user's description (one node per step/state/component; one edge per transition; label decision branches like yes/no).
  2. Write a spec file (JSON):

    {
      "title": "Auth Flow",
      "direction": "TB",
      "nodes": [
        { "id": "start", "label": "User opens app", "shape": "ellipse",  "style": "green" },
        { "id": "valid", "label": "Token\nvalid?",  "shape": "diamond",  "style": "yellow" },
        { "id": "load",  "label": "Load profile",   "shape": "rectangle", "style": "blue" }
      ],
      "edges": [
        { "from": "start", "to": "valid" },
        { "from": "valid", "to": "load", "label": "yes" }
      ]
    }

    direction: TB (default) or LR. shape: rectangle | diamond | ellipse. style: plain | blue | green | yellow | red | purple | gray. diamonds = decisions, ellipses = start/end, rectangles = actions/components.

  3. Generate and validate:

    node ~/.agents/skills/excalidraw/scripts/generate_flow.mjs <spec.json> -o <out.excalidraw.json>
    node ~/.agents/skills/excalidraw/scripts/validate.mjs <out.excalidraw.json>

    The generator handles layout (branch layering, loop edges), bound labels, and arrow bindings. Exit 0 from the validator is required before reporting done.

  4. Tell the user how to open it: drag the file onto excalidraw.com, only when the diagram is public or disclosure is explicitly authorized; confidential diagrams should open in a local editor/renderer. Open in VS Code/Cursor with the "Excalidraw" extension. Optionally offer a quick visual check: curl -s -H "Content-Type: text/plain" --data-binary @<file> https://kroki.io/excalidraw/svg -o preview.svg (only for non-sensitive diagrams and authorized external rendering; never upload work diagrams as a convenience).

If the requested diagram does not fit this shape (sequence diagram with lifelines, mind map, swimlanes, custom art), delegate instead (path B) — the subagent hand-builds it from references/element-format.md.

B. Understand / modify / compare existing files (prefer bounded delegation)

Keep verbose element JSON out of the main context. When delegation is available and authorized, let a scoped subagent extract or edit it. Otherwise use local structured parsing to inspect labels, edges and affected IDs, then read only needed records and the element-format reference. Do not block a diagram task because subagents are unavailable or assume every file has the same token size.

Delegate with a self-contained prompt (per parallel-subagents), and point the subagent at ~/.agents/skills/excalidraw/references/element-format.md when it will write elements:

  • Understand — "Read <path> (Excalidraw JSON; ignore positioning/styling fields). Return: the diagram's components with their labels, the connections/flow between them, and a 3-sentence summary of what the diagram shows. Do NOT return raw JSON or element dumps."
  • Modify — "Read references/element-format.md first, then <path>. Change: <exact change>. Preserve the file's existing colors, fonts, layout direction, and spacing conventions. Add/rewire bindings with the reciprocity rules from the reference (arrows must appear in the shapes' boundElements, labels' containerId must match). Then run node ~/.agents/skills/excalidraw/scripts/validate.mjs <path> and fix every error. Return: what changed (element ids), validator output, and nothing raw."
  • Compare — "Read <a> and <b> (Excalidraw JSON). Extract text labels and connections from each. Return: components unique to each, structural/flow differences, and a verdict on <user's question>. Do NOT return raw element details."

One subagent per diagram file (exclusive write ownership when modifying several).

Rules

  • Creation goes through the generator whenever the diagram is a graph of nodes and edges; hand-written JSON (by a subagent) is only for shapes the generator can't express.
  • Always run the validator after generation and after every modification; fix errors before reporting done.
  • When modifying, preserve the diagram's existing conventions (palette, font, direction); do not restyle unless asked.
  • Report honestly: structural validation proves the file is well-formed; if you have not visually verified the render, say so and offer the preview options.
  • Never paste raw element JSON into the conversation, the plan, or the final summary.

Common mistakes

  • Dumping all diagram metadata merely to find labels — use scoped delegation or local structured extraction instead.
  • Hand-writing arrow JSON with absolute points — points are relative to the arrow's x,y; first point is [0,0].
  • Forgetting binding reciprocity (arrow ↔ shape boundElements, text ↔ container) — the file opens but arrows detach when shapes are dragged. The validator catches this.
  • Asking the user about minor styling (colors, spacing) — pick sensible defaults from the palette; only ask when the diagram's structure itself is ambiguous.
  • Editing an .excalidraw file without running the validator afterward.

Validation checklist

  • validate.mjs exits 0 on the final file.
  • Output path is .excalidraw or .excalidraw.json.
  • For creations: reported node/edge count matches what the user asked for.
  • For modifications: validator run on the modified file, errors fixed.
  • User told how to open the file (excalidraw.com / VS Code Excalidraw extension), and whether the render was visually verified or only structurally validated.

Files

PathPurpose
scripts/generate_flow.mjsspec (nodes/edges) → valid .excalidraw.json, auto-layout + bindings
scripts/validate.mjsstructural + binding validation; exit 1 on error
references/element-format.mdfull element schema, binding recipes, palette — read before hand-writing elements
references/example-flow.excalidraw.jsoncomplete valid generated file (6 nodes, 6 edges incl. loop) to pattern-match

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.