con un clic
architecture-diagram
Generate architecture diagrams for documentation using matplotlib.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Generate architecture diagrams for documentation using matplotlib.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Reference official Anthropic docs and Claude guidance.
Reference official OpenAI docs and API guidance.
Edit and review docx-style documents.
Inspect repositories, PRs, issues, and CI workflows.
Create, edit, and review PDFs.
Automate real browsers from the terminal.
| name | architecture-diagram |
| description | Generate architecture diagrams for documentation using matplotlib. |
| version | 1.0.0 |
| author | OK Code |
| tags | ["diagrams","documentation","architecture","visualization"] |
| tools | ["terminal","filesystem"] |
| triggers | ["use when the user asks for an architecture diagram","use when the user wants to visualize system components or data flow","use when a README needs a visual architecture overview","use when the user says \"generate diagram\" or \"architecture diagram\""] |
Generates publication-quality PNG architecture diagrams using Python + matplotlib. Diagrams use a consistent visual language: colored rounded boxes for components, styled arrows for data flow, dashed boundaries for service groups, and score badges for comparisons.
Determine which diagram pattern fits the request:
| Pattern | When to use | Example |
|---|---|---|
| High-level architecture | Full system overview with all components | high-level-architecture.png |
| Request/event flow | Show how data moves through a pipeline | server-request-flow.png |
| Package dependencies | Show import/dependency relationships | package-dependencies.png |
| Event flow | Show event sourcing or pub/sub patterns | orchestration-event-flow.png |
| Tech stack | Layered technology overview | tech-stack.png |
| Architecture comparison | Compare N alternatives with scores | telemetry-style comparison grid |
The diagram generator lives at scripts/generate-architecture-diagrams.py. It provides reusable primitives:
from generate_architecture_diagrams import (
draw_box, # Rounded colored rectangle with label + sublabel
draw_arrow, # Styled arrow with optional label and curve
draw_boundary, # Dashed service/group boundary
draw_badge, # Colored score circle
new_fig, # Create a new figure with standard theme
save, # Save to assets/diagrams/
THEME, # Consistent color palette
Box, Arrow, # Dataclasses for components
)
To add a new diagram, add a new generate_*() function to the script following the existing patterns, then call it from main().
To create a standalone diagram, write a new Python script that imports the primitives or copies the pattern.
# Ensure matplotlib is available (use a venv if system Python is externally-managed)
python3 -m venv /tmp/diag-venv 2>/dev/null
/tmp/diag-venv/bin/pip install matplotlib 2>/dev/null
/tmp/diag-venv/bin/python scripts/generate-architecture-diagrams.py
Output lands in assets/diagrams/. Reference from markdown as:

Add diagram references to the relevant README.md using relative paths. Place diagrams immediately after the section heading they illustrate.
| Role | Color | Hex | Use for |
|---|---|---|---|
| Client | Blue | #4A90D9 | UI, browser, external clients |
| Server | Green | #2ECC71 | Server components, orchestration |
| Provider | Orange | #E67E22 | External provider processes |
| Contracts | Purple | #9B59B6 | Shared type/schema packages |
| Shared | Light blue | #3498DB | Shared runtime utilities |
| Storage | Amber | #F39C12 | Persistence, checkpoints |
| External | Gray | #95A5A6 | External/third-party processes |
| Desktop | Dark gray | #34495E | Desktop/Electron shell |
| Style | Color | Meaning |
|---|---|---|
| Solid green | arrow_ws | WebSocket connection |
| Solid orange | arrow_stdio | JSON-RPC stdio pipe |
| Solid purple | arrow_event | Event stream / push |
| Dashed | any | Import / dependency reference |
Box(x, y, w, h, label, color, sublabel=...) — rounded rectangle with centered textArrow(x1, y1, x2, y2, label, color, curve=0.0) — directed arrow, optional arcdraw_boundary(ax, x, y, w, h, label, color) — dashed group rectangledraw_badge(ax, x, y, text, color) — small colored circle with scoreassets/diagrams/ — never inline base64 images in markdown.