Skip to main content
skill CX Codex

gcp-setup — Claude Code skill: verify and sync GCP credentials

The gcp-setup skill checks and aligns identities across gcloud, Application Default Credentials, and kubectl at the start of your session. Use it to ensure all three systems authenticate as the same user before you begin working with GCP.

Apache-2.0 ★ 151 updated 2026-10-12

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Open on GitHub

What gcp-setup does

The skill runs gcp-whoami.sh to display current identities for gcloud, ADC, and kubectl. If they don't match, it offers to harmonize them by updating gcloud login, refreshing ADC, or reconfiguring kubectl access to your GKE cluster.

After verifying identities, the skill can optionally trigger gcp-architecture-discovery if your infrastructure baseline hasn't been mapped yet. This is especially useful at the start of an investigation or when you're setting up a new project.

If the environment variable SAFE_MODE="enabled" is found, the skill automatically activates safe-sre-investigator to enforce read-only permissions. Be aware this may affect kubectl authorization through RBAC.

What it helps with

  • verify which GCP account you're currently authenticated as
  • align identities across gcloud, ADC, and kubectl
  • ensure all three systems use the same credentials
  • start a GCP working session without authentication mismatches

Example prompts for the agent

  • Run gcp-setup to check which accounts are active
  • Use this skill at the beginning of a session when switching GCP projects
  • Ask to sync credentials across all authentication layers

How to install gcp-setup

1Plugin marketplace

/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre

This installs the whole sre-extension plugin with all its skills

2Skills CLI (Vercel)

npx skills add gemini-cli-extensions/sre --skill gcp-setup -a claude-code

3Manually: put the files in place

~/.claude/skills/gcp-setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gcp-setup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gcp-setup

How do I install gcp-setup in Claude Code?

Run /plugin marketplace add gemini-cli-extensions/sre, then /plugin install sre-extension@sre, followed by npx skills add gemini-cli-extensions/sre --skill gcp-setup -a claude-code. The skill will be available at ~/.claude/skills/gcp-setup/SKILL.md.

What does gcp-setup do?

It checks identities in gcloud, Application Default Credentials, and kubectl. If they differ, it helps you fix the authentication mismatches.

What happens if SAFE_MODE is enabled?

The skill activates read-only mode by launching safe-sre-investigator. This restricts permissions through kubectl RBAC.

Source text

SKILL.md · Apache-2.0
---
name: gcp-setup
description: 🐉 Initial Google Cloud environment verification and authentication setup. Use when starting a new session to ensure correct identities across gcloud, ADC, and kubectl.
metadata:
  author: Google
  version: 0.0.2
---

# GCP Environment Setup

Use this skill to verify and harmonize your GCP identities at the start of an investigation or session.

## Core Workflow

1.  **Identity Verification**: Run the bundled `gcp-whoami.sh` script to check all three major identities (gcloud, ADC, and kubectl).
2.  **Harmonization**: If identities mismatch, offer to fix them.
    *   To fix `gcloud`: `gcloud auth login [ACCOUNT]`
    *   To fix ADC: `gcloud auth application-default login`
    *   To fix GKE/kubectl: `gcloud container clusters get-credentials [CLUSTER] --region [REGION] --project [PROJECT]`
3.  **Next Step: Architecture Discovery(Optional)**: Once identities are verified and correct, check if the `./discover/{gcp-project|azure-subscription}/{PROJECT_ID_OR_NAME}` directory exists. If it is missing or empty, and user asked transition to the `gcp-architecture-discovery` skill and explicitly instruct it to execute a full baseline discovery to sweep and map the entire infrastructure state.

## Bundled Scripts

- `scripts/gcp-whoami.sh`: Displays current identities for gcloud, ADC, and kubectl.

## Safe Mode Support

If `SAFE_MODE="enabled"` is found in the environment or `.env` file, you MUST activate the `safe-sre-investigator` skill immediately after verifying the initial setup. This ensures all subsequent operations use read-only/non-mutating service accounts.

Note that the `SAFE_MODE` might impact kubectl authorization via RBAC. 

© Google · Apache-2.0 · gemini-cli-extensions/sre

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set17

The whole set →
data-ingestion data-ingestion collects time-series points from CSV files or metric backends and converts them into standardized JSON. CX Codex +1 ★ 151repo stars cloud-logging Skill for analyzing Google Cloud Logging and Error Reporting. Processes large JSON logs from GCP and converts them to Apache format for efficient analysis. CX Codex +1 ★ 151repo stars gcp-slo-management gcp-slo-management finds services in Google Cloud Monitoring and creates availability or latency SLOs over the REST API, where gcloud has no command for it. CX Codex +1 ★ 151repo stars gcp-playbooks gcp-playbooks is a Claude Code skill with SRE playbooks for investigating GCP incidents and running mitigations across GKE and Cloud Run. CX Codex +1 ★ 151repo stars pre-publish-checker pre-publish-checker audits project files for profanity, internal links, sensitive paths, and unfinished development markers. Use it when preparing code or an extension for public release. CX Codex +1 ★ 151repo stars safe-sre-investigator safe-sre-investigator creates dedicated read-only service accounts for GCP and Kubernetes, then hands you gcloud and kubectl commands with a risk rating attached. CX Codex +1 ★ 151repo stars cloud-monitoring Interacts with Google Cloud Monitoring through MCP, rendering ASCII sparklines and concise CSV summaries to prevent context bloat. CX Codex +1 ★ 151repo stars postmortem-aggregator postmortem-aggregator turns Post Mortem files in a folder into incident statistics and updates POMO_AGGREGATED.md. Use it to spot recurring causes across incidents. CX Codex +1 ★ 151repo stars

Project sponsors

Companies that keep this analytics open