Expert-level Google Cloud CLI (gcloud) skill for managing GCP resources.
This skill provides comprehensive gcloud CLI patterns for:
- Cross-platform installation guides for macOS, Windows, and Linux
- Multi-account management with named configurations
- Authentication patterns including OAuth, service accounts, and Workload Identity Federation
- IAM governance with least-privilege patterns
- Deployment workflows for Cloud Run, Firebase, and containerized applications
- CI/CD integration with GitHub Actions and Cloud Build
- Database management for AlloyDB and Cloud SQL
- VPC networking including subnets, firewall rules, and VPC connectors
- Secret management with Secret Manager integration
- Automation scripts with error handling and idempotent patterns
The recommended way to install this skill across different AI coding agents is using the skilz universal installer.
pip install skilzThis skill supports Agent Skill Standard which means it supports 14 plus coding agents including Claude Code, OpenAI Codex, Cursor and Gemini.
You can use either -g or --git with HTTPS or SSH URLs:
# HTTPS URL
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands
# SSH URL
skilz install --git git@github.com:SpillwaveSolutions/mastering-gcloud-commands.gitInstall to user home (available in all projects):
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commandsInstall to current project only:
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands --projectInstall for OpenCode:
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands --agent opencodeProject-level install:
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands --project --agent opencodeProject-level install for Gemini:
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands --agent geminiInstall for OpenAI Codex:
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands --agent codexProject-level install:
skilz install -g https://github.com/SpillwaveSolutions/mastering-gcloud-commands --project --agent codex# Claude to user home dir ~/.claude/skills
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands
# Claude skill in project folder ./claude/skills
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands --project
# OpenCode install to user home dir ~/.config/opencode/skills
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands --agent opencode
# OpenCode project level
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands --agent opencode --project
# OpenAI Codex install to user home dir ~/.codex/skills
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands --agent codex
# OpenAI Codex project level ./.codex/skills
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands --agent codex --project
# Gemini CLI (project level) -- only works with project level
skilz install SpillwaveSolutions_mastering-gcloud-commands/mastering-gcloud-commands --agent geminiSee this site skill Listing to see how to install this exact skill to 14+ different coding agents.
Skilz supports 14+ coding agents including Windsurf, Qwen Code, Aidr, and more.
For the full list of supported platforms, visit SkillzWave.ai/platforms or see the skilz-cli GitHub repository
Copy this skill to your Claude Code skills directory:
# User-level installation
cp -r mastering-gcloud-commands ~/.claude/skills/
# Or create a symlink
ln -s "$(pwd)" ~/.claude/skills/mastering-gcloud-commandsThe skill activates automatically when you mention gcloud, GCP, Cloud Run, or related terms.
mastering-gcloud-commands/
├── SKILL.md # Main skill file with decision trees and workflows
├── references/ # Detailed documentation (loaded on-demand)
│ ├── installation-macos.md # macOS: Homebrew, Apple Silicon
│ ├── installation-windows.md # Windows: installer, PowerShell, silent
│ ├── installation-linux.md # Linux: apt, dnf, Docker
│ ├── authentication.md # OAuth, service accounts, WIF
│ ├── authentication-reset.md # Credential cleanup procedures
│ ├── multi-account-management.md
│ ├── iam-permissions.md # Roles, custom roles, policies
│ ├── cloud-run-deployment.md # Source, container, traffic splitting
│ ├── cloud-scheduler.md # Scheduled jobs with OIDC
│ ├── cloud-storage.md # Bucket and object operations
│ ├── alloydb-management.md # Cluster and instance management
│ ├── firebase-management.md # Firebase CLI integration
│ ├── cicd-integration.md # GitHub Actions, Cloud Build
│ ├── api-enablement.md # Required APIs by category
│ ├── verification-patterns.md
│ ├── vpc-networking.md # VPCs, subnets, firewall, connectors
│ ├── secret-manager.md # Secrets, versions, IAM bindings
│ ├── troubleshooting.md # Debug mode, common errors
│ └── scripting-patterns.md # Error handling, batch ops, jq parsing
└── scripts/ # Ready-to-use automation scripts
├── deploy-cloud-run.sh # Deployment with common options
├── setup-wif-github.sh # Workload Identity Federation setup
├── verify-gcp-setup.sh # Comprehensive project verification
├── reset-gcloud-auth.sh # Authentication cleanup
├── switch-gcloud-project.sh # Project switching helper
└── setup-gcloud-configs.sh # Multi-config initialization
# Authentication
gcloud auth login # Browser-based user login
gcloud auth list # List authenticated accounts
gcloud auth activate-service-account --key-file=KEY.json
# Configuration Management
gcloud config configurations list # List all configurations
gcloud config configurations create NAME # Create new profile
gcloud config configurations activate NAME # Switch active profile
gcloud config set project PROJECT_ID # Set default project
# Common Operations
gcloud projects list # List accessible projects
gcloud run deploy SERVICE --source . # Deploy to Cloud Run
gcloud storage cp FILE gs://BUCKET/ # Upload to Cloud StorageWhen using Claude Code with this skill:
"Help me set up gcloud on my Mac"
"Configure Workload Identity Federation for GitHub Actions"
"Deploy my app to Cloud Run with traffic splitting"
"Set up a Cloud Scheduler job to trigger my Cloud Run service"
"Create IAM roles for my CI/CD pipeline"
"Switch between my dev and prod GCP projects"
Deploy to Cloud Run with common options:
./scripts/deploy-cloud-run.sh my-api --source . --allow-unauth
./scripts/deploy-cloud-run.sh my-api --image gcr.io/project/image:v1 --env API_KEY=abc
./scripts/deploy-cloud-run.sh my-api --source . --no-traffic --tag canarySet up Workload Identity Federation for GitHub Actions (keyless authentication):
# Preview changes
./scripts/setup-wif-github.sh --dry-run my-project my-org my-repo
# Execute setup
./scripts/setup-wif-github.sh my-project my-org my-repoComprehensive verification of your GCP project:
./scripts/verify-gcp-setup.sh --project-id my-project --verboseClean up authentication when troubleshooting:
./scripts/reset-gcloud-auth.sh # Credentials only
./scripts/reset-gcloud-auth.sh --full-reset # Credentials + configurationsEfficient project switching:
./scripts/switch-gcloud-project.sh switch my-project
./scripts/switch-gcloud-project.sh list
./scripts/switch-gcloud-project.sh status- Homebrew installation for macOS
- Interactive installer for Windows
- Package manager (apt/dnf) for Linux
- Docker-based installation
- Shell integration (bash, zsh, fish, PowerShell)
- Browser-based OAuth login
- Service account key authentication
- Service account impersonation (recommended)
- Workload Identity Federation (keyless CI/CD)
- Application Default Credentials (ADC)
- Named configurations for different projects/environments
- Quick context switching
- Per-command configuration override
- Environment variable configuration
- Cloud Run from source or container
- Traffic splitting and canary deployments
- Cloud Scheduler with OIDC authentication
- Firebase Hosting and Functions
- Artifact Registry integration
- Least-privilege role patterns
- Custom role creation
- Conditional IAM bindings
- Service account best practices
- Audit logging
- GitHub Actions with WIF (keyless)
- GitHub Actions with service account keys
- Cloud Build triggers and configurations
- GitLab CI integration
- Jenkins pipelines
This skill uses a three-level loading system for efficient context usage:
- Metadata (~100 words) - Always loaded, triggers skill activation
- SKILL.md (<5K words) - Quick reference workflows
- References (unlimited) - Detailed docs loaded on-demand
When you ask about a specific topic, Claude loads only the relevant reference file.
- Version: 1.0.0
- Author: Richard Hightower / Spillwave Solutions
- License: MIT
- Fork this repository
- Add or update reference files in
references/ - Update
SKILL.mdnavigation if adding new files - Submit a pull request
mastering-aws-cli- AWS CLI referencemastering-github-cli- GitHub CLI reference
Largest Agentic Marketplace for AI Agent Skills and SpillWave: Leaders in AI Agent Development.