
Excalidraw
- 794 installs
- 29.9k repo stars
- Updated July 27, 2026
- davila7/claude-code-templates
excalidraw is an agent skill that delegates all Excalidraw diagram work to subagents so the main agent never loads verbose *.excalidraw JSON that can cost 4k–22k tokens per file.
About
excalidraw is a claude-code-templates skill enforcing subagent delegation for *.excalidraw and *.excalidraw.json files. Main agents must not read diagram JSON directly because single files range from 4k to 22k tokens and the largest can exceed read limits; multiple diagrams quickly exhaust context. Triggers include diagram, flowchart, and architecture visualization requests. Subagents isolate token-heavy JSON manipulation while the parent agent keeps concise summaries. Developers reach for excalidraw when agents must create or edit Excalidraw architecture diagrams without blowing the context window.
- Prevents context exhaustion by never letting main agents read Excalidraw files directly
- Delegates all diagram operations (explain, update, create, visualize) to isolated subagents
- Handles files ranging from 4k–22k tokens per diagram without blowing context budget
- Triggers automatically on any .excalidraw or .excalidraw.json file reference
- Maintains 7-file safety threshold (67k tokens ≈ 33% of typical context budget)
Excalidraw by the numbers
- 794 all-time installs (skills.sh)
- +19 installs in the week ending Jul 26, 2026 (Skillselion tracking)
- Ranked #1,313 of 16,659 AI & Agent Building skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/davila7/claude-code-templates --skill excalidrawAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 794 |
|---|---|
| repo stars | ★ 29.9k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | davila7/claude-code-templates ↗ |
How do agents edit Excalidraw files without token bloat?
Delegate all Excalidraw diagram operations to specialized subagents so the main agent avoids massive token overhead from verbose JSON files.
Who is it for?
Developers using Excalidraw for architecture diagrams who need agents to edit large JSON diagram files via isolated subagents.
Skip if: Mermaid-only diagrams, raster image editing, or small text docs that do not use Excalidraw JSON formats.
When should I use this skill?
The user mentions Excalidraw, *.excalidraw files, flowcharts, or architecture visualization needing agent edits.
What you get
Updated Excalidraw diagram files, architecture flowcharts, and subagent summaries without main-agent context exhaustion.
- Updated Excalidraw diagrams
- Subagent diagram summaries
By the numbers
- Single Excalidraw files range from 4k to 22k tokens
- Supports 2 file extensions: *.excalidraw and *.excalidraw.json
Files
Excalidraw Subagent Delegation
Overview
Core principle: Main agents NEVER read Excalidraw files directly. Always delegate to subagents to isolate context consumption.
Excalidraw files are JSON with high token cost but low information density. Single files range from 4k-22k tokens (largest can exceed read tool limits). Reading multiple diagrams quickly exhausts context budget (7 files = 67k tokens = 33% of budget).
The Problem
Excalidraw JSON structure:
- Each shape has 20+ properties (x, y, width, height, strokeColor, seed, version, etc.)
- Most properties are visual metadata (positioning, styling, roughness)
- Actual content: text labels and element relationships (<10% of file)
- Signal-to-noise ratio is extremely low
Example: 14-element diagram = 596 lines, 16K, ~4k tokens. 79-element diagram = 2,916 lines, 88K, ~22k tokens (exceeds read limit).
When to Use
Trigger on ANY of these:
- File path contains
.excalidrawor.excalidraw.json - User requests: "explain/update/create diagram", "show architecture", "visualize flow"
- User mentions: "flowchart", "architecture diagram", "Excalidraw file"
- Architecture/design documentation tasks involving visual artifacts
Use delegation even for:
- "Small" files (smallest is 4k tokens - still significant)
- "Quick checks" (checking component names still loads full JSON)
- Single file operations (isolation prevents context pollution)
- Modifications (don't need full format understanding in main context)
Delegation Pattern
Main Agent Responsibilities
NEVER:
- ❌ Use Read tool on *.excalidraw files
- ❌ Parse Excalidraw JSON in main context
- ❌ Load multiple diagrams for comparison
- ❌ Inspect file to "understand the format"
ALWAYS:
- ✅ Delegate ALL Excalidraw operations to subagents
- ✅ Provide clear task description to subagent
- ✅ Request text-only summaries (not raw JSON)
- ✅ Keep diagram analysis isolated from main work
Subagent Task Templates
Read/Understand Operation
Task: Extract and explain the components in [file.excalidraw.json]
Approach:
1. Read the Excalidraw JSON
2. Extract only text elements (ignore positioning/styling)
3. Identify relationships between components
4. Summarize architecture/flow
Return:
- List of components/services with descriptions
- Connection/dependency relationships
- Key insights about the architecture
- DO NOT return raw JSON or verbose element detailsModify Operation
Task: Add [component] to [file.excalidraw.json], connected to [existing-component]
Approach:
1. Read file to identify existing elements
2. Find [existing-component] and its position
3. Create new element JSON for [component]
4. Add arrow elements for connections
5. Write updated file
Return:
- Confirmation of changes made
- Position of new element
- IDs of created elementsCreate Operation
Task: Create new Excalidraw diagram showing [description]
Approach:
1. Design layout for [number] components
2. Create rectangle elements with text labels
3. Add arrows showing relationships
4. Use consistent styling (colors, fonts)
5. Write to [file.excalidraw.json]
Return:
- Confirmation of file created
- Summary of components included
- File locationCompare Operation
Task: Compare architecture approaches in [file1] vs [file2]
Approach:
1. Read both files
2. Extract text labels from each
3. Identify structural differences
4. Compare component relationships
Return:
- Key differences in architecture
- Components unique to each approach
- Relationship/flow differences
- DO NOT return full element details from both filesCommon Rationalizations (STOP and Delegate Instead)
| Excuse | Reality | What to Do |
|---|---|---|
| "Direct reading is most efficient" | Consumes 4k-22k tokens unnecessarily | Delegate to subagent |
| "It's token-efficient to read directly" | Baseline tests showed 9-45% budget used | Always delegate |
| "This is optimal for one-time analysis" | "One-time" still pollutes main context | Subagent isolation |
| "The JSON is straightforward" | Simplicity ≠ token efficiency | Delegate anyway |
| "I need to understand the format" | Format understanding not needed in main agent | Subagent handles format |
| "Within reasonable bounds" (18k tokens) | "Reasonable" is subjective rationalization | Hard rule: delegate |
| "Just a quick check of components" | "Quick check" still loads full JSON | Extract text via subagent |
| "File is small (16K)" | 4k tokens is NOT small | Size threshold doesn't matter |
Red Flags - STOP and Delegate
Catch yourself about to:
- Use Read tool on .excalidraw file
- "Quickly check" what components exist
- "Understand the structure" before modifying
- Load file to "see what's there"
- Compare multiple diagrams side-by-side
- Parse JSON to "extract just the text"
All of these mean: Use Task tool with subagent instead.
Quick Reference
| Operation | Main Agent Action | Subagent Returns |
|---|---|---|
| Understand diagram | Delegate with "Extract and explain" template | Component list + relationships |
| Modify diagram | Delegate with "Add [X] connected to [Y]" template | Confirmation + changes made |
| Create diagram | Delegate with "Create showing [description]" template | File location + summary |
| Compare diagrams | Delegate with "Compare [A] vs [B]" template | Key differences (not raw JSON) |
Token Analysis (Why This Matters)
Real data from baseline testing:
| Scenario | Without Delegation | With Delegation | Savings |
|---|---|---|---|
| Single large file | 22k tokens (45% budget) | ~500 tokens (subagent summary) | 98% |
| Two-file comparison | 18k tokens (9% budget) | ~800 tokens (diff summary) | 96% |
| Modification task | 14k tokens (7% budget) | ~300 tokens (confirmation) | 98% |
Context pollution impact:
- Reading all 7 project diagrams: 67k tokens (33% of 200k budget)
- With delegation: ~2k tokens (isolated in subagents)
- Savings: 97% context budget preserved
Implementation Example
❌ BAD (Direct Read):
User: "What architecture is shown in detailed-architecture.excalidraw.json?"
Agent: Let me read that file... [reads 22k tokens into main context]✅ GOOD (Subagent Delegation):
User: "What architecture is shown in detailed-architecture.excalidraw.json?"
Agent: I'll use a subagent to extract the architecture details.
[Dispatches Task tool with general-purpose subagent]
Task: Extract and explain components in .ryanquinn3/ticketing/detailed-architecture.excalidraw.json
[Receives ~500 token summary with component list and relationships]
[Responds to user with architecture explanation, main context preserved]Why "Straightforward JSON" Doesn't Matter
Agents often rationalize: "The format is simple, I can just read it."
The problem isn't complexity - it's verbosity:
- Simple structure with 20+ properties per element
- Repetitive metadata (seed, version, nonce, roughness)
- Positioning data (x, y, width, height) not semantically useful
- Visual styling (strokeColor, opacity, fillStyle) irrelevant to content
Token cost comes from volume, not complexity.
Even "straightforward" JSON consumes 4k-22k tokens because:
- 79 elements × ~280 tokens/element = 22k tokens
- Most tokens are metadata noise
- Only text labels and relationships matter (~10% of content)
The Iron Law
Main agents NEVER read Excalidraw files. No exceptions.
Not for:
- "Quick checks"
- "Small files"
- "Understanding format"
- "One-time analysis"
- "Optimal efficiency"
Always delegate. Isolation is free via subagents.
Excalidraw Skill
A Claude Code skill for efficiently working with Excalidraw diagram files through intelligent subagent delegation.
Purpose
This skill provides a pattern for working with Excalidraw files (.excalidraw, .excalidraw.json) without exhausting the main agent's context budget. Excalidraw JSON files are extremely verbose (4k-22k tokens per file) but have low information density, making them perfect candidates for subagent delegation.
When to Use
Use this skill when:
- Working with files ending in
.excalidrawor.excalidraw.json - User requests diagram operations: "explain diagram", "update flowchart", "create architecture visualization"
- User mentions: "flowchart", "architecture diagram", "Excalidraw file"
- Performing architecture/design documentation tasks involving visual artifacts
Important: Use delegation even for:
- "Small" files (smallest is still 4k tokens)
- "Quick checks" (loading full JSON even just to check component names)
- Single file operations (isolation prevents context pollution)
- Modifications (don't need full format understanding in main context)
The Problem This Solves
Excalidraw files have an extremely low signal-to-noise ratio:
- Each shape has 20+ properties (x, y, width, height, strokeColor, seed, version, etc.)
- Most properties are visual metadata (positioning, styling, roughness)
- Actual useful content: text labels and element relationships (<10% of file)
- Token cost: Single files range from 4k-22k tokens
- Context exhaustion: Reading 7 diagrams = 67k tokens (33% of 200k budget)
Real Examples
- 14-element diagram: 596 lines, 16K, ~4k tokens
- 79-element diagram: 2,916 lines, 88K, ~22k tokens (exceeds read limits)
How It Works
Core Principle
Main agents NEVER read Excalidraw files directly. Always delegate to subagents.
The Delegation Pattern
1. Main agent receives request involving Excalidraw file 2. Main agent creates a task description for subagent 3. Subagent reads/modifies the Excalidraw JSON in isolation 4. Subagent returns text-only summary (not raw JSON) 5. Main agent context remains clean
What Main Agents Should NEVER Do
- Use Read tool on *.excalidraw files
- Parse Excalidraw JSON in main context
- Load multiple diagrams for comparison
- Inspect file to "understand the format"
What Main Agents Should ALWAYS Do
- Delegate ALL Excalidraw operations to subagents
- Provide clear task description to subagent
- Request text-only summaries (not raw JSON)
- Keep diagram analysis isolated from main work
Key Features
Token Efficiency
| Scenario | Without Delegation | With Delegation | Savings |
|---|---|---|---|
| Single large file | 22k tokens (45% budget) | ~500 tokens | 98% |
| Two-file comparison | 18k tokens (9% budget) | ~800 tokens | 96% |
| Modification task | 14k tokens (7% budget) | ~300 tokens | 98% |
Context Preservation
- Reading all 7 project diagrams directly: 67k tokens (33% of budget)
- With delegation: ~2k tokens (isolated in subagents)
- Overall savings: 97% context budget preserved
Usage Examples
Example 1: Understanding a Diagram
User Request: "What architecture is shown in detailed-architecture.excalidraw.json?"
Correct Approach:
Agent: I'll use a subagent to extract the architecture details.
Task: Extract and explain the components in detailed-architecture.excalidraw.json
Approach:
1. Read the Excalidraw JSON
2. Extract only text elements (ignore positioning/styling)
3. Identify relationships between components
4. Summarize architecture/flow
Return:
- List of components/services with descriptions
- Connection/dependency relationships
- Key insights about the architecture
- DO NOT return raw JSON or verbose element detailsResult: ~500 token summary with component list and relationships, main context preserved.
Example 2: Modifying a Diagram
User Request: "Add a Redis cache component to the architecture diagram, connected to the API service"
Correct Approach:
Task: Add Redis cache to architecture.excalidraw.json, connected to API service
Approach:
1. Read file to identify existing elements
2. Find API service element and its position
3. Create new element JSON for Redis cache
4. Add arrow elements for connections
5. Write updated file
Return:
- Confirmation of changes made
- Position of new element
- IDs of created elementsExample 3: Creating a New Diagram
User Request: "Create a flowchart showing the user authentication flow"
Correct Approach:
Task: Create new Excalidraw diagram showing user authentication flow
Approach:
1. Design layout for authentication steps (login, validate, token, response)
2. Create rectangle elements with text labels
3. Add arrows showing relationships
4. Use consistent styling (colors, fonts)
5. Write to auth-flow.excalidraw.json
Return:
- Confirmation of file created
- Summary of components included
- File locationExample 4: Comparing Diagrams
User Request: "Compare the monolith vs microservices architecture diagrams"
Correct Approach:
Task: Compare architecture approaches in monolith.excalidraw.json vs microservices.excalidraw.json
Approach:
1. Read both files
2. Extract text labels from each
3. Identify structural differences
4. Compare component relationships
Return:
- Key differences in architecture
- Components unique to each approach
- Relationship/flow differences
- DO NOT return full element details from both filesCommon Rationalizations to Avoid
Agents often try to justify reading Excalidraw files directly. Here are common excuses and why they're wrong:
| Excuse | Reality | What to Do |
|---|---|---|
| "Direct reading is most efficient" | Consumes 4k-22k tokens unnecessarily | Delegate to subagent |
| "It's token-efficient to read directly" | Baseline tests showed 9-45% budget used | Always delegate |
| "This is optimal for one-time analysis" | "One-time" still pollutes main context | Subagent isolation |
| "The JSON is straightforward" | Simplicity ≠ token efficiency | Delegate anyway |
| "I need to understand the format" | Format understanding not needed in main agent | Subagent handles format |
| "Within reasonable bounds" (18k tokens) | "Reasonable" is subjective rationalization | Hard rule: delegate |
| "Just a quick check of components" | "Quick check" still loads full JSON | Extract text via subagent |
| "File is small (16K)" | 4k tokens is NOT small | Size threshold doesn't matter |
Red Flags - Stop and Delegate
If you find yourself about to:
- Use Read tool on .excalidraw file
- "Quickly check" what components exist
- "Understand the structure" before modifying
- Load file to "see what's there"
- Compare multiple diagrams side-by-side
- Parse JSON to "extract just the text"
STOP. Use the Task tool with a subagent instead.
Quick Reference
| Operation | Main Agent Action | Subagent Returns |
|---|---|---|
| Understand diagram | Delegate with "Extract and explain" template | Component list + relationships |
| Modify diagram | Delegate with "Add [X] connected to [Y]" template | Confirmation + changes made |
| Create diagram | Delegate with "Create showing [description]" template | File location + summary |
| Compare diagrams | Delegate with "Compare [A] vs [B]" template | Key differences (not raw JSON) |
The Iron Law
Main agents NEVER read Excalidraw files. No exceptions.
Not for:
- "Quick checks"
- "Small files"
- "Understanding format"
- "One-time analysis"
- "Optimal efficiency"
Always delegate. Isolation is free via subagents.
Why "Straightforward JSON" Doesn't Matter
Agents often rationalize: "The format is simple, I can just read it."
The problem isn't complexity - it's verbosity:
- Simple structure with 20+ properties per element
- Repetitive metadata (seed, version, nonce, roughness)
- Positioning data (x, y, width, height) not semantically useful
- Visual styling (strokeColor, opacity, fillStyle) irrelevant to content
Token cost comes from volume, not complexity:
- 79 elements × ~280 tokens/element = 22k tokens
- Most tokens are metadata noise
- Only text labels and relationships matter (~10% of content)
Task Templates
Read/Understand Operation
Task: Extract and explain the components in [file.excalidraw.json]
Approach:
1. Read the Excalidraw JSON
2. Extract only text elements (ignore positioning/styling)
3. Identify relationships between components
4. Summarize architecture/flow
Return:
- List of components/services with descriptions
- Connection/dependency relationships
- Key insights about the architecture
- DO NOT return raw JSON or verbose element detailsModify Operation
Task: Add [component] to [file.excalidraw.json], connected to [existing-component]
Approach:
1. Read file to identify existing elements
2. Find [existing-component] and its position
3. Create new element JSON for [component]
4. Add arrow elements for connections
5. Write updated file
Return:
- Confirmation of changes made
- Position of new element
- IDs of created elementsCreate Operation
Task: Create new Excalidraw diagram showing [description]
Approach:
1. Design layout for [number] components
2. Create rectangle elements with text labels
3. Add arrows showing relationships
4. Use consistent styling (colors, fonts)
5. Write to [file.excalidraw.json]
Return:
- Confirmation of file created
- Summary of components included
- File locationCompare Operation
Task: Compare architecture approaches in [file1] vs [file2]
Approach:
1. Read both files
2. Extract text labels from each
3. Identify structural differences
4. Compare component relationships
Return:
- Key differences in architecture
- Components unique to each approach
- Relationship/flow differences
- DO NOT return full element details from both filesContributing
When improving this skill:
1. Never weaken the delegation requirement 2. Add new task templates as patterns emerge 3. Document token costs of new operations 4. Update examples with real-world scenarios 5. Keep the "Iron Law" absolute
License
Part of the Softaworks Agent Skills collection.
Related skills
Forks & variants (2)
Excalidraw has 2 known copies in the catalog totaling 617 installs. They canonicalize to this original listing.
- softaworks - 603 installs
- cachemoney - 14 installs
How it compares
Use excalidraw for token-heavy Excalidraw JSON; use Mermaid or ASCII diagram skills for lightweight text-native diagrams.
FAQ
Why does excalidraw forbid main agents from reading diagram files?
excalidraw blocks main-agent reads because Excalidraw JSON is verbose—4k–22k tokens per file, with the largest exceeding read limits. Subagents isolate that cost so the parent agent keeps usable context.
Which file types does excalidraw handle?
excalidraw handles *.excalidraw and *.excalidraw.json files when users request diagrams, flowcharts, or architecture visualizations. All parse and edit operations run through delegated subagents.
Is Excalidraw safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.