Official agent skill

Gcloud

by google in google/skills

Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.

OfficialApache-2.0Auto-check passedBackend & APIs

Install Gcloud

skills CLI
$ npx skills add google/skills --skill gcloud -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills gcloud --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/gcloud .claude/skills/gcloud && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gcloud
GitHub stars
21k
Token cost
~3.4k tokens
SKILL.md length
1,564 words
Files
3 (incl. references)
Skills in repo
147
Repo updated
First seen
Licence
Apache-2.0

At a glance

Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.

  • Works in 4 steps: Explicit Command Validation (Mandatory) → Data Reduction Strategies (Mandatory) → Execution Constraints → …
  • Executing any gcloud CLI commands - including when answering questions about gcloud syntax
  • SKILL.md covers Execution Modes, Core Principles, Safety & Guardrails and Structured Workflows, plus 2 more sections
  • Calls gcloud

What it does

Gcloud is an agent skill from google/skills, published by the product's own GitHub organization. Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure. Use when planning, generating, constructing, proposing, describing, or executing any gcloud CLI commands - including when answering questions about gcloud syntax, or formatting flags. Don't use when writing Google Cloud client library code or raw REST/gRPC API requests.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/cli-usage.md` and `references/mcp-usage.md`).

It sits in Backend & APIs, covering gRPC and Protobuf. It works with Google Cloud and gRPC. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Executing any gcloud CLI commands - including when answering questions about gcloud syntax
  • Formatting flags
  • Writing Google Cloud client library code
  • Raw REST/gRPC API requests

Example prompts

  • “Use the gcloud skill to provide safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform…”
  • “/gcloud”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Explicit Command Validation (Mandatory)
  2. Data Reduction Strategies (Mandatory)
  3. Execution Constraints
  4. Project and Location Scoping (Critical)

What it can do on your machine

Read from SKILL.md and the folder at commit 7d97937. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gcloud loads about 3.4k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 109 tokens; SKILL.md has 1,564 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 7d97937, republished under its Apache-2.0 licence (© google). 1,564 words, ~3,384 tokens.

Download SKILL.mdSave it as .claude/skills/gcloud/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
gcloud
description
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure. Use when planning, generating, constructing, proposing, describing, or executing any gcloud CLI commands - including when answering questions about gcloud syntax, or formatting flags. Don't use when writing Google Cloud client library code or raw REST/gRPC API requests.
metadata.version
1.0.0
metadata.category
CloudInfrastructureAndServices

gcloud CLI Skill for AI Agents

[!CAUTION]

MANDATORY PRE-CONDITION: EXPLICIT LEAF-LEVEL SYNTAX VALIDATION

All pre-existing knowledge of gcloud commands, flags, flag values, and positional argument syntax is stale and prone to hallucination.

NEVER propose command parameters, output flag options, execute commands, OR outline step-by-step plans for any gcloud task before validating leaf-level syntax via gcloud help <command> (or including leaf-level help lookup as a mandatory step in the plan).

Mandatory Action Rules:

  1. Direct Execution & Code Generation: ALWAYS invoke gcloud help <leaf_command> (e.g. gcloud help compute instances create or gcloud help sql instances create) before proposing or executing the final command syntax.

  2. Planning & Strategy Queries: When asked for a plan, strategy, or next steps to achieve a user goal (e.g., "What is your plan to accomplish X..."), the response MUST explicitly include running gcloud help <leaf_command> as Step 1 of the plan before proposing flags or executing commands.

  3. Non-Transitive Validation: Parent command group help (e.g. gcloud help compute) is not sufficient for leaf-level syntax validation. Validation must occur at the specific leaf subcommand level.

  4. FORBIDDEN Web Search Fallback: NEVER use search_web, web search, or external documentation search tools for gcloud CLI syntax. gcloud help <leaf_command> is the EXCLUSIVE authorized authority for command syntax.

  5. User Flag & Project Preservation: When proposing intermediate command steps, ALWAYS preserve all user-specified flags (including --project=<project_id>) in the proposed response text.

  6. Mandatory Plan Template: When generating a plan, the response MUST copy this exact 4-step structure:

    • Step 1: Syntax Validation via gcloud help <leaf_command>
    • Step 2: Parameter Verification (confirming required and optional flags, and explicitly checking if the --dry-run or --validate-only flag is supported)
    • Step 3: Dry-Run Command Proposal (If --dry-run or --validate-only is supported, there MUST be a --dry-run or --validate-only invocation before the next step.)
    • Step 4: Command Proposal & Authorization (If the command is on the "Prohibited Operations" denylist, state that autonomous execution is forbidden, and the user MUST be explicitly asked for authorization to proceed. If the command is NOT on the denylist, propose or proceed with execution, while following ALL "Execution Constraints" below.)

This document provides essential guidelines and best practices for AI agents interacting with the Google Cloud SDK (gcloud CLI). Following these rules is critical to avoid hallucinated commands, flags, flag values, and positional argument syntax, prevent destructive actions, and minimize context window usage.

Execution Modes

AI agents can interact with Google Cloud resources in two primary ways:

  • Direct CLI Execution: Executing gcloud commands directly in a local or automated shell environment. See CLI Usage for installation, authentication flows, and configuration management.
  • Model Context Protocol (MCP): Invoking structured tools via the Cloud CLI remote MCP server (run_gcloud_command). See MCP Usage for tool schemas, parameter rules, and server configuration.

Core Principles

1. Explicit Command Validation (Mandatory)
  • Action: ALWAYS call gcloud help <command> for the exact command that is intended to be run (e.g., gcloud help compute instances create).
  • Verify: Ensure the command, flags, flag values, and positional argument syntax are valid for that specific leaf command before attempting execution or presenting plans. Validation is not transitive from parent groups.
2. Data Reduction Strategies (Mandatory)

Minimize the volume of data returned by gcloud to save context window space and reduce latency. DO NOT execute any list command without including at least one data reduction flag (--limit, --filter, or --format).

  • Projection: Use --format="json(key1, key2, ...)" to select only the specific fields needed for the task. To understand the advanced projection and formatting syntax, refer to gcloud topic projections and gcloud topic formats.

  • Limiting: Use --limit=N to cap the number of resources returned.

  • Filtering: Use --filter to narrow down results server-side. Prioritize : for pattern matching and never quote the right side of the colon. Treat the entire filter flag as a singular string without quoting or escaping characters. To study the filter expression syntax, refer to gcloud topic filters.

  • Schema Discovery: Unconstrained resource lists can quickly exhaust the context window with redundant data. To prevent this, discover a resource's schema before executing queries. If unsure of the JSON key path for projecting fields (--format) or filtering (--filter), run the targeted resource's list command (if supported) with a single-item limit:

    bash
    gcloud <GROUP> <RESOURCE> list --limit=1 --format=json

    Examine this single instance's JSON structure to safely identify the correct schema keys before requesting full or filtered datasets.

3. Execution Constraints
  • Single Commands: Execute a single gcloud command at a time. No command chaining or sequencing.
  • No Shell Operators: Do not use command substitution ($(...)), pipes (|), or redirection (>, >>, <). This is to increase command safety and ensure commands are more easily understandable and reviewable by users.
  • Non-Interactive Execution (--quiet / -q): Pass the --quiet (or -q) global flag on all execution commands (e.g., gcloud pubsub topics delete temp-topic --quiet --project=test-project). AI agents run in headless, non-interactive environments without a TTY or stdin input handler. Without --quiet, commands that prompt for user confirmation (such as deleting resources, approving defaults, or selecting unspecified regions) will pause execution indefinitely waiting for input, causing background task timeouts. Including --quiet forces non-interactive mode, causing gcloud to automatically accept safe default choices or fail immediately with an explicit error if required parameters are missing.
  • No Blind Lists: NEVER execute a list command without --limit, --filter, or --format.
Show full SKILL.md (700 more words)Show less
4. Project and Location Scoping (Critical)

To ensure commands are deterministic, non-interactive, and target the correct environment, they must explicitly provide project and location scoping.

  • Explicit Project Target: Do not rely on active configuration defaults. Always append --project=<PROJECT_ID> to all resource-manipulating and querying commands (unless running pure local config commands). This avoids accidental execution against the wrong project.

  • Prevent Location Prompts: Many Google Cloud resources are regional or zonal. If the location flag is omitted (e.g., --region, --zone, or --location), gcloud will trigger an interactive prompt to select a zone/region. This violates the No Interactivity rule. Always provide explicit location flags if the command requires them.

  • Location Discovery: If the correct region, zone, or location for a service is not known, run discovery commands first (remembering to limit results if there are many):

    • Compute Engine (VMs, Networks):

      • gcloud compute regions list --project=<PROJECT_ID>
      • gcloud compute zones list --project=<PROJECT_ID>
    • Other Services (Standard API Style): Many GCP services utilize a unified locations list command:

      • gcloud <GROUP> locations list --project=<PROJECT_ID>
      • Examples: gcloud artifacts locations list, gcloud kms locations list, gcloud secrets locations list.

Safety & Guardrails

[!CAUTION] Destructive actions (delete, update, remove) MUST be explicitly authorized by the user. Never invoke them autonomously unless explicitly instructed to do so in the context of a safe, pre-approved workflow.

Prohibited Operations (Denylist)

NEVER execute the following commands autonomously. These require explicit human-in-the-loop authorization:

  • Any IAM policy, role, or binding modification (Security): Risk of privilege escalation, administrative lockout, service disruption, or unauthorized data exposure.
  • No Proactive API Enabling: Assume necessary APIs are enabled. To prevent unexpected resource provisioning or billing charges, do not proactively try to enable APIs. User approval is required to enable any API.
  • gcloud * delete (Destructive): Irreversible resource destruction (e.g., project deletion) or data wiping.
  • gcloud billing * (Financial): Risk of service disruption or unbounded costs.
  • gcloud organizations * (Governance): Org-level changes affect security posture for all users.
  • gcloud kms * (Encryption): Risk of permanently locking data.
  • gcloud infra-manager deployments apply (Destructive): Autonomous IaC execution can destroy managed resources.
Execution Guidelines
  • Dry Run (Mandatory): If the --dry-run or --validate-only flag (or equivalent) is listed in the command help output, ALWAYS include the flag in the proposed command or initial execution step. ALWAYS preview changes with --dry-run or --validate-only prior to actual execution.

  • Long Running Operations: For commands that support it, the --async flag is highly recommended for long-running operations to avoid blocking the agentic flow. Note that not every command has an --async flag. For commands that return an operation ID (whether via --async or by default), operation status must be polled for completion, if needed for the next step.

  • Non-Interactive Flag (--quiet): Include --quiet (or -q) on all proposed or executed commands to guarantee non-interactive execution without waiting for TTY confirmation prompts.

Structured Workflows

Discovery Workflow

When asked to perform a task on a service that is unfamiliar:

  1. Invoke Help: Call gcloud help <COMMAND> on the target leaf command prior to execution.
  2. Traverse Command Tree: Run help on command groups (e.g., gcloud help compute or gcloud help) to discover available subgroups and commands if the exact command is unknown.
  3. Discover Schema: Run gcloud <GROUP> <RESOURCE> list --limit=1 --format=json to inspect JSON keys before constructing filters or projections. DO NOT execute unconstrained list commands without scoping flags (e.g., --limit=1) to prevent context window exhaustion.
  4. Enforce Data Reduction: Include data reduction flags (--limit, --filter, --format) on all command executions.

Quick Reference / Cheat Sheet

TaskCommand Template
Discover Schemagcloud <GROUP> <RESOURCE> list --limit=1 --format=json
Filtered Listgcloud <GROUP> <RESOURCE> list --filter="status:RUNNING"
Specific Columnsgcloud <GROUP> <RESOURCE> list --format="json(name, id)"
Learn Filtersgcloud topic filters
Learn Formatsgcloud topic formats
Learn Projectionsgcloud topic projections
Asynchronous Opgcloud <COMMAND> --async
Check Operationgcloud operations describe <OPERATION_ID>
Common commandsgcloud cheat-sheet
List Regions (GCE)gcloud compute regions list --project=<PROJECT_ID>
List Zones (GCE)gcloud compute zones list --project=<PROJECT_ID>
List Locationsgcloud <GROUP> locations list --project=<PROJECT_ID>

Refer to the gcloud CLI Scripting Guide for guidance on using the gcloud CLI in automation.

Reference Directory

  • CLI Usage: Platform installation, authentication methods (interactive, headless, ADC, service account keys, impersonation), and local configuration management.

  • MCP Usage: Using the Cloud CLI remote MCP server (run_gcloud_command), project parameter scoping, input files, and execution guidelines.

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/cloud/gcloud of google/skills.

  • SKILL.md
  • references/cli-usage.md
  • references/mcp-usage.md

Open the folder on GitHubat commit 7d97937

Compare with similar skills

Gcloud next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gcloud compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gcloud this skillgoogle/skills21k—~3.4kAutomated safety check: PassApache-2.0
GcloudKilo-Org/kilo-marketplace190—~2.9kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
Golang Proantoniopaya22/go-rest-template1723 repos~1.2kAutomated safety check: PassMIT
Projectsamchon/typia5.9k—~1.8kAutomated safety check: PassMIT
Debug Grpc ConnectionGetBindu/Bindu10k—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Gcloud

    Kilo-Org/kilo-marketplace

    Interacts with Google Cloud services using the gcloud CLI safely and efficiently.

    190 GitHub stars~2.9k tokensUpdated 9 days ago
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Golang Pro

    antoniopaya22/go-rest-template

    Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with…

    172 GitHub starsUsed in 3 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Project

    samchon/typia

    Defines the typia product contract, workspace layout, package boundaries, and canonical commands.

    5.9k GitHub stars~1.8k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Debug Grpc Connection

    GetBindu/Bindu

    Diagnose gRPC connection issues between the Bindu core and a language SDK.

    10k GitHub stars~1.2k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Aspnet Core

    fanslead/ReverseProxy.Store

    Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development.

    163 GitHub starsUsed in 2 repos~1.4k tokens
    Backend & APIsAuto-check passed

More from google/skills

All 147 skills in this repo
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed

Questions about Gcloud

What does Gcloud do?

Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure. Gcloud is an agent skill from google/skills, published by the product's own GitHub organization. Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.

When should I use Gcloud?

Gcloud fits situations like: executing any gcloud CLI commands - including when answering questions about gcloud syntax; formatting flags; writing Google Cloud client library code; raw REST/gRPC API requests.

How do I install Gcloud in Claude Code?

Run `npx skills add google/skills --skill gcloud -a claude-code`. Or copy the skill folder (skills/cloud/gcloud in google/skills) into .claude/skills/gcloud in your project. Claude Code loads it when a task matches its description.

How do I install Gcloud in Codex?

Run `npx skills add google/skills --skill gcloud -a codex`. Or copy the skill folder (skills/cloud/gcloud in google/skills) into .agents/skills/gcloud in your project. Codex loads it when a task matches its description.

Can I use Gcloud in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill gcloud -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gcloud, .gemini/skills/gcloud, .github/skills/gcloud and .opencode/skills/gcloud in your project.

What does Gcloud need to run?

Going by SKILL.md and its folder, Gcloud needs the command-line tools its instructions call (gcloud).

Does Gcloud access the network?

SKILL.md names 1 domain. As links in the text: docs.cloud.google.com. This is read from the text; nothing was executed.

Is Gcloud safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gcloud use?

Gcloud is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gcloud use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Gcloud?

Skills that share tags, products or a category with Gcloud: Gcloud (Kilo-Org/kilo-marketplace, 190 stars), Use Yaak (mountain-loop/yaak, 19k stars), Golang Pro (antoniopaya22/go-rest-template, 172 stars) and Project (samchon/typia, 5.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gcloud?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 21,032 GitHub stars. The repository holds 147 skills in this directory. The repository was last updated on October 8, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.