← ClaudeAtlas

excalidraw-skilllisted

Programmatic canvas toolkit for creating, editing, and refining Excalidraw diagrams via MCP tools with real-time canvas sync. Use when an agent needs to (1) draw or lay out diagrams on a live canvas, (2) iteratively refine diagrams using describe_scene and get_canvas_screenshot to see its own work, (3) export/import .excalidraw files or PNG/SVG images, (4) save/restore canvas snapshots, (5) convert Mermaid to Excalidraw, or (6) perform element-level CRUD, alignment, distribution, grouping, duplication, and locking. Requires a running canvas server (EXPRESS_SERVER_URL, default http://localhost:3000).
dongzhigang13305312738-art/paper-skills · ★ 0 · AI & Automation · score 60
Install: claude install-skill dongzhigang13305312738-art/paper-skills
# Excalidraw Skill ## Step 0: Detect Connection Mode Before doing anything, determine which mode is available. Run these checks **in order**: ### Check 1: MCP Server (Best experience) ```bash mcp-cli tools | grep excalidraw ``` If you see tools like `excalidraw/batch_create_elements` → **use MCP mode**. Call MCP tools directly. ### Check 2: REST API (Fallback — works without MCP server) ```bash curl -s http://localhost:3000/health ``` If you get `{"status":"ok"}` → **use REST API mode**. Use HTTP endpoints (`curl` / `fetch`) from the cheatsheet. ### Check 3: Nothing works → Guide user to install If neither works, tell the user: > The Excalidraw canvas server is not running. To set up: > 1. Clone: `git clone https://github.com/yctimlin/mcp_excalidraw && cd mcp_excalidraw` > 2. Build: `npm ci && npm run build` > 3. Start canvas: `HOST=0.0.0.0 PORT=3000 npm run canvas` > 4. Open `http://localhost:3000` in a browser > 5. (Recommended) Install the MCP server for the best experience: > ``` > claude mcp add excalidraw -s user -e EXPRESS_SERVER_URL=http://localhost:3000 -- node /path/to/mcp_excalidraw/dist/index.js > ``` ### MCP vs REST API Quick Reference | Operation | MCP Tool | REST API Equivalent | |-----------|----------|-------------------| | Create elements | `batch_create_elements` | `POST /api/elements/batch` with `{"elements": [...]}` | | Get all elements | `query_elements` | `GET /api/elements` | | Get one element | `get_element` | `GET /api/elements/:id` |