excalidraw-obsidian
Excalidraw Obsidian Diagrams
Create or update Excalidraw drawings in the Obsidian vault at ~/notes/obsedian/Excalidraw/.
File Format
Files use the .md extension (NOT .excalidraw or .excalidraw.md) and follow this structure:
---
excalidraw-plugin: parsed
tags: [excalidraw]
---
==Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document.==
# Excalidraw Data
## Text Elements
<text content> ^<element-id>
## Drawing
` ` `json
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [...],
"appState": {
"viewBackgroundColor": "#ffffff",
"gridSize": null
},
"files": {}
}
` ` `
%%
Key Rules
- File extension: Always
.md, never.excalidrawor.excalidraw.md - Text Elements section: List every text element's content followed by
^<id>— one blank line between each - Drawing section: Wrapped in
%%at the end (the%%before## Drawingand after the closing triple backticks) - JSON format: Use raw
jsoncode fence, NOTcompressed-json. The plugin will compress it on load. - Frontmatter: Must include
excalidraw-plugin: parsedandtags: [excalidraw]
Updating Existing Files
The plugin compresses JSON into compressed-json format on save. You CANNOT surgically edit compressed content. To update an existing file:
- Reconstruct the full elements array from context or by re-reading the
.excalidrawsource if available - Rewrite the entire
## Drawingsection with rawjson - Update the
## Text Elementssection to include any new text elements - The plugin will re-compress on next load
Element Format Reference
Use the Excalidraw MCP read_me tool to get the full element format reference including color palettes, element types, and examples. Call it once per session before creating diagrams.
Workflow
- Call the Excalidraw MCP
read_metool (once per session) to get element format reference - Optionally use
create_viewto preview the diagram inline first - Write the
.mdfile to the Excalidraw folder - If updating, rewrite the full file since compressed JSON can't be edited in place
Arguments
$ARGUMENTS — Description of what to draw or which file to update
More from arjunmahishi/dotfiles
acli-jira
Use acli to manage Jira tickets -- search, view, create, edit, transition, assign, comment, and more from the command line.
147pup
Use pup to query Datadog metrics and logs -- search, query, aggregate, list, and analyze observability data from the command line.
8tsq
Use tsq to extract structured code information with tree-sitter queries, symbols, outlines, and references across languages.
8tmux
>
2playwright-cli
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
2