/visual-gen:architecture-diagramfrom visual-gen
Generates architecture diagrams as PNG files by gathering system info, producing HTML markup, and rendering via Chrome headless. Supports dark and light themes.
Ships in visual-gen. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
End-to-end architecture diagram generation. Gathers system information, produces an HTML file, renders it to PNG via Chrome headless, and delivers the final image. The entire export is automated -- the user never needs to open a browser or run a script manually.
Two visual styles: dark theme (default, SVG-based) and light theme (div-based, print-friendly).
Before writing markup, identify from the request (ask clarifying questions if anything is ambiguous):
tmp/ in the project directory)When the request references a blog post or design document, read it and extract component names and relationships before writing markup.
Ask the user for clarification only when the system description is genuinely ambiguous. Do not ask questions that can be reasonably inferred.
Dark theme (default): Copy resources/template.html as the starting point. Includes inline SVG, CSS, grid background, arrowhead marker, export toolbar stub, and example component patterns.
Light theme: Build from the patterns in references/diagram-styles.md. Div-based layout with CSS classes (.node .service, .db, .group), Inter font, white #FFFFFF background.
For either style, do not start from a blank file. Save the working HTML to tmp/ with a descriptive filename (e.g., tmp/my-project-architecture.html).
Dark theme: SVG <rect> + <text> pairs.
Light theme: div elements with category CSS classes.
Assign colors by semantic type:
| Type | Dark Stroke | Light Class | Use For |
|---|---|---|---|
| Frontend | #22d3ee (cyan) | .service | Web apps, mobile clients, SPAs |
| Backend | #34d399 (emerald) | .server | API servers, microservices, workers |
| Database | #a78bfa (violet) | .storage | SQL, NoSQL, caches, object stores |
| Cloud | #fbbf24 (amber) | .infra | AWS/GCP/Azure managed services |
| Security | #fb7185 (rose) | .external | Auth providers, WAFs, IAM |
| Message Bus | #fb923c (orange) | .storage | Kafka, RabbitMQ, SQS, event buses |
| External | #94a3b8 (slate) | .external | Third-party APIs, CDN, SaaS |
For exact fill values, SVG code snippets, and light-theme CSS, consult:
references/design-system.mdreferences/diagram-styles.mdstroke-dasharray="8,4"), amber, rx="12"stroke-dasharray="4,4"), rose, transparent fill.group class with dashed #bbb borderPlace boundary labels at the top-left corner inside the boundary.
Dark theme: SVG <line> or <path> with marker-end="url(#arrowhead)".
#64748bstroke-dasharray="5,5"), rose #fb7185Light theme: CSS .arrow-down (shaft + triangle head) or .connector-h (Unicode arrows).
Z-order (dark theme): draw arrows after the background grid but before component boxes. SVG renders in document order. To mask arrows behind semi-transparent boxes, add an opaque <rect fill="#0f172a"> beneath the styled rect. Full pattern in references/design-system.md.
Component A: y=70, height=60 -> ends at y=130
Gap: y=130 to y=170 -> 40px gap, bus at y=140 (20px tall)
Component B: y=170, height=60 -> ends at y=230
Place the legend OUTSIDE all boundary boxes. Calculate the lowest boundary edge, start the legend at least 20px below it. Extend the SVG viewBox (dark) or body height (light) if needed.
After saving the HTML file, immediately render it to PNG using the screenshot script:
bash scripts/screenshot.sh tmp/diagram.html tmp/diagram.png
The script:
google-chrome, google-chrome-stable, chromium-browser, or chromium in PATHsaved: <path> (<width>x<height>)Override dimensions when auto-detect fails or the diagram needs a specific size:
bash scripts/screenshot.sh tmp/diagram.html tmp/diagram.png 1200 900
This step is mandatory. Do not stop after writing the HTML. Always produce the PNG.
Read the generated PNG file and check:
If issues are found, fix the HTML and re-run Step 8.
Report the exact file paths of both artifacts:
HTML: tmp/my-project-architecture.html
PNG: tmp/my-project-architecture.png
The HTML file is the editable source. The PNG is the deliverable. Keep both unless the user asks to remove the HTML.
The dark-theme HTML also contains a browser-based export toolbar (Copy/PNG/PDF via html2canvas + jsPDF) for ad-hoc re-export. This is a convenience feature -- the primary export is always via scripts/screenshot.sh.
| Type | Dark (SVG viewBox) | Light (body px) |
|---|---|---|
| Standard | 1000 x 680 | 1200 x 900 |
| Wide | 1200 x 680 | 1200 x 900 |
| Tall | 1000 x 900 | 1200 x 1200 |
resources/template.html -- Dark-theme template with all SVG patterns, CSS, grid background, and export toolbar. Copy to start every dark-theme diagram.examples/diagram-template.html -- Complete working example: three-tier web architecture with CDN, load balancer, API servers, cache, database, message bus, workers, and legend. Useful as a reference for layout and spacing.references/design-system.md -- Dark-theme design system: rgba fill values, typography scale, all SVG code patterns, boundary styles, legend pattern, export toolbar internals.references/diagram-styles.md -- Light-theme reference: CSS classes, node types, group boxes, database cylinder pattern, arrow styles, typography, canvas dimensions.scripts/screenshot.sh -- Chrome headless PNG capture. Auto-detects dimensions from HTML body CSS. Supports both themes.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub widnyana/eyay-toolkits --plugin visual-gen3 skills in this plugin
/cover-imageThis skill should be used when the user asks to "create a cover image",
"generate a blog cover", "make an OG image", "design a social preview",
"create a thumbnail for a post", "add a cover to my article",
"make a featured image", "create a header image for a post",
"generate an open graph image", or mentions cover images, OG images,
social preview images, or blog post thumbnails. Do NOT trigger for
diagrams, architecture diagrams, or process flows.
/process-infographicThis skill should be used when the user asks to "create an infographic",
"generate a process flow", "make a step-by-step diagram",
"design a timeline", "create a workflow diagram",
"visualize a pipeline", "make a numbered sequence",
"show the steps as an image", "create a lifecycle diagram",
"make a flow diagram", or mentions numbered steps, process stages,
deployment pipelines, CI/CD flows, or sequential procedures.
Do NOT trigger for cover images or system architecture diagrams.
Other plugins' skills for the same job