gcloud

Executes validated Google Cloud CLI commands with safety guardrails and data reduction.

3|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/firstsun-dev/skills --skill gcloud-firstsun-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gcloud
Source: https://github.com/firstsun-dev/skills/tree/main/plugins/software-delivery/skills/gcloud
Command: npx skills add https://github.com/firstsun-dev/skills --skill gcloud-firstsun-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often hallucinate gcloud commands, flags, and syntax, run destructive operations without authorization, or flood the context window with unfiltered output. This Skill enforces validated, safe, and minimal gcloud CLI usage for managing Google Cloud resources. ## Core Features & Use Cases - Mandatory Command Validation: Requires running gcloud help <command> at the leaf level before executing any command to prevent hallucinated syntax. - Safety Guardrails: Denylists destructive operations (deletes, IAM changes, billing, KMS) and mandates --dry-run previews and explicit user authorization for risky actions. - Data Reduction: Enforces --format, --filter, and --limit flags plus schema discovery via single-item list queries to protect the context window. - Use Case: When asked to investigate why a Compute Engine instance is unreachable, the agent first validates the exact describe command, scopes it with --project and --zone, and projects only the needed fields instead of dumping full resource JSON. ## Quick Start Ask the agent to list all running Compute Engine instances in your project using the gcloud skill with filtered, projected output.

Frequently Asked Questions about gcloud

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely run gcloud commands from an AI agent?▼

Validate the exact leaf command with `gcloud help <command>` before execution, append `--project` and location flags explicitly, and use `--quiet` for non-interactive runs. Destructive operations like deletes or IAM changes require explicit user authorization.

How to reduce gcloud command output for large resource lists?▼

Use `--format=json(key1,key2)` for projection, `--filter` for server-side narrowing, and `--limit=N` to cap results. Run `gcloud <GROUP> <RESOURCE> list --limit=1 --format=json` first to discover the schema before querying full datasets.

What authentication methods does gcloud support for automation?▼

gcloud supports user accounts via `gcloud auth login`, service account key files via `gcloud auth activate-service-account`, and service account impersonation via `gcloud config set auth/impersonate_service_account`. Impersonation is preferred for local agents to enforce least privilege.

Which gcloud commands are blocked from autonomous execution?▼

The denylist blocks IAM policy modifications, `gcloud * delete`, `gcloud billing *`, `gcloud organizations *`, `gcloud kms *`, proactive API enabling, and `gcloud infra-manager deployments apply`. These require explicit human-in-the-loop authorization due to security, financial, or data-loss risks.

Why does gcloud prompt for a zone or region interactively?▼

Many Google Cloud resources are regional or zonal, and omitting the location flag triggers an interactive selection prompt. Always pass `--region`, `--zone`, or `--location` explicitly, and discover valid values with `gcloud compute regions list` or `gcloud <GROUP> locations list`.