How cclank/lanshu-animated-architecture-diagram works
Lanshu is a Codex skill and local Python tool for turning a JSON diagram spec into editable Excalidraw, PNG, and animated GIF files. The documented workflow is to invoke the skill or run the renderer with a spec, then optionally verify the outputs. The renderer also provides text fitting, drawing, animation, and output checks. The source excerpt is partial, so internal calls beyond those explicitly shown are not mapped.
Main entry points: render_animated_diagram.py CLI Renderer · default-spec.json Default Spec · spec-format.md Spec Format · SKILL.md Codex Skill
Components 12
Spec and Skill
- Codex Skill
SKILL.md - Default Spec
assets/default-spec.json - Spec Format
references/spec-format.md
Rendering
- CLI Renderer
scripts/render_animated_diagram.py - Text Fitting
scripts/render_animated_diagram.py - Excalidraw Builder
scripts/render_animated_diagram.py - GIF Animation
scripts/render_animated_diagram.py - Output Checks
scripts/render_animated_diagram.py
Generated Outputs
- Editable Excalidraw
- Static PNG
- Animated GIF
Other components
- Diagram Author
Connections 11
- Diagram Author → Codex Skill: invokes
README.md - Diagram Author → CLI Renderer: runs
README.md - CLI Renderer → Default Spec: loads default
README.md - CLI Renderer → Text Fitting: fits text
scripts/render_animated_diagram.py - CLI Renderer → Excalidraw Builder: builds elements
scripts/render_animated_diagram.py - CLI Renderer → GIF Animation: creates frames
scripts/render_animated_diagram.py - CLI Renderer → Editable Excalidraw: writes
scripts/render_animated_diagram.py - CLI Renderer → Static PNG: saves
scripts/render_animated_diagram.py - CLI Renderer → Animated GIF: saves
scripts/render_animated_diagram.py - CLI Renderer → Output Checks: checks outputs
README.md - Spec Format → Default Spec: describes fields
README.md