Skill

Generate Infrastructure Diagrams from Code

A skill that generates infrastructure diagrams matched to purpose - network, microservices, cloud topology, Kubernetes, sequence.

Works with mermaidplantuml

79
Spark score
out of 100
Updated 7 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Automate the creation of clear, professional infrastructure and architectural diagrams. This asset translates complex requirements into visual representations using tools like Mermaid and PlantUML, enhancing communication and documentation.

Outcomes

What it gets done

01

Generate network architecture diagrams

02

Create microservices architecture visualizations

03

Produce AWS three-tier and Kubernetes cluster diagrams

04

Visualize data flow and request sequences

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-infrastructure-diagram-generator | bash

Overview

Infrastructure Diagram Generator

This skill generates infrastructure diagrams matched to purpose - network topology, microservices dependencies, AWS three-tier and Kubernetes architecture, and request-flow sequence diagrams - in Mermaid or PlantUML. Use it when communicating a specific architectural concern - network, microservices, cloud topology, or request flow - rather than one all-purpose diagram.

What it does

This skill creates infrastructure diagrams and architectural visualizations that translate complex infrastructure requirements into clear, professional diagrams communicating system architecture, data flow, and component relationships. Mermaid is the primary tool for markdown-compatible diagrams; PlantUML handles complex systems and detailed component diagrams, including AWS-specific icon libraries. It covers distinct diagram types for distinct purposes: network architecture diagrams focused on connectivity, security zones, and traffic flow (on-premises VPN connecting into an AWS VPC with public, private, and database subnets), microservices architecture diagrams showing service dependencies and communication patterns (an API gateway routing to distinct services, each with its own dedicated database or cache), cloud-specific patterns like a multi-AZ AWS three-tier architecture (load balancer and NAT in a public subnet, web and app servers in a private subnet, primary and standby RDS instances replicating across availability zones) and a Kubernetes cluster architecture (a master node running the API server, etcd, scheduler, and controller manager, alongside worker nodes each running kubelet, kube-proxy, and pods), and sequence diagrams for request-flow visualization.

When to use - and when NOT to

Use it when you need a diagram type matched to a specific architectural concern - network, microservices, cloud topology, Kubernetes, or request flow - not one overloaded diagram trying to show everything at once. It is not meant to substitute one all-purpose diagram for several focused ones: best practice explicitly favors multiple related diagrams over a single complex one, each with its own legend for symbols and color coding.

Inputs and outputs

Given an infrastructure to visualize, it produces a sequence diagram tracing a request through the system - from the user through a CDN, a load balancer, and an API server, branching on a cache-hit or cache-miss path before returning through the same chain - clearly showing which calls are synchronous and which paths are conditional. It follows a fixed visual hierarchy: subgraphs to group related components, consistent color coding by layer (web, app, data), element sizing that reflects importance or capacity, and directional arrows for data flow and dependencies, with labels that include IP ranges for network diagrams, ports and protocols for security diagrams, capacity or sizing figures, and technology-stack detail in each component label.

sequenceDiagram
    participant U as User
    participant CF as CloudFront
    participant ALB as Load Balancer
    participant API as API Server
    participant DB as Database
    participant Cache as Redis
    
    U->>CF: HTTPS Request
    CF->>ALB: Forward Request
    ALB->>API: Route to Service
    API->>Cache: Check Cache
    alt Cache Hit
        Cache-->>API: Return Cached Data
    else Cache Miss
        API->>DB: Query Database
        DB-->>API: Return Data
        API->>Cache: Store in Cache
    end
    API-->>ALB: Response
    ALB-->>CF: Response
    CF-->>U: Cached Response

Integrations

Tool choice is matched to the job: Mermaid for documentation and CI/CD-integrated simple architectures, PlantUML for complex UML and detailed component relationships (including its AWS icon include library), Lucidchart or Draw.io for presentation-quality diagrams with custom styling, and Terraform Graph for visualizing infrastructure-as-code directly. Security and compliance diagrams additionally mark security boundaries and trust zones, show encryption points and certificate flows, and highlight compliance controls, audit points, and data-classification handling requirements.

Who it's for

Platform and infrastructure engineers who need to communicate system architecture clearly to both technical and non-technical stakeholders, choosing the right diagram type and tool for network topology, microservices dependencies, cloud deployment patterns, Kubernetes clusters, or request-flow tracing rather than defaulting to one generic diagram style.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.