Receber por email
← Voltar para o catálogo

generating-gcp-diagrams

Gera diagramas XML DrawIO para arquiteturas Google Cloud Platform a partir de texto ou imagens, e analisa arquivos .drawio existentes para extrair componentes GCP. Ideal para diagramas de arquitetura GCP, documentação de infraestrutura em nuvem ou para converter imagens de diagramas GCP para o formato DrawIO editável.

1.4kestrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add a5c-ai/babysitter

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/generating-gcp-diagrams/svg)](https://www.skillteca.com.br/skills/generating-gcp-diagrams)

Skills relacionadas

Ver todas de DevOps e Infra →

Alerta por categoria

Receba novas skills de DevOps e Infra toda segunda

1 email curto, só com as skills novas de DevOps e Infra. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

GCP DrawIO Diagram Generator

Generates professional DrawIO XML diagrams for Google Cloud Platform architectures.

Capabilities

  1. Extract - Analyze existing DrawIO XML files to identify GCP shapes, connections, and structure
  2. Identify - Recognize GCP service icons from architecture diagram images
  3. Generate - Create valid DrawIO XML from images or text descriptions
  4. Convert - Transform GCP architecture diagrams into editable DrawIO format

Quick Reference

GCP Shape Pattern

shape=mxgraph.gcp2.{service_name}

Note: GCP uses snake_case for shape names (e.g., cloud_run, cloud_sql, cloud_storage).

Icon Pattern: Unlike AWS, GCP uses a single icon pattern for all services — there is no service vs instance icon distinction. The same shape=mxgraph.gcp2.{name} is used whether labeling the service itself ("Cloud Run") or a specific instance ("Cloud Run (API Handler)"). Differentiate by label text only.

Common GCP Services

| Service | Shape Code | |---------|-----------| | Cloud Run | mxgraph.gcp2.cloud_run | | BigQuery | mxgraph.gcp2.bigquery | | Cloud Storage | mxgraph.gcp2.cloud_storage | | Vertex AI | mxgraph.gcp2.cloud_machine_learning | | Cloud Scheduler | mxgraph.gcp2.cloud_scheduler | | Apigee | mxgraph.gcp2.apigee_api_platform | | Pub/Sub | mxgraph.gcp2.cloud_pubsub | | Cloud SQL | mxgraph.gcp2.cloud_sql | | GKE | mxgraph.gcp2.compute_engine | | Cloud Functions | mxgraph.gcp2.cloud_functions |

GCP Container Types

| Container | Use Case | |-----------|----------| | gcp_project | Main project boundary (two-cell pattern) | | gcp_vpc_sc | VPC Service Controls perimeter (green border) | | gcp_region | Regional grouping | | gcp_zone | Zone grouping | | logical_group_dashed | Logical grouping with dashed border | | logical_group_solid | Solid border grouping | | subnet | Subnet boundary | | firewall_rules | Firewall rules grouping | | instance_group | Instance group container |

Task 1: Analyze a DrawIO File

Use this workflow to extract and document all components from an existing DrawIO file.

Steps

  1. Read the file - Load the .drawio XML file
  2. Parse structure - Extract all <mxCell> elements
  3. Identify shapes - Find cells with vertex="1"
  4. Identify connections - Find cells with edge="1"
  5. Extract styles - Parse style strings for each element
  6. Map hierarchy - Build container/child relationships using parent attribute
  7. Generate report - Output findings in structured format

Input

  • Path to .drawio file

Output

Generate a Markdown report with:

# DrawIO Analysis Report

## Summary
- Total shapes: X
- Total connections: Y
- Containers: Z

## Shape Inventory

| ID | Label | Type | Position | Parent |
|----|-------|------|----------|--------|
| abc | Cloud Run | mxgraph.gcp2.cloud_run | (100,200) | vpc1 |

## Connection Matrix

| From | To | Label | Type |
|------|-----|-------|------|
| Cloud Run | BigQuery | API | solid |

## Container Hierarchy

- VPC-SC (vpc1)
  - Cloud Run (run1)
  - Cloud Run (run2)
  - BigQuery (bq1)

## Style Analysis

### Unique Shapes Found
- mxgraph.gcp2.cloud_run (4 instances)
- mxgraph.gcp2.bigquery (2 instances)

Task 2: Convert Image to DrawIO

Use this workflow to recreate a GCP architecture diagram from an image.

Steps

  1. Analyze image - Identify all visual elements:
  2. GCP service icons (shape, color, label)
  3. Containers/boundaries (color, border style)
  4. Connections (solid, dashed, arrows)
  5. Labels and text
  1. Map to library - For each identified element:
  2. Look up in assets/gcp-icons.json by visual signature or label
  3. Match containers to assets/containers.json
  4. Note any unrecognized elements
  1. Estimate layout - Determine positions:
  2. Identify container boundaries first
  3. Place icons within containers
  4. Estimate x,y coordinates and dimensions
  5. Standard icon size: 50x50 pixels
  1. Generate XML - Build the DrawIO structure:
  2. Start with base template from assets/templates/drawio-base.xml
  3. Add containers first (they become parents)
  4. Add service icons with correct parent references
  5. Add connections between shapes
  1. Create confidence report - Document accuracy:
  2. List all identified components
  3. Note any uncertain matches
  4. Flag potential issues

Input

  • GCP architecture diagram image (PNG/JPG)

Output

  1. Valid .drawio XML file
  2. Confidence report (Markdown)

Confidence Report Format

# Conversion Confidence Report

## Overall Confidence: 85%

## Identified Components

### High Confidence (>90%)
- Cloud Run x4 - Clear icon match
- BigQuery x2 - Clear icon match
- VPC-SC container - Green border, correct label

### Medium Confidence (70-90%)
- Vertex AI Search - Icon similar, label confirms

### Low Confidence (<70%)
- Unknown icon at position (300, 400) - Mapped to generic service

## Connection Accuracy
- 12/14 connections clearly visible
- 2 connections inferred from layout

## Notes
- "Same Instance" dashed container identified
- Bidirectional arrows on 3 connections

Task 3: Create DrawIO from Description

Use this workflow to generate a new GCP diagram from text specifications.

Steps

  1. Parse requirements - Extract from description:
  2. Required GCP services
  3. Container/grouping needs
  4. Connection requirements
  5. Layout preferences
  1. Select components - From libraries:
  2. Look up services in assets/gcp-icons.json
  3. Choose containers from assets/containers.json
  4. Select connection styles
  1. Plan layout - Design the arrangement:
  2. Determine canvas size
  3. Position containers first
  4. Arrange services logically (left-to-right data flow, top-to-bottom hierarchy)
  5. Standard spacing: 100px between 50x50 icons
  1. Generate XML - Build the diagram:
  2. Use assets/templates/drawio-base.xml as starting point
  3. Add elements in order: containers, services, connections
  4. Assign unique IDs to all elements
  1. Validate - Check the output:
  2. All requested components present
  3. Connections reference valid IDs
  4. Layout is logical and readable

Input

  • Text description of desired GCP architecture

Output

  • Valid .drawio XML file

Example Input

Create a GCP architecture with:
- VPC-SC container
- Cloud Scheduler triggering Cloud Run
- Cloud Run connecting to BigQuery and Cloud Storage
- Vertex AI Search connected to BigQuery

Example Output Structure

<mxfile ...>
  <diagram name="GCP Architecture">
    <mxGraphModel ...>
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <!-- VPC-SC Container -->
        <mxCell id="vpc" value="VPC-SC" style="..." vertex="1" parent="1">
          <mxGeometry x="50" y="50" width="700" height="400" />
        </mxCell>
        <!-- Cloud Scheduler -->
        <mxCell id="sched" value="Cloud Scheduler" style="...mxgraph.gcp2.cloud_scheduler" vertex="1" parent="vpc">
          <mxGeometry x="50" y="100" width="50" height="50" />
        </mxCell>
        <!-- More shapes... -->
        <!-- Connections -->
        <mxCell id="conn1" edge="1" source="sched" target="run" style="..." />
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

Shape Library Reference

Looking Up a GCP Service

  1. Open assets/gcp-icons.json
  2. Search by service_name or recognition_keywords
  3. Use the drawio_shape.full_style for complete styling
  4. Or construct style using shape=mxgraph.gcp2.{shape_name}

Service Coverage:

  • 46 GCP services across 11 categories
  • 40 exact matches, 6 fallback icons
  • Categories: compute, database, storage, networking, ai_ml, integration, operations, api_management, data_analytics, devops, security

Note: 6 services use fallback icons (Workflows, Eventarc, Artifact Registry, Cloud Deploy, Secret Mana

Compartilhar X LinkedIn