gcp-infrastructure

Inspect GCP Compute instances, GKE clusters, Cloud Functions, and Cloud SQL via Python scripts.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill gcp-infrastructure-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gcp-infrastructure
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/incidentfox/sre-agent/.claude/skills/infrastructure-gcp
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill gcp-infrastructure-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-api-python-client, google-auth, and includes scripts (resource) components.

What problem does it solve? Investigating Google Cloud infrastructure issues requires manually querying multiple GCP APIs across Compute Engine, GKE, Cloud Functions, and Cloud SQL, which slows down incident response and root cause analysis. ## Core Features & Use Cases - Compute Engine Inspection: List VM instances across all zones or a specific zone, including status, machine type, and internal/external IPs. - GKE and Serverless Discovery: Enumerate GKE clusters with versions and node counts, plus Cloud Functions with runtimes and triggers. - Database and Project Metadata: List Cloud SQL instances with tiers and IP addresses, and retrieve project-level metadata for context. - Use Case: During an incident, run the GKE cluster listing to identify an unhealthy cluster, then hand off to a Kubernetes skill for pod-level debugging. ## Quick Start List all GKE clusters and Compute Engine instances in my GCP project to check their current status.

Frequently Asked Questions about gcp-infrastructure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list GCP Compute Engine instances with Python?

Use the google-api-python-client compute v1 service to call instances().list() per zone, or iterate all zones from zones().list() when no zone filter is given. The script returns name, status, machine type, and internal and external IPs as JSON.

How to list GKE clusters in a GCP project?

Call the container v1 API with parent set to projects/<project_id>/locations/- to list clusters across all locations. The output includes cluster name, location, status, master and node versions, node count, and endpoint.

What GCP authentication methods does this support?

Authentication supports a service account key passed via the GCP_SERVICE_ACCOUNT_KEY environment variable or application default credentials through google.auth.default(). In the IncidentFox deployment, credentials are injected transparently by a proxy layer.

Why does the GCP script fail with a project ID error?

The scripts raise a RuntimeError when the GCP_PROJECT_ID environment variable is not set, since every API call requires a target project. Set GCP_PROJECT_ID before running any of the listing scripts.

Can I filter Compute instances to a single zone?

Yes, pass the --zone argument such as --zone us-central1-a to list instances only in that zone. Without the flag, the script iterates through all zones in the project, which takes longer but gives complete coverage.