Guide · Agent skill
How to use the gcloud CLI Guardrails agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The gcloud skill is a set of instructions that an AI agent loads when it is asked to plan, write, or run Google Cloud command-line (gcloud) commands. It makes the agent check the exact help text for each command before using it, keep query output small, and stop for your approval before running denied operations. This guide explains what the skill changes, how to install it, how to trigger it, and where its limits are.
Quick start
- 1Get the ZIP. Download the gcloud skill ZIP from this page.
- 2Install the gcloud CLI. Follow the official Google Cloud CLI installation guide if gcloud is not on your machine, then authenticate.
- 3Unzip the skill. Unzip into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
- 4Or upload in the Claude apps. Go to Settings → Capabilities → Skills and upload the skill.
- 5Make a request. Ask for a gcloud task in plain words and include your --project value.
- 6Review the plan. Check that the agent ran gcloud help on the leaf command and used a dry run where supported.
- 7Approve denied operations. If a command is on the denylist, reply with explicit approval before it runs.
What the gcloud skill makes the agent do
Without the skill, an agent may write gcloud commands from memory, and the source describes that memory as stale and prone to hallucinated flags. With the skill loaded, the agent is told to run gcloud help on the exact leaf command (for example, gcloud help compute instances create) before proposing flags or executing anything. Parent group help, such as gcloud help compute, does not count.
The skill also limits how much data comes back. Any list command must include at least one of --limit, --filter, or --format, and the agent is told to use a single-item list first to learn the JSON key names. Execution rules require one command at a time, no pipes, no command substitution, and no redirection, and the --quiet flag on execution commands so runs do not hang waiting for input.
- Validates each leaf command with gcloud help before use
- Requires --limit, --filter, or --format on every list command
- Runs one command at a time with no pipes, $(...) or redirection
- Asks for explicit user approval before denylisted operations
- Tags terminal commands for usage attribution
Install the gcloud skill
Download the ZIP file from this page. Then choose one of the two locations below. For a personal setup that applies to all your projects, unzip it into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder.
If you use the Claude apps instead, upload the skill under Settings → Capabilities → Skills.
- Personal: unzip into ~/.claude/skills/
- Per project: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills, then upload
Install and authenticate the Google Cloud CLI first
The skill does not install gcloud for you. The source says that if the gcloud binary is missing, you should follow the official Google Cloud CLI installation guide for your platform. The skill's own rules also say the agent must not install gcloud or its components on its own. It has to tell you what it plans to install and ask first.
You also need access to a Google Cloud project where your account has suitable IAM permissions. The skill assumes gcloud is already authenticated.
- Google Cloud SDK (gcloud CLI) installed and authenticated
- Access to a Google Cloud project with appropriate IAM permissions
- Optional: Cloud CLI remote MCP server for the run_gcloud_command tool
Trigger the skill with natural requests
You do not need a special command to use the skill. It is meant to load when you ask the agent to plan, generate, construct, propose, describe, or execute any gcloud command, including questions about gcloud syntax or flag formatting. Mention your project and the task in plain words, and include the --project flag if you want it preserved in the proposed commands.
The skill does not apply to writing Google Cloud client library code or raw REST or gRPC API requests. Ask for those separately.
- "Using project my-project, list the Cloud Run services in us-central1, showing only name and URL."
- "Plan how to delete the temp Pub/Sub topic in project test-project. Check the syntax first."
- "What flags does gcloud compute instances create accept?"
Examples of what a good session looks like
When a plan is requested, the skill's template has four steps: validate syntax with gcloud help on the leaf command, verify parameters and check whether --dry-run or --validate-only is supported, run a dry run if it is supported, then propose the command. If the command is on the Prohibited Operations denylist, the agent must stop and ask you for authorization. Other commands can proceed under the execution constraints.
For terminal commands, the agent prefixes gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION set to agent-skills/1.0 (skill:gcloud), unless a more specific product skill such as cloud-run-basics or bigquery-basics applies.
gcloud pubsub topics delete temp-topic --quiet --project=test-projectSafety notes: scripts and network access
The skill's package runs scripts and uses the network, so review what you install. The skill itself is written as guardrails for the agent, and it relies on the agent following those rules. The source states that it is not hard technical enforcement.
If you use the optional remote MCP server, the run_gcloud_command tool sends commands to https://cloudcli.googleapis.com/mcp. Do not rely on this skill alone when the agent holds production credentials and no human reviews its actions.
- Runs scripts: yes
- Uses network: yes
- Guardrails depend on the agent following instructions, not on technical enforcement
- Keep human review in place for production credentials
Tips for getting the most from the skill
Ask the agent to show its gcloud help lookup before it proposes flags. If a list output is large, ask it to narrow the result with --limit, --filter, or --format. Keep the skill's reference files alongside SKILL.md, since the agent reads them for CLI usage, MCP usage, and attribution details.
- Ask for the help lookup and dry-run step to be shown explicitly
- Start with a single-item list to see the field names
- Confirm every denylisted action before approving it
What people use it for
- Asking an agent to list Cloud Run services with only the name and URL fields
- Planning a deletion of a temporary Pub/Sub topic with a dry run and approval step first
- Checking the correct flags for a compute instance create command before running it
- Running gcloud commands through the Cloud CLI remote MCP server's run_gcloud_command tool
Frequently asked questions
Is the gcloud agent skill free?
The skill is published under the Apache-2.0 licence, as listed on this page. Check the licence file in the download for the terms. You still need your own Google Cloud project and its billing and IAM setup.
What do I need before installing the gcloud skill?
You need the Google Cloud SDK (gcloud CLI) installed and authenticated, plus access to a Google Cloud project with suitable IAM permissions. The remote MCP server is optional and only needed for the run_gcloud_command tool.
Where do I put the gcloud skill files?
Unzip the ZIP into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps, upload it under Settings → Capabilities → Skills.
Does the skill install gcloud for me?
No. The source says to follow the official Google Cloud CLI installation guide. The agent must also ask you before installing gcloud or any gcloud components.
Why does the agent run gcloud help so often?
The skill treats memorised gcloud syntax as unreliable. It requires gcloud help on the exact leaf command before proposing flags or running anything, because parent group help is not enough.
Can the skill replace a review of production changes?
No. The skill depends on the agent following its rules and is not hard technical enforcement. Keep human review for production credentials and for any denylisted operation.
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 and platform or ops engineers who let an AI agent run gcloud commands and want fewer invented flags and fewer accidental destructive changes. It is not the right tool for writing Google Cloud client library code or raw REST and gRPC calls, and it is a weak safeguard if the agent has production credentials with no human review.
Download the skill