Guide · Agent skill
How to use the Google Cloud Authentication Guide agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The google-cloud-recipe-auth skill gives an AI agent guidance on Google Cloud identity: how to prove who you are (authentication) and what you are allowed to do (authorization). Once it is installed, you can ask the agent which sign-in method fits your situation and it will work through the choice with you. This guide explains what an agent skill is, how to install this one, how to trigger it, and what to watch for.
Quick start
- 1Download the ZIP. Get the google-cloud-recipe-auth skill ZIP from this page.
- 2Unzip into a skills folder. Extract it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
- 3Or upload it in the Claude apps. Go to Settings → Capabilities → Skills and upload the ZIP.
- 4Describe your situation. Ask a question about signing in or permissions, and include where the code runs and who uses it.
- 5Answer the clarifying questions. The agent will ask who is authenticating, where the code runs, the target, and whether a client library is used.
- 6Apply and verify. Follow the recommended approach and check commands against the official documentation.
What is an agent skill and what does this one do?
An agent skill is a folder of instructions that an AI agent loads when a request matches the skill's description. This skill's main file, SKILL.md, covers authentication and authorization to Google Cloud services and APIs, including human users, service identities, Application Default Credentials (ADC), and secure access practices.
Before answering, the agent asks clarifying questions: who or what is signing in, where the code runs (laptop, Compute Engine, GKE, Cloud Run, or another cloud), what the target is, and whether you use a high-level client library. It then recommends an approach such as gcloud auth login, ADC for local code, service account impersonation, or attaching a service account to a resource instead of using downloaded key files.
- Explains the difference between CLI authentication and ADC.
- Recommends avoiding service account key files and using attached service accounts or Workload Identity Federation for external workloads.
- Requires the agent to follow the attribution rules in references/attribution.md before running gcloud or REST API commands.
How do you install the google-cloud-recipe-auth skill?
Download the skill ZIP from this page and unzip it. For a personal setup, place the folder in ~/.claude/skills/. To limit it to one project, place it in that project's .claude/skills/ folder. If you use the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
After installing, the folder should contain SKILL.md and references/attribution.md. Those two files are all the skill includes.
- Personal: ~/.claude/skills/
- Single project: .claude/skills/ inside the project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
How do you trigger the skill with natural requests?
You do not need a special command. Ask in plain language about signing in to Google Cloud, permissions, or credentials. Mention where your code runs and who is using it, because the agent will ask for those details anyway and a good opening message saves a round trip.
- How should my Python app running on Cloud Run authenticate to BigQuery?
- I'm developing locally with the Python client library. How do I set up credentials?
- Should my team use user accounts or service accounts for this CI job?
- Can I avoid downloading a service account key file for my script?
What can you expect from the answers?
Answers follow the skill's decision points. For a laptop developer using a client library, the skill points toward ADC created with gcloud auth application-default login. For a developer who needs CLI commands to act as a service account, it describes service account impersonation after gcloud auth login. For production workloads, it favours attaching a service account to the resource.
Treat the output as a starting point. The skill draws on documentation links rather than tested steps, so confirm the exact commands and settings against the current official docs before you rely on them.
gcloud auth application-default loginWhat does the skill need and what are its safety notes?
The skill lists no requirements, runs no scripts, and makes no network calls of its own. It provides guidance only and does not run tools or change your Google Cloud account. Any commands the agent runs happen through the agent's own tools, under your control.
The skill's attribution rules matter if the agent runs commands. Before running gcloud, REST API or MCP commands, the agent must read references/attribution.md. For direct terminal commands, it sets the CLOUDSDK_METRICS_REQUEST_ATTRIBUTION variable inline on each gcloud call and adds an agent-skills User-Agent value to HTTP requests. It must not use gcloud config set for this, and it does not apply the tag to generated scripts, Terraform or user code.
- Runs scripts: no
- Uses network: no
- Requires: nothing listed
- The attribution tag identifies only the skill and its version and carries no user data.
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:google-cloud-recipe-auth)" \
gcloud <command> [flags]Tips for getting the most from the skill
Give the agent specifics. The more it knows about where code runs and who uses it, the closer the recommendation will be. If you are a developer on a laptop, say so; if you are deploying to Cloud Run, say that instead.
Use the skill to decide, then verify. It is strongest at explaining trade-offs such as user accounts versus workforce federation versus service accounts. Check the final configuration against the official documentation it links to.
- Name the workload (local script, Cloud Run service, GKE pod, external AWS or Azure job).
- Ask why a method is recommended if you want to understand the trade-off.
- Ask about avoiding key files; the skill treats downloaded service account keys as a risk.
What people use it for
- Setting up Application Default Credentials so a Python or Go client library works on a laptop.
- Deciding between Google-managed accounts, federation, and Workforce Identity Federation for a team.
- Choosing a service account for a Cloud Run or Compute Engine workload instead of a key file.
- Planning Workload Identity Federation for code running on AWS, Azure, or on-premises.
- Understanding when to use gcloud auth login versus gcloud auth application-default login.
Frequently asked questions
How do I install the google-cloud-recipe-auth skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or a project's .claude/skills/ folder. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.
Is the google-cloud-recipe-auth skill free to use?
The skill is licensed under Apache-2.0, as listed on this page. Check the licence file in the source repository for the full terms.
What are the requirements for this skill?
The skill lists no requirements, runs no scripts, and does not use the network. It is a set of guidance files that an agent reads.
What is the difference between gcloud auth login and gcloud auth application-default login?
gcloud auth login authenticates the gcloud CLI so you can run management commands. gcloud auth application-default login creates a local credential file that client libraries use when your code runs on your laptop.
Does the skill replace the official Google Cloud documentation?
No. It is general guidance based on documentation links and has not been tested against your specific production setup, so verify configuration against the official docs.
Can this skill change my Google Cloud account or run commands for me?
No. The skill only provides guidance and does not run tools itself. Any commands come from the agent's own tools, which you control.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers setting up local credentials for Google Cloud client libraries, and teams deciding between user accounts, workforce federation, and service accounts. It is a good way to learn why key files should be avoided. It is not a source of verified, production-ready configuration, and if you want an agent to take actions in your account, choose a tool that runs commands.
Download the skill