GCP Specialist
Structured investigation for Google Cloud workloads. Five phases: gather context,
diagnose, design, recommend, verify.
Arguments
$0 — project context, service scope, or problem description. Required.
Phase 1: Context Gathering
- Identify the organization, folders, project(s), and services in scope.
- Glob for IaC in the working directory:
**/*.tf, **/*.yaml (Config Connector), **/*.jinja (Deployment Manager legacy).
- If gcloud CLI access is available:
gcloud config list
gcloud projects list
gcloud auth list
- List enabled APIs in the current project:
gcloud services list --enabled --format="value(config.name)"
Phase 2: Diagnosis
Compute / containers:
gcloud compute instances list
gcloud container clusters list
gcloud run services list
IAM / identity:
gcloud projects get-iam-policy <project>
gcloud iam service-accounts list
gcloud iam workload-identity-pools list --location=global
Networking:
gcloud compute networks list
gcloud compute firewall-rules list
gcloud compute routers list
Serverless / events:
gcloud functions list
gcloud pubsub topics list
gcloud pubsub subscriptions list
Cost / quotas:
gcloud compute project-info describe --format="yaml(quotas)"
gcloud logging read 'resource.type="gce_instance"' --limit=20 --format=json
Phase 3: Design / Root-Cause Analysis
Map symptoms to causes:
| Symptom |
Common Causes |
Check |
| GKE pod AuthN fails |
Workload Identity not bound, KSA/GSA annotation mismatch |
kubectl describe sa + gcloud iam service-accounts get-iam-policy |
| Cloud Run cold starts |
min-instances=0, cold container image |
gcloud run services describe → min-instances, image size |
| GCS AccessDenied |
Uniform vs fine-grained mismatch, missing roles/storage.objectViewer |
gsutil iam get + project-level IAM |
| Pub/Sub messages stuck |
Subscription ack deadline too short, consumer crashed |
gcloud pubsub subscriptions describe + dead-letter config |
| BigQuery slow query |
Missing clustering/partitioning, full table scan |
Query plan review, DRY_RUN pricing |
| VPC connectivity fail |
Firewall default-deny, missing Private Google Access |
gcloud compute firewall-rules list + subnet Private Google Access flag |
Cite resource self-link or file:line for every finding.
Phase 4: Recommendations
Output findings in priority order:
[CRITICAL] <title>
Resource: <self-link or file:line>
Issue: <one sentence>
Evidence: <gcloud output or code snippet>
Fix: <specific change, with Terraform/Config Connector diff>
Trade-off: <alternative and its downside, if meaningful>
- Order: CRITICAL → WARNING → INFO.
- For IaC fixes, show the exact Terraform or Config Connector diff.
- Reference relevant docs in
references/ where applicable.
Phase 5: Verification
After fixes are applied:
- Re-run the diagnostic command that surfaced the issue.
- For Workload Identity changes:
gcloud iam service-accounts get-iam-policy and live pod token request.
- For firewall changes:
gcloud compute firewall-rules list + connectivity probe.
- For IAM changes:
gcloud projects get-iam-policy --flatten="bindings[].members" to see effective membership.
- Check Cloud Monitoring dashboards and Error Reporting — no new incidents should be open.
Reference Docs
Consult references/ for decision guides:
| File |
When to use |
compute.md |
GKE, Cloud Run, GCE selection and sizing |
serverless.md |
Cloud Functions, Pub/Sub, Cloud Tasks, Eventarc |
storage.md |
GCS, Filestore, BigQuery, Cloud SQL, Spanner |
networking.md |
VPC, Cloud Load Balancing, Cloud Armor, Cloud CDN |
iam.md |
IAM hierarchy, Workload Identity, Service Accounts |
observability.md |
Cloud Monitoring, Logging, Trace, Error Reporting |
iac-patterns.md |
Terraform, Config Connector, Deployment Manager patterns |
1---2# dotbabel:generated projection=sha256:92757ba2c3fda417db156e7df9ce935f1f129006b392c88eb32046dd364a66f7 source=skills/gcp-specialist/SKILL.md — do not edit directly3allowed-tools: Read Grep Glob Bash4argument-hint: <project context, service, or problem description>5description: |6 Deep-dive Google Cloud architecture review, debugging, and service design. Use for structured investigations of GCP-specific issues, IAM or cost audits, and multi-service design reviews. Triggers on: "GCP audit", "GCP design review", "Workload Identity debug", "IAM review GCP", "review my GKE", "GCP troubleshooting", "Cloud Run deep-dive".7name: gcp-specialist-38metadata:9 source: https://skillmd.com/skills/kaiohenricunha/gcp-specialist-310---1112# GCP Specialist1314Structured investigation for Google Cloud workloads. Five phases: gather context,15diagnose, design, recommend, verify.1617## Arguments1819- `$0` — project context, service scope, or problem description. Required.2021---2223## Phase 1: Context Gathering24251. Identify the organization, folders, project(s), and services in scope.262. Glob for IaC in the working directory: `**/*.tf`, `**/*.yaml` (Config Connector), `**/*.jinja` (Deployment Manager legacy).273. If gcloud CLI access is available:28 ```bash29 gcloud config list30 gcloud projects list31 gcloud auth list32 ```334. List enabled APIs in the current project:34 ```bash35 gcloud services list --enabled --format="value(config.name)"36 ```3738---3940## Phase 2: Diagnosis4142**Compute / containers:**4344```bash45gcloud compute instances list46gcloud container clusters list47gcloud run services list48```4950**IAM / identity:**5152```bash53gcloud projects get-iam-policy <project>54gcloud iam service-accounts list55gcloud iam workload-identity-pools list --location=global56```5758**Networking:**5960```bash61gcloud compute networks list62gcloud compute firewall-rules list63gcloud compute routers list64```6566**Serverless / events:**6768```bash69gcloud functions list70gcloud pubsub topics list71gcloud pubsub subscriptions list72```7374**Cost / quotas:**7576```bash77gcloud compute project-info describe --format="yaml(quotas)"78gcloud logging read 'resource.type="gce_instance"' --limit=20 --format=json79```8081---8283## Phase 3: Design / Root-Cause Analysis8485Map symptoms to causes:8687| Symptom | Common Causes | Check |88| ---------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ |89| GKE pod AuthN fails | Workload Identity not bound, KSA/GSA annotation mismatch | `kubectl describe sa` + `gcloud iam service-accounts get-iam-policy` |90| Cloud Run cold starts | min-instances=0, cold container image | `gcloud run services describe` → min-instances, image size |91| GCS AccessDenied | Uniform vs fine-grained mismatch, missing `roles/storage.objectViewer` | `gsutil iam get` + project-level IAM |92| Pub/Sub messages stuck | Subscription ack deadline too short, consumer crashed | `gcloud pubsub subscriptions describe` + dead-letter config |93| BigQuery slow query | Missing clustering/partitioning, full table scan | Query plan review, DRY_RUN pricing |94| VPC connectivity fail | Firewall default-deny, missing Private Google Access | `gcloud compute firewall-rules list` + subnet Private Google Access flag |9596Cite resource self-link or `file:line` for every finding.9798---99100## Phase 4: Recommendations101102Output findings in priority order:103104```105[CRITICAL] <title>106Resource: <self-link or file:line>107Issue: <one sentence>108Evidence: <gcloud output or code snippet>109Fix: <specific change, with Terraform/Config Connector diff>110Trade-off: <alternative and its downside, if meaningful>111```112113- Order: CRITICAL → WARNING → INFO.114- For IaC fixes, show the exact Terraform or Config Connector diff.115- Reference relevant docs in `references/` where applicable.116117---118119## Phase 5: Verification120121After fixes are applied:1221231. Re-run the diagnostic command that surfaced the issue.1242. For Workload Identity changes: `gcloud iam service-accounts get-iam-policy` and live pod token request.1253. For firewall changes: `gcloud compute firewall-rules list` + connectivity probe.1264. For IAM changes: `gcloud projects get-iam-policy --flatten="bindings[].members"` to see effective membership.1275. Check Cloud Monitoring dashboards and Error Reporting — no new incidents should be open.128129---130131## Reference Docs132133Consult `references/` for decision guides:134135| File | When to use |136| ------------------ | -------------------------------------------------------- |137| `compute.md` | GKE, Cloud Run, GCE selection and sizing |138| `serverless.md` | Cloud Functions, Pub/Sub, Cloud Tasks, Eventarc |139| `storage.md` | GCS, Filestore, BigQuery, Cloud SQL, Spanner |140| `networking.md` | VPC, Cloud Load Balancing, Cloud Armor, Cloud CDN |141| `iam.md` | IAM hierarchy, Workload Identity, Service Accounts |142| `observability.md` | Cloud Monitoring, Logging, Trace, Error Reporting |143| `iac-patterns.md` | Terraform, Config Connector, Deployment Manager patterns |