Open Source

Excalidraw Figures

Hand-drawn article figures from one bilingual spec. Write the figure once in Python, get an editable .excalidraw, an SVG preview, and a Chrome-rendered PNG per language, plus a layout check that fails on overlapping text. Also a Claude Code skill.

DiagramsPythonClaude CodeBilingualOpen Source

Excalidraw Figures turns a small Python spec into hand-drawn-style figures for articles, READMEs, and talks — and keeps the English and Traditional Chinese versions in sync because they come from the same source.

How it works

  • One spec, N languages — every label is a dictionary of translations; add a language by adding a key
  • Editable output — real .excalidraw JSON you can open on excalidraw.com or in Obsidian and keep drawing
  • What the reader sees — a PNG rendered by headless Chrome from the preview SVG, so you check actual pixels
  • A check that fails — text outside the canvas, wider than its box, over other text, or straddling an edge exits with code 1
  • Small budget on purpose — three fills plus white, at most ten boxes, labels never on lines

Python 3.9+ with no packages; PNG export needs Chrome. Packaged as a Claude Code skill and plugin, so "draw the three-gate flow for this section, EN and ZH" produces checked figures.