Excalidraw

From HybridAIOne/hybridclaw · View interactive version

Excalidraw is an AI agent skill from the GitHub repository HybridAIOne/hybridclaw. Create and revise editable `.excalidraw` diagrams as Excalidraw JSON for architecture diagrams, flowcharts, sequence diagrams, concept maps, and other hand-drawn explainers.

How to use this skill

Skill file

Excalidraw

Use this skill when the user wants an editable diagram, not just a rendered image.

Typical requests:

Excalidraw files are plain JSON. The default deliverable is a *.excalidraw file in the workspace. The user can drag that file into excalidraw.com to view, edit, or export it.

Default Workflow

  1. Plan the diagram before writing JSON: title, nodes, connectors, groups, and rough canvas size.
  2. Write a valid Excalidraw elements array.
  3. Wrap the array in the standard file envelope.
  4. Save the result as *.excalidraw.
  5. If the user wants a shareable browser link, run:
node skills/excalidraw/scripts/upload.mjs diagram.excalidraw

The upload helper encrypts the diagram client-side and prints the Excalidraw share URL.

File Envelope

Use this shape unless you are editing an existing file and need to preserve more fields:

{
  "type": "excalidraw",
  "version": 2,
  "source": "hybridclaw",
  "elements": [],
  "appState": {
    "viewBackgroundColor": "#ffffff"
  },
  "files": {}
}

When editing an existing .excalidraw file, preserve appState, files, and any other existing top-level keys unless the user asked for a deliberate reset.

Rules

Core Patterns

Labeled Rectangle

[
  {
    "type": "rectangle",
    "id": "api",
    "x": 120,
    "y": 120,
    "width": 220,
    "height": 80,
    "roundness": { "type": 3 },
    "backgroundColor": "#a5d8ff",
    "fillStyle": "solid",
    "boundElements": [{ "id": "text-api", "type": "text" }]
  },
  {
    "type": "text",
    "id": "text-api",
    "x": 130,
    "y": 145,
    "width": 200,
    "height": 24,
    "text": "API Service",
    "fontSize": 20,
    "fontFamily": 1,
    "strokeColor": "#1e1e1e",
    "textAlign": "center",
    "verticalAlign": "middle",
    "containerId": "api",
    "originalText": "API Service",
    "autoResize": true
  }
]

Arrow Between Shapes

{
  "type": "arrow",
  "id": "arrow-api-db",
  "x": 340,
  "y": 160,
  "width": 180,
  "height": 0,
  "points": [[0, 0], [180, 0]],
  "endArrowhead": "arrow",
  "startBinding": { "elementId": "api", "fixedPoint": [1, 0.5] },
  "endBinding": { "elementId": "db", "fixedPoint": [0, 0.5] }
}

Reference Files

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.