Orchestrates end-to-end Graph Machine Learning (GNN) solutions on Google Cloud, integrating Knowledge Catalog discovery (Dataplex, Collibra), BigQuery and Spanner Property Graph staging and readiness auditing, Distributed Graph Flow (dgf) pipeline synthesis, and Colab Enterprise training. Use when evaluating graph vs. tabular ML, staging enterprise sources (Drive, SharePoint, Salesforce, CSVs) into graphs, mapping ontologies and auditing foreign-key joins, super-hubs, or feature leakage, designing temporal splits and DGF GNN models, running multi-hop sampling on Dataflow or high-memory VMs, generating Colab Enterprise notebooks, or diagnosing GNN lift and Vizier tuning. Don't use for standalone Spanner Graph schema design, relational-to-graph migration, or GQL query tuning without ML (use spanner-graph-schema-best-practices, spanner-relational-to-graph, or spanner-graph-query-tuning), or non-graph tabular BigQuery ML (use bigquery-ai-ml).
Capabilities
Usage Attribution
Before executing any gcloud, REST API, or MCP command, you MUST
IAM Roles
Ensure the operator or service account holds the minimal roles applicable to the
State 0 Greeting Protocol
When the user sends a greeting ("Hi", "Hello", "Help me with graph ML", or
Precedence Rule
If the user's initial prompt combines a greeting with a concrete technical task
Getting started
Full instructionsExample command
Prerequisites Checklist
pip install -U "dgf>=0.2.0,<0.3.0"Instructions: SKILL.mdv1.0.0
Graph machine learning (GNN) on Google Cloud
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST
read and follow the instructions in
Usage Attribution.
Google Cloud Prerequisites, IAM, Region & Cost Hygiene
Before provisioning resources or querying data, verify environment setup and
obtain human authorization for billable actions:
1. Prerequisites Checklist
-
Google Cloud SDK (
gcloud): EnsuregcloudandbqCLI tools are
installed
(Cloud SDK Installation).
If missing locally, provide copy-ready commands for the user to run. Never
install software packages on the host machine without explicit approval,
because unsolicited host changes can conflict with local environments or
security policies. -
Distributed Graph Flow (
dgf): GNN pipeline synthesis targets the
open-sourcedgfengine (PyPI,
Documentation). Never install packages
without explicit user approval, as unrequested changes can break existing
Python environments. Provide copy-ready commands for the user:-
Default (stable release):
bashpip install -U "dgf>=0.2.0,<0.3.0" -
Alternative (instead of stable, pre-release nightly builds — both
packages provide the top-leveldgf/module, so uninstall stable
first):bashpip uninstall -y dgf && pip install -U dgf-nightly -
Optional (only required for Tier 2 distributed Dataflow ETL via
dgf.beam):bashpip install -U "apache-beam[gcp]>=2.78.0,<3.0.0"
-
-
Authentication:
- Local CLI execution:
gcloud auth login - Application Default Credentials (ADC):
gcloud auth application-default login - Non-interactive / Service Account: set
GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json.
- Local CLI execution:
-
Project Selection:
bashgcloud config set project {project_id} -
Active Billing Account: An active billing account must be attached to
{project_id}. Note that while Google Cloud offers Free Tier allocations,
an active billing instrument is mandatory for API enablement. -
API Enablement:
-
Core APIs (BigQuery primary staging/audit backend, Cloud Storage
artifacts, Colab Enterprise runtimes, and Compute Engine VMs):bashgcloud services enable \ bigquery.googleapis.com \ storage.googleapis.com \ aiplatform.googleapis.com \ dataform.googleapis.com \ compute.googleapis.com -
Optional Backend/Tier APIs (run only the command(s) for optional
services used by your workflow):-
Spanner / Spanner Graph (optional — only if reading from Spanner):
bashgcloud services enable spanner.googleapis.com -
Dataflow (optional — Tier 2 distributed ETL only):
bashgcloud services enable dataflow.googleapis.com -
Knowledge Catalog & Data Lineage (optional — only if using
Dataplex):bashgcloud services enable dataplex.googleapis.com datalineage.googleapis.com
-
-
2. IAM Roles
Ensure the operator or service account holds the minimal roles applicable to the
services used in the workflow:
- BigQuery staging & audit (core — primary staging and audit backend; omit
only if reading exclusively from Spanner or GCS):
roles/bigquery.dataEditor,roles/bigquery.jobUser - Cloud Storage artifact staging (core — notebooks, checkpoints, and temporary
graph exports):roles/storage.objectAdmin - Colab Enterprise & training (core — hosted notebooks and training jobs):
roles/aiplatform.colabEnterpriseUser,roles/aiplatform.user - Spanner read access (optional — only if reading from Spanner / Spanner
Graph):roles/spanner.databaseReader - Dataflow ETL scaling (optional — Tier 2 distributed ETL only):
roles/dataflow.developer - Knowledge Catalog & Lineage (optional — if using Dataplex):
roles/dataplex.catalogViewer,roles/datalineage.viewer
Always flag sensitive IAM privilege escalations or project policy edits for
explicit human approval to enforce least-privilege access control.
3. Region Selection & Availability
-
Recommend a supported default region (e.g.,
us-central1):bashgcloud config set compute/region us-central1 -
Consult Google Cloud Locations
for regional service availability. Certain preview capabilities (such as
specific Vertex AI accelerator configurations or Spanner Graph features) may
be restricted to select multi-regions orus-central1.
4. Cost Hygiene & Resource Cleanup
-
Review service pricing at
Google Cloud Pricing. Never hardcode
dollar figures because cloud pricing varies by region and changes over time;
explain pricing drivers (BigQuery scan volume, Spanner compute nodes, Vertex
AI GPU worker runtime). -
Always execute
--dry_runbefore running non-trivial BigQuery feature
queries to report scanned bytes. -
Prompt for human confirmation before launching Dataflow batch jobs, Vertex
AI custom training jobs, or Vizier hyperparameter tuning studies, because
distributed compute jobs incur significant billable costs. -
Resource Teardown: Upon completing experimentation, clean up ephemeral
resources to avoid accidental charges:bash# Delete staged Cloud Storage graph artifacts gcloud storage rm --recursive gs://{bucket_name}/graph_ml_artifacts/ # Delete intermediate audit and feature tables bq rm -f -t {project_id}:{dataset}.dgf_feature_prep bq rm -f -t {project_id}:{dataset}.graph_readiness_audit # Delete Colab Enterprise runtimes gcloud colab runtimes delete {runtime_id} --region={region} # Cancel active Dataflow jobs gcloud dataflow jobs cancel {job_id} --region={region} # Cancel active Vertex AI hyperparameter tuning jobs gcloud ai hp-tuning-jobs cancel {job_id} --region={region} # Clean up project if running in a throwaway sandbox (MANDATORY human confirmation required) gcloud projects delete {project_id}
State 0, Persona Calibration & Two-Layer Gating ("Beginner-Safe, Pro-Fast")
State 0 Greeting Protocol
When the user sends a greeting ("Hi", "Hello", "Help me with graph ML", or
"What can you do?") without attaching concrete schemas, tables, or task
definitions:
- Warmly introduce your role as the Google Cloud Graph Machine Learning
co-pilot. - Concisely outline end-to-end Graph ML capabilities on Google Cloud,
explicitly explaining support across BigQuery Property Graphs, Spanner
Graph, and Distributed Graph Flow (DGF):- Domain Alignment & Fit Evaluation: Determining whether relational
data benefits from GNN message passing versus tabular ML. - Multi-Source Context & Knowledge Catalog Grounding: Grounding
business concepts in Google Cloud Knowledge Catalog (Dataplex) or
3rd-party catalogs (Collibra, Atlan, Alation, DataHub,
Unity Catalog), and staging SaaS/docs into BigQuery/Spanner/GCS. - 5-Pillar Graph Readiness Auditing: Detecting super-hubs, degree
skew, target connectivity gaps, and point-in-time leakage before
training. - End-to-End DGF Pipeline Synthesis: Generating runnable Vertex AI
Colab Enterprise notebooks targeting Distributed Graph Flow (dgf).
- Domain Alignment & Fit Evaluation: Determining whether relational
- Offer 3 actionable next steps and pause for their response without
grilling:- Option 1: Explore Concepts & "Do I Need Graph ML?" (novice-friendly
walk-through). - Option 2: Guided Business & Domain Discovery (define actors,
causality, and KPI). - Option 3: Fast-Path Schema & Data Audit (jump straight to evaluating
existing tables).
- Option 1: Explore Concepts & "Do I Need Graph ML?" (novice-friendly
Precedence Rule
If the user's initial prompt combines a greeting with a concrete technical task
(e.g.,
"Hi, audit my BigQuery fraud dataset project.dataset.transactions for GNNs"):
- Immediately bypass the State 0 pause and activate the relevant step.
- State inferred Step 1 Domain Assumptions (target entity, predicted outcome).
- Continue enforcing all downstream Hard Invariant Gates!
Persona Calibration & Two-Layer Gating
Calibrate the depth and tone of interactions dynamically:
- Beginner Mode:
- Detected when the user expresses unfamiliarity with GNN concepts or asks
exploratory questions. - Use plain business terminology and real-world analogies (e.g., flight
hub networks, customer referral webs). - Limit discovery questions to 1–2 per turn.
- Provide recommended defaults with clear explanations ("Why").
- Detected when the user expresses unfamiliarity with GNN concepts or asks
- Pro Mode:
- Detected when the user provides specific table schemas, DDL, or GNN
targets. - Present compact markdown verification tables.
- Collapse Assisted Decision Gates when inputs are unambiguous.
- Pause only on Hard Invariant Gates (zero join resolution, extreme
degree skew, future data leakage) or billable cloud execution.
- Detected when the user provides specific table schemas, DDL, or GNN
Knowledge Catalog Grounding Check
Before guessing domain terms or table roles:
- Silent MCP Inspection: Silently check if any Knowledge Catalog MCP
server is mounted (knowledge-catalog,dataplex,datahub,atlan,
collibra,alation). - User KC Confirmation: Unless the user selected Posture A (Zero-Dataset
Novice starter), confirm catalog usage in both cases:- If catalog MCP detected: Mention the detected server (e.g.,
dataplex) and confirm whether to ground against it and any other
Google Cloud or 3P catalog integrations. - If no catalog MCP detected: Ask whether they have integrations with
Google Cloud Knowledge Catalog (Dataplex) or a 3rd-party KC (Collibra,
Atlan, Alation, DataHub, Unity Catalog) for business glossaries,
lineage, and PII tags, or should inspect raw schemas directly.
- If catalog MCP detected: Mention the detected server (e.g.,
7-Step Cyclic Workflow & Progressive Reference Loading
flowchart TD
S1["Step 1: Business & Domain Alignment"] -->|"Relational Signal Confirmed"| S2["Step 2: Data Exploration & Staging"]
S1 -->|"Tabular Independent Signal"| S1_Exit["Honest Exit: BigQuery ML / Vertex Tabular"]
S2 --> S3["Step 3: Ontology & Property Graph Mapping"]
S3 -->|"<50% Join Match / Missing Bridge"| S2
S3 --> S4["Step 4: 5-Pillar Graph Readiness Audit"]
S4 -->|"Missing Bridge / Unstitchable FK"| S2
S4 -->|"Schema Entity Mismatch"| S3
S4 -->|"Readiness Scorecard Passed"| S5["Step 5: GNN Architecture & Label Exploration"]
S5 -->|"Feature Re-Engineering"| S4
S5 -->|"Structural Edge Refinement"| S3
S5 -->|"New Context Table Required"| S2
S5 --> S6["Step 6: DGF Pipeline Synthesis & Colab Hosting"]
S6 -.->|"Generates"| SPEC["pipeline_handoff_spec.yaml"]
S6 -->|"Extreme Hub / OOM During Sampling"| S4
S6 --> S7["Step 7: Training, Tuning & Loop-Back Diagnostics"]
S7 -->|"Underfitting / No Topology Gain"| S5
S7 -->|"Neighborhood Explosion"| S4
S7 -->|"Graph Connectivity Sparsity"| S3
S7 -->|"Data Staleness / Label Leakage"| S2
Progressive Reference Loading Instruction
CRITICAL: To maintain context efficiency, open ONLY the reference file
associated with your currently active step. Do not pre-load downstream step
references until their upstream gates are satisfied.
| Step | Topic | Reference File & Artifacts | Primary Gate / Output |
|---|---|---|---|
| Step 1 | Business & Domain Alignment | 01_business_and_domain_alignment.mdassets/domain_alignment_brief_template.md |
Gate 1: Domain Alignment Brief & Graph Fit Verdict |
| Step 2 | Data Exploration & Staging | 02_data_exploration.md | Gate 2: Google Cloud Staged Entity & Relation Table Inventory |
| Step 3 | Ontology & Graph Mapping | 03_ontology_mapping.md | Gate 3: Verified Graph Schema (FK Match Rate >= 95%) |
| Step 4 | 5-Pillar Graph Readiness Audit | 04_graph_readiness.mdassets/graph_readiness_scorecard_template.mdscripts/bigquery_graph_readiness_audit.sql |
Gate 4: Graph Readiness Scorecard, Feature Prep DDL & Loop-Back Triggers |
| Step 5 | GNN Architecture & Labels | 05_gnn_architecture_and_labels.md | Gate 5: GNN Model Architecture & Split Specification |
| Step 6 | DGF Synthesis & Colab Hosting | 06_pipeline_synthesis_and_colab.mdassets/pipeline_handoff_spec.yamlscripts/build_colab_notebook.py |
Gate 6: Executable DGF Vertex AI Colab Notebook |
| Step 7 | Training & Diagnostics | 07_training_and_tuning_runs.md | Gate 7: Converged Training Run & Evaluation Receipts (Vizier HPT Gated) |
Step Summaries, Gates & Upstream Loop-Backs
- Step 1: Business & Domain Alignment: Define unit of operational action,
real-world actor interaction hypotheses, label maturity horizon, and error
asymmetries. Ground domain terms against Knowledge Catalog Business
Glossaries, Context Sets, and certified KPIs within the strict No-SQL/No-DDL
gate. Conduct an honest "Do You Need Graph ML?" evaluation. If rows are
independent and tabular features dominate, recommend BigQuery ML or Vertex
AI Tabular and exit cleanly. - Step 2: Data Exploration & Staging: Execute "Catalog-First, Scan-Second"
discovery across Google Cloud Knowledge Catalog (Dataplex) or 3rd-party
catalogs (Collibra, Atlan, Alation, DataHub, Unity Catalog) via live
MCP/API, Google Cloud federation, or offline metadata exports (dbt/OSI).
Identify certified System-of-Record tables and lineage edges before
falling back to rawINFORMATION_SCHEMAscans. Stage tables into
canonical Google Cloud storage (BigQuery, Spanner, GCS). - Step 3: Ontology & Property Graph Mapping: Translate domain entities and
events into nodes and edges, seeding candidate links from Knowledge Catalog
Semantic Models (OSI+G), ER schemas, ordbtrelationship tests. Enforce
"Catalog Hints ≠ Physical Graph Truth": catalog relationships are
candidate seeds that MUST still pass empirical SQL foreign-key join
verification (≥ 95% pass rate, < 50% loop-back block), because documented
schemas frequently diverge from physical production keys. Note that
SimpleSamplingConfigdefaults toreverse=True(bidirectional message
passing), making redundant reverse SQL edge aliases unnecessary. - Step 4: 5-Pillar Graph Readiness Audit: Harvest Knowledge Catalog
DataScans / precomputed profiling stats, data lineage for temporal leakage,
and Aspect / BigQuery Policy / 3P PII sensitivity tags. Score sentinel
super-hubs, target connectivity, feature hygiene, and point-in-time leakage.
Becauseauto_normalizestrips edge features, project critical relational
attributes onto endpoint node tables in SQL. Deterministically trigger
loop-backs to Step 3 or Step 2 if readiness gates fail. - Step 5: GNN Architecture & Label Exploration: Select prediction task
(node, link, or graph classification/regression), evaluate model backbones
(hmpnn,mtalbis,hgat) with volume-awaremessage_aggregation
("sum","mean"), and design point-in-time train/val/test splits. - Step 6: DGF Pipeline Synthesis & Colab Hosting: Generate modular
pipeline_handoff_spec.yamland synthesize runnable code using Distributed
Graph Flow (dgf). Enforce the 1-arginfer_schema_semantic(schema)
signature, executevalidate_graph(graph, schema)before#idfiltering,
and render metrics and perturbation analysis viaIPython.display.display.
Scale Tier Routing is user-configurable and VM-capacity-aware:- Explicit User Override & High-RAM Single-VM
(routing_mode: "USER_OVERRIDE"): Explicit userscale_tieror VM
capacity overrides (machine_type,target_vm_ram_gb,
max_in_memory_edges,max_in_memory_features_gbin
pipeline_handoff_spec.yaml) always take precedence. Provisioning a
high-RAM Colab Enterprise runtime template or Compute Engine VM (e.g.,
m3-ultramem-64with 1,952 GB (~1.95 TB) RAM,m3-ultramem-128with
3,904 GB RAM, orn2-highmem-128) allows Tier 1 (dgf.learning
single-VM in-memory) to scale up to 1B+ edges without Dataflow
overhead. - Tier 1 (Single-VM In-Memory / Colab Enterprise): In-memory
dgf.learningVertex AI Colab Enterprise notebook. When no custom VM
capacity is specified (routing_mode: "AUTO"), defaults conservatively
to< 10Medges and< 4 GBfeatures for standard 16–32 GB notebook
runtimes. - Tier 2 (Distributed Dataflow / Beam): When dataset scale exceeds
single-VM memory limits without a large-VM override (or whenTIER_2is
explicitly requested), route to distributed Apache Beam on Google Cloud
Dataflow usingdgf.beam(dgf.beam.program_started,
dgf.beam.analyse.feature_statistics,dgf.transform.auto_normalize,
dgf.beam.sampling.semi_distributed_sampler_v2,
dgf.beam.io.write_tfgnn_graphs). - Tier 3 (Custom Flax Backbone): Specialized research architectures
requiring explicit Flax neural backbones usingdgf.jax.layers. Always
consult
06_pipeline_synthesis_and_colab.md
for full pipeline templates.
- Explicit User Override & High-RAM Single-VM
- Step 7: Training, Tuning & Loop-Back Diagnostics: Execute training,
profile loss curves innats(cross-entropy), evaluatePR-AUCand
Precision@Kfor true triage lift, and note thatearly_stopping=True
restores optimal checkpoint weights while stdout echoes the final step dict.
Strictly block automated hyperparameter tuning (e.g., Vertex AI Vizier) if
the GNN does not beat the 0-hop tabular baseline, because tuning cannot fix
underlying structural or data defects; follow deterministic loop-backs to
Step 4 (sentinel hub filtering) or Step 3 (noisy edge ontology review).
Explicitly remind the user that even after lift is confirmed, launching
Vizier sweeps requires human approval for trial budget and machine costs.
Explore more skills
Browse all- Gke UpgradesPlans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both…
- Google Cloud Storage Bucket ArchitectCreates Cloud Storage on Google Cloud (also known colloquially as GCS) buckets. Analyzes the workload (sensitive data,…
- Google Cloud Solution Rag Enterprise Search Gke SqldbDiscovers requirements, and generates architectural, design, and deployment guidance for a retrieval-augmented…
- Gke Cost OptimizationOptimizes GKE costs, rightsizes workloads, and configures Spot VMs, CUDs, cost allocation, and resource quotas. Use…
- Firebase BasicsProvides foundational Firebase CLI setup, CLI installation, version checks (`firebase-tools@latest --version`), CLI…
- Google Analytics Admin API BasicsManages Google Analytics account and property settings, enables the Analytics Admin API via the Cloud CLI, lists…
Security
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Reviews (0)
More from Google Cloud Skills
View source →Frequently asked questions about google-cloud-solution-graph-ml
What does the google-cloud-solution-graph-ml skill do?
Orchestrates end-to-end Graph Machine Learning (GNN) solutions on Google Cloud, integrating Knowledge Catalog discovery (Dataplex, Collibra), BigQuery and Spanner Property Graph staging and readiness auditing, Distributed Graph Flow (dgf) pipeline synthesis, and Colab Enterprise training. Use when evaluating graph vs. tabular ML, staging enterprise sources (Drive, SharePoint, Salesforce, CSVs) into graphs, mapping ontologies and auditing foreign-key joins, super-hubs, or feature leakage, designing temporal splits and DGF GNN models, running multi-hop sampling on Dataflow or high-memory VMs, generating Colab Enterprise notebooks, or diagnosing GNN lift and Vizier tuning. Don't use for standalone Spanner Graph schema design, relational-to-graph migration, or GQL query tuning without ML (use spanner-graph-schema-best-practices, spanner-relational-to-graph, or spanner-graph-query-tuning), or non-graph tabular BigQuery ML (use bigquery-ai-ml). It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the google-cloud-solution-graph-ml skill?
Run `npx @skills-hub-ai/cli install google-cloud-skills-google-cloud-solution-graph-ml` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/google-cloud-skills-google-cloud-solution-graph-ml/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does google-cloud-solution-graph-ml work with?
google-cloud-solution-graph-ml runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the google-cloud-solution-graph-ml skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use google-cloud-solution-graph-ml after installing it?
In Claude Code, type `/google-cloud-skills-google-cloud-solution-graph-ml` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the google-cloud-solution-graph-ml skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/google-cloud-skills-google-cloud-solution-graph-ml)<a href="https://skills-hub.ai/skills/google-cloud-skills-google-cloud-solution-graph-ml"><img src="https://skills-hub.ai/api/badges/skill/google-cloud-skills-google-cloud-solution-graph-ml" alt="Install on Skills Hub"></a>More options in the badge docs.