excalidraw-diagrams

Installation
SKILL.md

Excalidraw diagrams from a source document

Generate .excalidraw scenes with a script, not by hand. The script sizes boxes from their text, binds arrows, and fails the build when the layout breaks. The diagram never holds a fact that its source document lacks.

Reference run: a 13-frame production platform diagram in an Obsidian vault, built from its design document.

Workflow

  1. Write the goals first. One file in the scratchpad: readers, the question each frame answers, checkable success criteria, non-goals, deliverables. Template in references/design-rules.md. Get the user's go before building.
  2. Fix the source of truth. Update the design doc first. Every value on the diagram must exist in it. A value that is not decided gets a tag: proposed, to assign, open, user-verify. Never invent an address, port, count, or version to fill space.
  3. Write the frames. Work in a scratch directory, never inside a repo. Copy examples/example_frames.py to frames_a.py. One function per frame: f0(doc), f1(doc), and so on. Use only the helpers in scripts/xl.py (its docstring lists them).
  4. Build. From the scratch directory: python3 <skill>/scripts/build.py frames_a,frames_b out.excalidraw. Fix every ERROR and rebuild. The build exits 1 on errors but still writes the file.
  5. Look at every frame. <skill>/scripts/preview.sh out.excalidraw prev, then Read each PNG in prev/png. Checks do not replace looking. Fix what is cramped, empty, or wrong.
  6. Cross-check and validate. python3 <skill>/scripts/crosscheck.py out.excalidraw source.md lists facts the source lacks. python3 <skill>/scripts/validate.py out.excalidraw checks structure. Each leftover is either added to the source or removed from the diagram.
  7. Install. Write the file to its final path. Update the embed and the frame table in the doc so the frame names match exactly. Move the old diagram to the vault .trash/ with the reason in the filename (vault rule: never rm). Tell the user the generator ran once and later edits happen by hand in Obsidian.

Frame recipe

Installs
2
GitHub Stars
9
First Seen
Oct 20, 2026
Security Audits