excalidraw-skill

yctimlin/mcp_excalidraw · updated Jun 3, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/yctimlin/mcp_excalidraw --skill excalidraw-skill
0 commentsdiscussion
summary

Two modes are available. Try MCP first — it has more capabilities.

skill.md

Excalidraw Skill

Step 0: Determine Connection Mode

Two modes are available. Try MCP first — it has more capabilities.

MCP mode (preferred): If excalidraw/batch_create_elements and other excalidraw/* tools appear in your tool list, use them directly. MCP tools handle label and arrow binding format automatically.

REST API mode (fallback): If MCP tools aren't available, use HTTP endpoints at http://localhost:3000. See the cheatsheet for REST payloads. Note the format differences in the table below — REST and MCP accept slightly different field names.

Neither works? Tell the user:

The Excalidraw canvas server is not running. To set up:

  1. git clone https://github.com/yctimlin/mcp_excalidraw && cd mcp_excalidraw
  2. npm ci && npm run build
  3. PORT=3000 npm run canvas
  4. Open http://localhost:3000 in a browser
  5. (Recommended) Install the MCP server: 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
Get all elements query_elements GET /api/elements
Get one element get_element GET /api/elements/:id
Update element update_element PUT /api/elements/:id
Delete element delete_element DELETE /api/elements/:id
Clear canvas clear_canvas DELETE /api/elements/clear
Describe scene describe_scene GET /api/elements (parse manually)
Export scene export_scene GET /api/elements (save to file)
Import scene import_scene POST /api/elements/sync
Snapshot snapshot_scene POST /api/snapshots
Restore snapshot restore_snapshot GET /api/snapshots/:name then POST /api/elements/sync
Screenshot get_canvas_screenshot POST /api/export/image (needs browser)
Viewport set_viewport POST /api/viewport (needs browser)
Export image export_to_image POST /api/export/image (needs browser)
Export URL export_to_excalidraw_url Only via MCP

Format Differences Between Modes (Critical)

  1. Labels: MCP accepts "text": "My Label" on shapes (auto-converts). REST requires "label": {"text": "My Label"}.
  2. Arrow binding: MCP accepts startElementId/endElementId. REST requires "start": {"id": "..."} / "end": {"id": "..."}.
  3. fontFamily: Must be a string (e.g. "1") or omit entirely. Never pass a number.
  4. Updating labels via REST: Re-include "label" in the PUT body to ensure it renders correctly after updates.

Coordinate System

The canvas uses a 2D coordinate grid: (0, 0) is the origin, x increases rightward, y increases downward. Plan your layout before writing any JSON.

General spacing guidelines:

  • Vertical spacing between tiers: 80–120px (enough that arrows don't crowd labels)
  • Horizontal spacing between siblings: 40–60px minimum
  • Shape width: max(160, labelCharCount * 9) to prevent text truncation
  • Shape height: 60px single-line, 80px two-line labels
  • Background/zone padding: 50px on all sides around contained elements

Layout Anti-Patterns (Critical for Complex Diagrams)

These are the most common mistakes that produce unreadable diagrams. Avoid all of them.

1. Do NOT use label.text (or text) on large background zone rectangles

When you put a label on a background rectangle, Excalidraw creates a bound text element centered in the middle of that shape — right where your service boxes will be placed. The text overlaps everything inside the zone and cannot be repositioned.

Wrong:

{"id": "vpc-zone", "type": "rectangle", "x": 50, "y": 50, "width": 800, "height": 400, "text": "VPC (10.0.0.0/16)"}

Right — use a free-standing text element anchored at the top of the zone:

{"id": "vpc-zone", "type": "rectangle", "x": 50, "y": 50, "width": 800, "height": 400, "backgroundColor": "#e3f2fd"},
{"id": "vpc-label", "type": "text", "x": 70, "y": 60, "width": 300, "height": 30, "text": "VPC (10.0.0.0/16)", "fontSize": 18, "fontWeight": "bold"}

The free-standing text element sits at the top corner of the zone and doesn't interfere with elements placed inside.

2. Avoid cross-zone arrows in complex diagrams

An arrow from an element in one layout zone to an element in a distant zone will draw a long diagonal line crossing through everything in between. In a multi-zone infra diagram this produces an unreadable tangle of spaghetti.

Design rule: Keep arrows within the same zone or tier. To show cross-zone relationships, use annotation text or separate the zones so their edges are adjacent (no elements between them), and route the arrow along the edge.

If you must connect across zones, use an elbowed arrow that travels along the perimeter — never through the middle of another zone.

3. Use arrow labels sparingly

Arrow labels are placed at the midpoint of the arrow. On short arrows, they overlap the shapes at both ends. On crowded diagrams, they collide with nearby elements.

  • Only add an arrow label when the relationship name is genuinely essential (e.g., protocol, port number, data direction).
  • If you're adding a label to every arrow, reconsider — it usually adds visual noise, not clarity.
  • Keep arrow labels to ≤ 12 characters. Prefer omitting them entirely on dense diagrams.

Quality: Why It Matters (and How to Check)

Excalidraw diagrams are visual communication. If text is cut off, elements overlap, or arrows cross through unrelated shapes, the diagram becomes confusing and unprofessional — it defeats the whole purpose of drawing it. So after every batch of elements, verify before adding more.

Quality Checklist

After each batch_create_elements / POST /api/elements/batch, take a screenshot and check:

  1. Text truncation — Is all label text fully visible? Truncated text means the shape is too small. Increase width and/or height.
  2. Overlap — Do any shapes share the same space? Background zones must fully contain children with padding.
  3. Arrow crossing — Do arrows cut through unrelated elements? If yes, route them around using curved or elbowed arrows (see Arrow Routing below).
  4. Arrow-label overlap — Arrow labels sit at the midpoint. If they overlap a shape, shorten the label or adjust the arrow path.
  5. Spacing — At least 40px gap between elements. Cramped layouts are hard to read.
  6. Readability — Font size ≥ 16 for body text, ≥ 20 for titles.
  7. Zone label placement — If you used text/label.text on a background zone rectangle, the zone label will be centered in the middle of the zone, overlapping everything inside. Fix: delete the bound text element and add a free-standing text element at the top of the zone instead (see Layout Anti-Patterns above).

If you find any issue: stop, fix it, re-screenshot, then continue. Say "I see [issue], fixing it" rather than glossing over problems. Only proceed once all checks pass.


Workflow: Drawing a New Diagram

Mermaid vs. Direct Creation — Which to Use?

Use create_from_mermaid when: the user already has a Mermaid diagram, or the structure maps cleanly to a flowchart/sequence/ER diagram with standard Mermaid syntax. It's fast and handles conversion automatically, though you get less control over exact layout.

Use batch_create_elements directly when: you need precise layout control, the diagram type doesn't map to Mermaid well (e.g., custom architecture, annotated cloud diagrams), or you want elements positioned in a specific coordinate grid.

MCP Mode

  1. Call read_diagram_guide for design best practices (colors, fonts, anti-patterns).
  2. Plan your coordinate grid on paper/in comments — map out tiers and x-positions before writing JSON.
  3. Optional: clear_canvas to start fresh.
  4. Use batch_create_elements — create shapes and arrows in one call. Custom id fields (e.g. "id": "auth-svc") make later updates easy.
  5. Set shape widths using max(160, labelLength * 9). Use text field for labels.
  6. Bind arrows with startElementId / endElementId — they auto-route to element edges.
  7. set_viewport with scrollToContent: true to auto-fit.
  8. get_canvas_screenshot → run Quality Checklist → fix issues before next iteration.

MCP element + arrow example:

{"elements": [
  {"id": "lb", "type": "rectangle", "x": 300, "y": 50, "width": 180, "height": 60, "text": "Load Balancer"},
  {"id": "svc-a", "type": "rectangle", "x": 100, "y": 200, "width": 160, "height": 60, "text": "Web Server 1"},
  {"id": "svc-b", "type": "rectangle", "x": 450, "y": 200, "width": 160, "height": 60, "text": "Web Server 2"},
  {"id": "db", "type": "rectangle", "x": 275, "y": 350, "width": 210, "height": 60, "text": "PostgreSQL"},
  {"type": "arrow", "x": 0, "y": 0, "startElementId": "lb", "endElementId": "svc-a"},
  {"type": "arrow", "x": 0, "y": 0, "startElementId": "lb", "endElementId": "svc-b"},
  {"type": "arrow", "x": 0, "y": 0, "startElementId": "svc-a", "endElementId": "db"},
  {"type": "arrow", "x": 0, "y": 0, "startElementId": "svc-b", "endElementId": "db"}
]}

REST API Mode

  1. Plan your coordinate grid first.
  2. Optional: curl -X DELETE http://localhost:3000/api/elements/clear
  3. Create elements using POST /api/elements/batch. Use "label": {"text": "..."} for labels.
  4. Bind arrows with "start": {"id": "..."} / "end": {"id": "..."}.
  5. Verify with POST /api/export/image → save PNG → run Quality Checklist.

REST API element + arrow example:

curl -X POST http:
how to use excalidraw-skill

How to use excalidraw-skill on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add excalidraw-skill
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/yctimlin/mcp_excalidraw --skill excalidraw-skill

The skills CLI fetches excalidraw-skill from GitHub repository yctimlin/mcp_excalidraw and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/excalidraw-skill

Reload or restart Cursor to activate excalidraw-skill. Access the skill through slash commands (e.g., /excalidraw-skill) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.567 reviews
  • Nikhil Flores· Dec 24, 2024

    excalidraw-skill is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Pratham Ware· Dec 20, 2024

    excalidraw-skill reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Sofia Mehta· Dec 20, 2024

    Keeps context tight: excalidraw-skill is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Mateo Chawla· Dec 16, 2024

    excalidraw-skill reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ishan Menon· Dec 16, 2024

    Useful defaults in excalidraw-skill — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ishan Gill· Dec 4, 2024

    Registry listing for excalidraw-skill matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ishan Rao· Nov 23, 2024

    Useful defaults in excalidraw-skill — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Aarav Dixit· Nov 23, 2024

    We added excalidraw-skill from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • James Mehta· Nov 19, 2024

    excalidraw-skill fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Nikhil Sethi· Nov 15, 2024

    Solid pick for teams standardizing on skills: excalidraw-skill is focused, and the summary matches what you get after install.

showing 1-10 of 67

1 / 7