/wire:google-cloud-recipe-authfrom wire
Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default Credentials (ADC), and best practices for secure access.
Ships in wire. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before proceeding, append a one-line entry to .wire/execution_log.md:
| YYYY-MM-DD HH:MMZ | skill | google-cloud-recipe-auth | Google Cloud authentication or credential setup triggered this skill | <by> | <session> | n/a | n/a | n/a |
If .wire/execution_log.md does not exist, create it with the standard header first (see specs/utils/execution_log.md). If no .wire/ directory exists in the current repo, skip this step.
Authentication is the process of proving who you are. In Google Cloud, you represent a Principal (an identity like a user or a service). This is the first step before Authorization (determining what you can do).
Before providing a specific solution, clarify the following with the user:
For users to access Google Cloud, they need an identity that Google Cloud can recognize.
Google Cloud supports several ways to configure identities for your internal workforce (developers, administrators, employees):
Used for interacting with Google Cloud resources and APIs during development and management.
gcloud auth login): Used to authenticate the CLI itself so you can run
management commands (e.g., gcloud compute instances list). It uses a
Credential (like an OAuth 2.0 refresh token) stored locally.gcloud auth application-default login): This is different from CLI
auth. It creates a local JSON file that Google Cloud Client Libraries
(Python, Java, etc.) use to act as "you" when you run code on your laptop.gcloud auth login) and use Service Account Impersonation to run CLI commands or
generate short-lived credentials. This is a critical best practice for local
development and troubleshooting.Used when a human (who is not a developer) needs to access a web application you've deployed on Google Cloud. Note: These are distinct from workforce identities.
When code runs in production, it should use a Service Account rather than a human user account.
Instead of using Service Account Keys (dangerous JSON files), you should attach a custom service account to the Google Cloud resource. The resource's environment then provides a Token (a short-lived digital object) via a local metadata server.
Use Workload Identity Federation for GKE to map Kubernetes identities to IAM principal identifiers. This grants specific Kubernetes workloads access to specific Google Cloud APIs. Learn more here.
For code running outside Google Cloud (e.g., AWS, Azure, or on-prem), do not use keys. Instead, use Workload Identity Federation to exchange an external token (like an AWS IAM role) for a short-lived Google Cloud access token.
API keys are encrypted strings used for public data (e.g., Google Maps) or simplified access like Vertex AI Express Mode, which allows fast testing of Gemini models without complex setup. Both humans and services (e.g., Cloud Run-based AI agent) can use API keys, for the services that support it.
Note: API keys should be restricted to specific APIs and projects to minimize security risks. Store API keys in a secrets manager like Secret Manager to prevent accidental exposure.
While IAM is the modern way to handle authorization, legacy Compute Engine VMs and GKE node pools still rely on Access Scopes alongside IAM. If a VM's scope is restricted, the attached service account will fail to make API calls even if it has the correct IAM permissions. Check this first if attached service accounts are failing unexpectedly.
The underlying mechanism for impersonation and secure service-to-service communication is the IAM Service Account Credentials API. This API generates short-lived access tokens, OpenID Connect (OIDC) ID tokens, or self-signed JSON Web Tokens (JWTs) dynamically, removing the need for static credentials.
After Authentication, Google Cloud uses Identity and Access Management (IAM) to determine what the authenticated principal can do.
roles/storage.objectViewer or
roles/bigquery.dataEditor. Always try to use these first.gcloud auth application-default login to create local
credentials (ADC).roles/storage.objectViewer role on a
bucket.storage.Client(). It automatically finds your
local credentials via ADC. Note: ADC searches in a specific order—first
checking the GOOGLE_APPLICATION_CREDENTIALS environment variable, then the
local gcloud JSON file, and finally the attached service account metadata
server.roles/cloudsql.client role on
the project.When calling a private Cloud Run service from another service, the caller
generates a Google-signed OpenID Connect (OIDC) ID Token and passes it in
the Authorization: Bearer <TOKEN> header.
gcloud auth application-default login or Service Account Impersonation.Adapted from https://github.com/google/skills (Apache-2.0). Modified by Rittman Analytics Ltd. See NOTICE.md and LICENSE.txt in this folder.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rittmananalytics/wire-plugin --plugin wire74 skills in this plugin
/add-analytics-instrumentationEnd-to-end analytics instrumentation workflow for a PR, branch, file, directory, or feature. Reads the code, discovers what events should be tracked, and produces a concrete instrumentation plan — all in one shot. Use this skill whenever a user wants to add analytics to a PR, asks "instrument this PR", "add tracking to this branch", "what analytics does this file need", "instrument the checkout flow", "run the full instrumentation workflow", or any request that implies going from code changes to a tracking plan. Also trigger when the user gives you a PR link, branch name, file path, or feature description and mentions analytics, events, or instrumentation. This is the main entry point for the analytics workflow — prefer it over calling the individual steps (diff-intake, discover-event-surfaces, instrument-events) separately.
/agents-schemaPublish and read warehouse metadata through dbt Labs' Agents Schema (the AGENTS schema inside Snowflake, Databricks or BigQuery, written by the agents-schema CLI from a dbt manifest, LookML, Omni, OSI, Sigma and markdown skills). Activates when the user mentions Agents Schema, agents_schema, AGENTS.ROOT, the agents-schema CLI or its GitHub workflows, warehouse-delivered skills, or asks how an AI agent should find governed context for a warehouse. Used by /wire:agents_schema-generate, -validate and -review, and for ad-hoc work against an AGENTS schema./airbyteSkill for managing Airbyte connections and data ingestion via the Airbyte Agent MCP server at mcp.airbyte.ai. Activates when the user mentions Airbyte, an Airbyte connection, Airbyte source / destination, or wants to audit / build / migrate an Airbyte deployment. Distinguishes between the hosted Agent MCP (for AI agents using connectors) and managing an existing Airbyte Cloud / OSS workspace./airflowProactive skill for Apache Airflow 2.x and Cloud Composer work in a client's existing Airflow repo. Auto-activates when writing or changing a DAG file, a DAG helper, or the config a DAG reads; when deploying DAG files to a dev environment; when checking whether a DAG parsed or a run succeeded; when tasks are stuck in queued; and when the pipeline or orchestration artifact uses Airflow. Covers the Airflow rule set (lint_conventions.py --domain airflow), safe dev deploy through airflow_deploy.py, sync and parse checks, run and task checks through Cloud Logging, causes of queued tasks and a list of known faults. Every environment value comes from .wire/engagement/airflow_environments.yml./analyze-account-healthSummarizes B2B account health by analyzing usage patterns, engagement trends, risk signals, and expansion opportunities. Use for customer success reviews, renewal preparation, QBRs, or account prioritization./analyze-ai-topicsAnalyzes what users ask AI agents about and how well each topic is served. Only use when the user has Amplitude Agent Analytics instrumented in their project. Use when the user asks "what are people asking the AI", "top AI topics", "where is the AI struggling", "AI coverage gaps", "what should we improve in our AI", or wants product insights from AI conversation patterns.