diagrams-as-code

Installation
SKILL.md

Diagrams as Code

Generate architecture and infrastructure diagrams using the Python diagrams library. Diagrams are Python scripts that render to image files via Graphviz.

Workflow

  1. Check prerequisites - verify graphviz and diagrams are installed
  2. Write the diagram script to a .py file in the user's working directory
  3. Run it with python3 <file>.py
  4. Report the output path to the user (image appears in working directory)

Prerequisites check

command -v dot >/dev/null || brew install graphviz
uv pip install --system diagrams 2>/dev/null || pip install diagrams

Without graphviz, the script fails with a cryptic error. Always verify first.

Related skills
Installs
19
GitHub Stars
130
First Seen
Mar 10, 2026