excalidraw-diagrams

Generate Excalidraw diagrams from Python or Node code as .excalidraw files and PNGs.

4|Updated Sep 16, 2023
One-click install
npx skills add https://github.com/craiggwilson/nix-config --skill excalidraw-diagrams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: excalidraw-diagrams
Source: https://github.com/craiggwilson/nix-config/tree/main/hdwlinux/modules/ai/agent/skills/excalidraw-diagrams/skill
Command: npx skills add https://github.com/craiggwilson/nix-config --skill excalidraw-diagrams

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) components.

What problem does it solve?

This Skill enables you to generate Excalidraw diagrams programmatically from code, replacing manual diagram drawing with repeatable scripted visuals.

Core Features & Use Cases

  • Python-based generator: Create flowcharts, architecture diagrams, and system designs as .excalidraw files that can be opened in Excalidraw or VS Code.
  • Inline diagram APIs: Use the provided Diagram, Flowchart, and ArchitectureDiagram APIs to compose diagrams from code.
  • Export & sharing: Includes a self-contained bin/ directory with tools to export to PNG via Playwright and to save diagrams for documentation, presentations, or embedding in tooling.

Quick Start

To get started, run diagrams generation from the bundled Python APIs or invoke the Node-based export tool to export to PNG. For example, create a diagram and save it as diagram.excalidraw, then use the export script to convert it to PNG if needed.

Frequently Asked Questions about excalidraw-diagrams

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Excalidraw diagrams programmatically from Python code?

To generate Excalidraw diagrams programmatically, use the bundled Python APIs like Diagram, Flowchart, and ArchitectureDiagram to compose visuals from code and save them as .excalidraw files. This replaces manual drawing with repeatable scripted generation for flowcharts and architecture designs.

Can I export Excalidraw files to PNG for documentation?

You can export Excalidraw files to PNG for documentation by using the self-contained Node-based export tool included in the bin directory. This tool relies on Playwright to convert your saved .excalidraw files into PNG images for presentations and sharing.

Do I need Playwright installed to export Excalidraw diagrams to PNG?

Yes, Playwright is a required dependency to export Excalidraw diagrams to PNG. The Node-based export tool in the bin directory specifically relies on Playwright to automate the browser rendering needed for converting .excalidraw files into PNG images.

What is the best way to automate architecture diagram creation for software engineering documentation?

The best way to automate architecture diagram creation is using scripted Python APIs to generate repeatable Excalidraw diagrams. The ArchitectureDiagram API allows software engineers and architects to define system designs in code and export them as .excalidraw files or PNGs for documentation.

Does the Excalidraw programmatic generator work with Node and Python?

Yes, the Excalidraw programmatic generator works with both Python and Node. It provides Python-based APIs for creating and saving diagrams, alongside Node-based tooling in the bin directory specifically for exporting the generated .excalidraw files to PNG format.

Why use code to generate Excalidraw flowcharts instead of drawing them manually?

Generating Excalidraw flowcharts from code replaces manual diagram drawing with repeatable scripted visuals. This approach ensures consistency across system designs, allows easy updates to architecture diagrams, and enables direct integration into automated documentation and sharing pipelines.