Why This Is Mandatory
JSON shows you coordinates and IDs. The rendered image shows you:- Whether text is clipped or overflowing
- Whether shapes overlap unintentionally
- Whether arrows land on the right elements
- Whether spacing is consistent
- Whether the composition is balanced
- Whether the visual hierarchy matches your intent
Setup (First Time Only)
If the render script hasn’t been set up yet:
You only need to do this once.
The Render-View-Fix Loop
cd ~/.claude/skills/excalidraw-diagram/references
uv run python render_excalidraw.py /path/to/your/diagram.excalidraw
The script uses Playwright to load Excalidraw’s official renderer, ensuring pixel-perfect output matching what users will see.
Does the visual structure match the conceptual structure?
Does the visual structure match the conceptual structure?
- Did you plan a fan-out pattern? Is it actually fanning out?
- Did you plan a timeline? Does it read as a timeline?
- Does each section use the pattern you intended?
Does the eye flow through the diagram correctly?
Does the eye flow through the diagram correctly?
- Is there a clear visual path?
- Do arrows guide the eye in the intended order?
- Are there any dead ends or confusing jumps?
Is the visual hierarchy correct?
Is the visual hierarchy correct?
- Are hero elements dominant?
- Are supporting elements appropriately smaller?
- Do font sizes create clear hierarchy?
For technical diagrams: are evidence artifacts readable?
For technical diagrams: are evidence artifacts readable?
- Can you read the code snippets?
- Are data examples properly formatted?
- Do real event names/API calls stand out?
Don’t skip the visual inspection step. Issues that are invisible in JSON become obvious in the rendered image.
Text Clipping
Problem: Text is cut off inside a shape.Fix: Increase the shape’s width and/or height:
Element Overlap
Problem: Shapes or text overlap unintentionally.Fix: Adjust
x and y coordinates to add spacing: Arrow Routing
Problem: Arrow crosses through other elements.Fix: Add waypoints to the arrow’s
points array to route around obstacles: Floating Labels
Problem: Label isn’t clearly associated with its element.Fix: Move the label closer to the element it describes:
Unbalanced Composition
Problem: Diagram feels lopsided.Fix: Resize elements to rebalance visual weight:
cd ~/.claude/skills/excalidraw-diagram/references
uv run python render_excalidraw.py /path/to/your/diagram.excalidraw
When to Stop
The loop is done when: Don’t stop after one pass just because there are no critical bugs. If the composition could be better, improve it.Common Iteration Patterns
Iteration 1: Fix Critical Issues
First render usually reveals:- Text clipping (most common)
- Major overlaps
- Broken arrow bindings
Iteration 2: Improve Spacing
Second render shows:- Uneven gaps between elements
- Sections that need more breathing room
- Elements that could be closer together
Iteration 3: Polish
Third render is for fine-tuning:- Font size adjustments
- Minor alignment tweaks
- Final arrow routing improvements
Iteration 4: Final Check
Fourth render confirms everything looks good. If new issues appear, continue iterating.Troubleshooting
Render script fails with 'uv: command not found'
Render script fails with 'uv: command not found'
Install Then retry the setup steps.
uv first:Playwright chromium not found
Playwright chromium not found
Run the install command from the references directory:
PNG looks different from expected
PNG looks different from expected
This is normal! The rendered output often reveals issues invisible in JSON. That’s exactly why this step is mandatory.Follow the fix loop to address visual problems.
How do I know which coordinates to change?
How do I know which coordinates to change?
Use the rendered PNG as a reference:
- Note which elements need to move
- Estimate the direction and distance (50px? 100px?)
- Find those elements in JSON by their
id - Adjust
x/ycoordinates - Re-render to verify
Advanced: Batch Rendering
If you’re working on multiple diagrams, you can render them all at once:.excalidraw files in the directory.
Next Steps
Creating Diagrams
Review the full end-to-end workflow
Large Diagrams
Section-by-section strategy for complex diagrams
Quality Checklist
Complete checklist for diagram quality