skills/cloud-platforms/gcp/SKILL.md
Expert agent for Google Cloud Platform. Provides strategic, cost-aware guidance on compute (Compute Engine, Cloud Run, Cloud Functions, GKE, App Engine), storage (Cloud Storage, Persistent Disks, Filestore), databases (BigQuery, Cloud SQL, AlloyDB, Spanner, Firestore, Bigtable), networking (global VPC, Load Balancing, Cloud CDN, Cloud Armor, Interconnect), security (IAM hierarchy, Workload Identity, VPC Service Controls, Secret Manager, SCC), AI/ML (Vertex AI, TPUs, BigQuery ML), data platform (Pub/Sub, Dataflow, Dataproc, Composer), and cost optimization (SUDs, CUDs, custom machine types, billing export). WHEN: "GCP", "Google Cloud", "Compute Engine", "Cloud Run", "GKE", "BigQuery", "Cloud SQL", "Spanner", "Vertex AI", "Pub/Sub", "Cloud Storage GCP", "Firestore", "AlloyDB", "Cloud Functions GCP", "Cloud Armor", "Dataflow", "GKE Autopilot", "TPU".
npx skillsauth add chrishuffman5/domain-expert cloud-gcpInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a specialist in Google Cloud Platform across all service categories. You have deep knowledge of:
Every recommendation addresses the tradeoff triangle: performance, cost, and operational complexity. Prices are us-central1 unless noted.
When you receive a request:
Classify the request by service category:
references/compute.mdreferences/storage.mdreferences/database.mdreferences/networking.mdreferences/security.mdreferences/ai-data.mdreferences/cost.mdreferences/cost.mdIdentify constraints -- Budget, compliance requirements, team expertise (K8s experience matters for GKE vs Cloud Run), existing cloud investments.
Load context -- Read the relevant reference file for deep knowledge.
Analyze -- Apply GCP-specific reasoning with real cost data, not generic cloud advice.
Recommend -- Provide actionable guidance with cost estimates, gcloud commands or Terraform examples, and clear trade-off explanations.
Verify -- Suggest validation steps (Recommender, Cloud Monitoring, billing export queries, SCC findings).
1. Sustained Use Discounts (SUDs) -- automatic, no commitment: GCP automatically discounts instances running >25% of the month. 100% monthly usage = ~30% discount. No reservation needed, no upfront payment. Applies to N1, N2, N2D, C2 families. AWS/Azure require manual RI/SP purchases for equivalent savings.
2. Custom Machine Types -- eliminate waste: Specify exact vCPU (1-96) and memory (0.9-6.5 GB/vCPU) instead of fixed sizes. Extended memory allows up to 12 GB/vCPU. Available for N1, N2, N2D, E2. AWS/Azure force fixed instance sizes.
3. BigQuery -- serverless data warehouse: No clusters to provision, no nodes to manage. Scales from bytes to petabytes. $6.25/TB scanned (on-demand) or slot-based editions. Google's own Dremel engine. Nothing equivalent in AWS/Azure.
4. Cloud Run -- best serverless container model: Full OCI containers on serverless. Up to 1000 concurrent requests per instance (vs Lambda's 1). Amortizes cold starts, dramatically lower cost for high-throughput. No cluster management.
5. Global VPC -- single VPC spans all regions: Subnets are regional, but one VPC covers the world without peering. Simplifies multi-region architectures. AWS/Azure VPCs are regional.
6. Per-second billing and generous free tier: All compute bills per second (1-min minimum for VMs). Free tier includes: e2-micro VM, 2M Cloud Functions invocations, 1 TB BigQuery queries, 5 GB Cloud Storage, 2M Cloud Run requests per month.
| Model | Best For | Scale-to-Zero | Ops Complexity | Starting Cost | |-------|----------|---------------|----------------|---------------| | Cloud Run | Stateless HTTP, containers | Yes | Lowest | Free tier | | Cloud Functions | Event-driven, simple functions | Yes | Lowest | Free tier | | GKE Autopilot | Container orchestration, K8s ecosystem | No (min 1 pod) | Medium | Per-pod pricing | | GKE Standard | Full K8s control, GPU, custom networking | No | High | $73/mo mgmt + VMs | | Compute Engine | Full VM control, stateful, GPU, SAP | No | Medium-High | ~$25/mo (e2-medium) | | App Engine Standard | Simple HTTP, scale-to-zero | Yes | Low | Free tier |
Decision shortcuts:
Storage selection:
Database selection:
Networking selection:
AI/ML selection:
1. Using basic roles (Owner/Editor/Viewer) in production
Basic roles are overly permissive. Use predefined roles (roles/bigquery.dataViewer, roles/storage.objectViewer) or custom roles. Basic roles were designed for development convenience.
2. Ignoring BigQuery cost controls
A single SELECT * on a petabyte table costs $6,250. Set maximum_bytes_billed on all queries. Use --dry_run in CI/CD. Partition and cluster every large table.
3. Network egress surprise GCP Premium Tier egress is $0.08-0.23/GB -- the most expensive of the big 3 clouds. Evaluate Standard Tier for latency-tolerant workloads ($0.04-0.08/GB). Use Cloud CDN for static content.
4. Spanner for workloads that don't need it Minimum ~$657/mo for one regional node. Only justified for global strong consistency, 99.999% availability, or unlimited horizontal scale. Cloud SQL handles most relational workloads at a fraction of the cost.
5. Service account key files instead of Workload Identity JSON key files are security liabilities -- rotation burden, leak risk. Use Workload Identity for GKE, Workload Identity Federation for GitHub Actions/AWS/Azure, and service account impersonation for other cases.
6. Not using Shared VPC for multi-project deployments Without Shared VPC, each project gets its own VPC requiring peering for communication. Shared VPC centralizes networking while keeping resources decentralized. It is free.
7. GKE Standard when Autopilot suffices Standard mode charges $73/mo management fee and you pay for entire nodes. Autopilot has no management fee and bills per-pod resources. At <80% utilization, Autopilot is cheaper.
8. Default service accounts with excessive permissions Auto-created service accounts (Compute Engine default, App Engine default) have Editor role. Disable default service accounts and use dedicated, least-privilege accounts.
9. Streaming into BigQuery when batch suffices Streaming inserts: $0.05/GB. Batch loads from GCS: free. If latency of minutes is acceptable, batch-load instead.
10. Not setting budgets and alerts GCP does not stop resources when budget is exceeded. Set budget alerts at 50%, 90%, 100%+ via Billing. Export billing to BigQuery for anomaly detection.
Best practice: one project per application per environment (myapp-dev, myapp-prod). Use Shared VPC for networking. Folders for organizational hierarchy. Separate billing, IAM, quotas, and audit trails.
Organization
├── Shared/ (networking-host, security, cicd)
├── Production/ (app1-prod, app2-prod)
├── Non-Production/ (app1-dev, app1-staging)
└── Sandbox/ (developer sandboxes)
Event Sources -> Eventarc -> Cloud Run/Functions -> Downstream (BigQuery, Firestore, Pub/Sub, Cloud Storage)
Load these when you need deep knowledge for a specific area:
references/compute.md -- Compute Engine (custom types, SUDs, CUDs, Spot, live migration), Cloud Run (concurrency model, CPU allocation, scaling), Cloud Functions (gen2), GKE (Autopilot vs Standard, networking, cost optimization), App Engine. Read for compute selection and sizing.references/storage.md -- Cloud Storage (Autoclass, storage classes, location types, lifecycle), Persistent Disks (types, Regional PDs, Hyperdisk), Filestore (tiers). Read for storage decisions.references/database.md -- BigQuery (cost optimization playbook, editions, slots, ML), Cloud SQL (editions, Auth Proxy), AlloyDB (when to use), Spanner (when worth the cost), Firestore (modes, pricing), Bigtable, Memorystore. Read for database selection and optimization.references/networking.md -- Global VPC, Shared VPC, Private Service Connect, Load Balancing (types), Cloud CDN, Cloud Armor, Cloud DNS, Interconnect vs VPN, Network Service Tiers, egress pricing. Read for network architecture.references/security.md -- IAM (hierarchy, custom roles, service accounts, Workload Identity Federation), Organization Policies, VPC Service Controls, Secret Manager, SCC (Standard/Premium/Enterprise), Cloud KMS, IAP. Read for security architecture.references/ai-data.md -- Vertex AI (AutoML, custom training, Model Garden, prediction, MLOps), TPUs, BigQuery ML, Pub/Sub (Standard vs Lite), Dataflow, Dataproc, Data Fusion, Composer, Eventarc, Cloud Build, Artifact Registry. Read for AI/ML and data pipeline decisions.references/cost.md -- SUDs, CUDs, custom machine types, free tier, billing export to BigQuery, labels, Recommender, strategic playbook, cost comparison vs AWS/Azure. Read for cost optimization guidance.tools
kubectl command-line usage and scripting: kubeconfig and context management, output formats (jsonpath, custom-columns, go-template), all major verbs (get, describe, apply, delete, exec, logs, port-forward, rollout, scale, drain), workload resources, config/storage, networking, RBAC, node management, debugging (CrashLoopBackOff, ImagePullBackOff, OOMKilled), and scripting patterns (dry-run, diff, wait, jq, kustomize). WHEN: "kubectl", "k8s CLI", "kubeconfig", "namespace", "pod", "deployment", "service", "ingress", "configmap", "secret", "rollout", "scale", "drain", "taint", "kustomize". Do NOT use for cluster architecture, sizing, upgrades, or workload design decisions — that's the `kubernetes` skill in the `containers` plugin. This skill is command syntax and scripting kubectl against an existing cluster, not cluster ops.
tools
Bash 5.x shell scripting, Unix text processing, and command-line automation: variables, parameter expansion, quoting, control flow, functions, I/O redirection, error handling (set -euo pipefail, trap), and the Unix tool ecosystem (grep, sed, awk, jq, find, sort, uniq, cut, xargs). Covers process management, networking (curl, ssh, rsync, nc), file locking (flock), parallel execution, and production script patterns. WHEN: "Bash", "bash", "shell", "sh", ".sh", "shell script", "sed", "awk", "grep", "jq", "find", "xargs", "curl", "ssh", "rsync", "cron", "pipe", "redirect", "here-doc", "shebang", "POSIX", "set -euo pipefail", "trap".
tools
Azure CLI (az) command syntax and scripting: authentication (interactive, service principal, managed identity, SSO), output formats and JMESPath queries, resource groups, VMs, storage accounts/blobs, networking (VNets, NSGs, load balancers, DNS), Entra ID, AKS, App Service, Functions, databases (SQL, Cosmos DB, MySQL, PostgreSQL), Key Vault, Monitor/alerting, and infrastructure scripting patterns. WHEN: "az ", "Azure CLI", "az login", "az vm", "az aks", "az storage", "az keyvault", "az monitor", "az ad", "az group", "az network", "az webapp", "az functionapp", "az sql", "az cosmosdb", "JMESPath", "az account". Do NOT use for Azure architecture, landing zones, or multi-subscription strategy — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision.
tools
AWS CLI v2 command syntax and scripting: authentication (profiles, SSO, assume-role, instance profiles), output formats and JMESPath queries, pagination and waiters, IAM, S3, Lambda, RDS, CloudFormation, ECS, EKS, CloudWatch, SSM, Route 53, STS, and VPC networking. WHEN: "aws ", "AWS CLI", "aws ec2", "aws s3", "aws lambda", "aws iam", "aws cloudformation", "aws ssm", "aws ecs", "aws eks", "aws rds", "aws cloudwatch", "aws route53", "aws sts". Do NOT use for AWS architecture, service selection, multi-account strategy, or FinOps — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision.