Skills Prompts Hues

Popular categories

Agent skill · Google Agent Skills

/google-cloud-recipe-auth Choose the right Google Cloud credentials for each situation

This skill is a decision guide for authentication and authorisation on Google Cloud. It has the agent first establish who is calling, where the code runs and what it calls, then steer toward ADC and impersonation for local work, attached service accounts in production, Workload Identity Federation outside Google Cloud, and predefined IAM roles before custom ones.

Works with

  • Any agent supported by the skills CLI
  • Claude Code
  • Codex
  • Antigravity CLI

When to use it

  • Your local code cannot reach a Google Cloud API and you are unsure which login to use.
  • You are deploying to Cloud Run or Compute Engine and want to avoid service account key files.
  • Code running on AWS, Azure or on premises needs to call Google Cloud.

How it works

  1. 1
    Ask the four questions

    The agent clarifies who or what is authenticating, where it runs, what it targets, and whether a client library is in use.

  2. 2
    Separate CLI and ADC

    It explains that gcloud auth login signs in the CLI while application-default login creates the credentials client libraries pick up.

  3. 3
    Prefer keyless identities

    It recommends impersonation for developers and attached custom service accounts for workloads instead of downloaded keys.

  4. 4
    Grant least privilege

    It binds a predefined role on the specific resource and checks legacy access scopes when an attached account still fails.

  5. 5
    Run the checklist

    It reviews local versus production use, default service accounts, cross-cloud callers, OIDC for custom apps and API key restrictions.

What it steers the agent away from

  • Downloading service account JSON keys for local development.
  • Running production workloads on the Compute Engine default service account.
  • Leaving API keys unrestricted or stored in code.

Install this skill

It installs with the Google Agent Skills pack.

Any agent supported by the skills CLIPrompts you to choose skills, target agents and project or global scope; the update command can also remove skills that were dropped.
npx skills add google/skills
npx skills update
Claude Code (plugins)Plugins bundle skills with the matching Google MCP servers.
claude plugin marketplace add google/skills
claude plugin install <plugin>@google-plugins
Codex (plugins)After adding the marketplace, install plugins from the /plugins browser.
codex plugin marketplace add google/skills
Antigravity CLIPoint the command at the path of the plugin you want inside the repository.
agy plugin install https://github.com/google/skills/<plugin-path>

Commands come from the author’s README; check it for changes before you run them.

Questions

How does a private Cloud Run service get called by another service?

The caller obtains a Google-signed OIDC ID token and sends it as a bearer token in the Authorization header.

Where does ADC look for credentials?

It checks the GOOGLE_APPLICATION_CREDENTIALS variable, then the local gcloud credentials file, then the metadata server of an attached service account.

More guides from Google Agent Skills

Also in this pack

All 30 skills →

Summary by trendhub. The skill itself lives in google/skills/plugins/cloud/google-cloud-developer/skills/google-cloud-recipe-auth by Google (Apache-2.0); read the full, current text there.