gcloud CLI safety guardrails for AI agents (official Google skill)
Mandatory syntax validation via gcloud help, data-reduction rules, and a denylist for destructive/IAM/billing operations
- What
- Mandatory syntax validation via gcloud help, data-reduction rules, and a denylist for destructive/IAM/billing operations
- Cost
- Free
- Needs
- the gcloud CLI installed and authenticated, plus a Google Cloud project (paid platform — check pricing); nothing else to install — the skill is a rulebook your agent follows
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor — @google's official safety harness for letting AI agents touch the gcloud CLI without hallucinating flags or deleting production: a mandatory pre-condition that treats all prior knowledge of gcloud syntax as stale, so every leaf-level command must first be validated with `gcloud help <leaf_command>` (web search is explicitly forbidden as a syntax source), plus data-reduction rules (never a list without --limit/--filter/--format), execution constraints (single commands, no pipes or chaining, --quiet always, explicit --project and location flags), dry-run discipline, and a denylist blocking autonomous IAM, billing, KMS, org and delete operations. Apache-2.0 licensed. Honest notes: this is a rulebook, not code — it makes your agent careful, not magical; and you still need the gcloud CLI and a Google Cloud project (a paid platform — check pricing) to use it. Every terminal `gcloud` invocation carries an inline usage-attribution tag — keep that prefix out of generated scripts and user-facing code as the skill instructs. Skill Harbor never reviews the code, review it yourself before use. Discovered via skills.sh.
Version: 1.0.1
Quick answer
gcloud CLI safety guardrails is a harness for AI agents touching the gcloud CLI without hallucinating flags. It treats gcloud syntax knowledge as stale, so every command needs gcloud help, no web search for syntax, plus never list without limit and format, single commands, no pipes, quiet, explicit project flags, dry-runs, and a denylist blocking IAM, billing, KMS and delete.
Install
Copy the install package below, then paste it into Muse🧪 Install ran in our test sandbox · Nov 18, 2026📌 Pinned version: commit 22bf5d1Step 0 — before installing anything: read this install prompt, summarize in a few lines what this build does and what installing it involves, then ask me to confirm before you proceed. Prerequisites: the gcloud CLI installed and authenticated, plus a Google Cloud project (paid platform — check pricing); nothing else to install — the skill is a rulebook your agent follows Install "gcloud CLI safety guardrails for AI agents (official Google skill)" for me. It gives my agent @google's official safety harness (version 1.0.1) for gcloud: mandatory leaf-level syntax validation via gcloud help (never web search), data-reduction rules on every list command, execution constraints (single commands, no pipes or chaining, --quiet, explicit project and location flags), dry-run discipline, and a denylist blocking autonomous IAM/billing/KMS/org/delete operations. It also covers the two ways of working with Google Cloud: direct CLI execution (references/cli-usage.md: installation, authentication flows and local configuration) and the Cloud CLI remote MCP server (references/mcp-usage.md: the run_gcloud_command tool, its parameters and its limits). Apache-2.0 licensed. Repository: https://raw.githubusercontent.com/google/skills/22bf5d15d546318171a1a27dda7fcdff9cb3029b/plugins/cloud/google-cloud-developer/skills/gcloud/SKILL.md (the skill is the whole plugins/cloud/google-cloud-developer/skills/gcloud/ folder at that commit: SKILL.md, references/attribution.md, references/cli-usage.md, and references/mcp-usage.md) Pinned version: install the code at commit 22bf5d15d546318171a1a27dda7fcdff9cb3029b exactly (Skill Harbor tested this version). Do not substitute a newer version. If this commit is unreachable, stop and tell me. [FINGERPRINTS] Files at the pinned commit, from Skill Harbor's review of 2026-10-20: - SKILL.md: SHA-256 717d1e6fa5f8a65b75bd75ba607b13b8bce20bba14d475c80267e63c576babc4, 13,952 bytes, 13,952 characters - references/attribution.md: SHA-256 11d2780e929706137a9839a959fe01d175e10e7f802a34132f4a8e3de29d3b8e, 1,858 bytes, 1,856 characters - references/cli-usage.md: SHA-256 bbba71766419dbe82a130f16d149bcb34e504164d84fc4b84164ac66b2e298bf, 4,020 bytes, 4,020 characters - references/mcp-usage.md: SHA-256 a3d75e6ec90a3d0157803faa92a7c0bb43d7481157b45aa3a819f12e1adbda57, 7,911 bytes, 7,911 characters If any of these does not match, it changed since the review: do not install it yet, tell me what you found and let me decide. Updated October 20, 2026: Skill Harbor regenerated this install prompt from the current upstream file, at version 1.0.1 (the previous prompt described version 1.0.0). In SKILL.md itself, the only change besides the version is a new "Attribution" section (the rest of the skill — mandatory gcloud help validation, data reduction, execution constraints, project and location scoping, the denylist and the dry-run discipline — is unchanged). The new section says that, before any direct gcloud, REST API or MCP command, the agent must read references/attribution.md and follow it: for commands executed directly in the terminal, prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gcloud)" set inline on each command, and append "agent-skills/1.0 (skill:gcloud)" to the User-Agent of direct API or MCP requests, appending to an existing User-Agent rather than overwriting it. That scope is terminal commands only: the prefix must never go into generated scripts, Terraform templates or code provided to me for my own repositories, and it must not be persisted with gcloud config set, because that would mislabel unrelated later usage. As references/attribution.md itself states, the tag identifies only the skill and its version and carries no user data, and a user opt-out is documented there: if I ask to disable or remove tracking or attribution tags, omit the CLOUDSDK_METRICS_REQUEST_ATTRIBUTION variable and the custom User-Agent suffix from all commands. This prompt also makes explicit what the previous prompt left vague: install the whole folder, SKILL.md plus the references/ folder (attribution, cli-usage and mcp-usage), not SKILL.md alone. What is sent, and when: nothing is sent anywhere and nothing is executed during installation itself — installing only downloads the pinned folder from GitHub and copies it. Sending starts later, when you use the skill, through my own authenticated gcloud or the Cloud CLI remote MCP server against my own Google Cloud project, with the attribution tagging described in the safety check below. 1. Fetch the whole plugins/cloud/google-cloud-developer/skills/gcloud/ folder at the pinned commit into a temporary folder, then compare SKILL.md, references/attribution.md, references/cli-usage.md, and references/mcp-usage.md with the fingerprints from Skill Harbor's review of 2026-10-20 (see [FINGERPRINTS] above). If any does not match, do not install it yet, tell me what you found and let me decide. 2. Safety check: read SKILL.md, references/attribution.md, references/cli-usage.md, and references/mcp-usage.md and review them for anything suspicious (unexpected network calls, shell commands, credential harvesting); STOP on any red flag and tell me. Tell me in plain words what the skill does when used, which services it connects to, whether it reads or sends any personal information or keys, and anything that seems unusual. Confirm these points from the files: - The skill is a rulebook, not code: four Markdown files only, no bundled scripts and no background service, and nothing runs on its own. Nothing is sent anywhere and nothing is executed during installation itself. Everything below happens in use, when I ask for Google Cloud work, through my own authenticated gcloud installation or the remote MCP server, against my own Google Cloud project. The files contain no secrets; credentials come only from my own gcloud authentication (interactive login, headless --no-browser login, Application Default Credentials, a service account key file, impersonation, or Workload Identity Federation, as references/cli-usage.md describes). - Attribution, the new section in this version: before any direct gcloud, REST API or MCP command, read references/attribution.md. For commands executed directly in the terminal, prefix every gcloud invocation with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gcloud)", set inline on each command because shell state may not persist — never persist it with gcloud config set. On direct HTTP, REST or MCP requests, append "agent-skills/1.0 (skill:gcloud)" to the User-Agent header, appending to an existing value rather than overwriting it, without rewording the tokens. The tag identifies only the skill and its version and carries no user data. Keep the prefix strictly out of generated scripts, Terraform templates and any code provided to me for my own repositories. And the documented opt-out: if I ask to disable or remove tracking or attribution tags, omit the variable and the custom User-Agent suffix from all commands. - Mandatory syntax validation, unchanged: treat all prior knowledge of gcloud syntax as stale. Always validate the exact leaf command with gcloud help <leaf_command> before proposing or executing it — parent group help is not sufficient, validation is not transitive, and web search is forbidden as a syntax source. Plans must follow the 4-step template: syntax validation, parameter verification (including whether --dry-run or --validate-only is supported), a dry-run proposal when supported, then the command proposal and authorization step. Preserve my flags, including --project, in proposed commands. - Data reduction and execution constraints, unchanged: never run a list command without at least one of --limit, --filter or --format; discover a resource's schema first with a --limit=1 --format=json list when the keys are unknown. Execute a single gcloud command at a time: no chaining, no command substitution, no pipes and no redirection. Always pass --quiet for non-interactive execution, always append --project=<PROJECT_ID> to resource commands instead of relying on configuration defaults, and always give explicit location flags (--region, --zone or --location) when a command needs them, discovering locations first if needed. Use --dry-run or --validate-only before real execution whenever the help output lists it, and prefer --async for long-running operations, polling the operation status when a next step depends on it. - Denylist and authorization, unchanged: never execute autonomously any IAM policy, role or binding modification; any gcloud delete; any gcloud billing command; any gcloud organizations command; any gcloud kms command; or gcloud infra-manager deployments apply — each requires my explicit human authorization. Do not proactively enable APIs either: assume the needed APIs are enabled, and ask me before enabling any. Destructive actions in general (delete, update, remove) must be explicitly authorized by me. - The two execution modes: direct CLI execution, covered by references/cli-usage.md (installation and component management, the authentication flows above, named configurations and common properties — noting that, per the attribution rule, the attribution variable is the one setting that must never be persisted this way); and the Cloud CLI remote MCP server, covered by references/mcp-usage.md: endpoint https://cloudcli.googleapis.com/mcp over HTTP, a single tool, run_gcloud_command, which runs one gcloud command in a managed remote environment. Its client configuration must set authProviderType to "google_credentials", so Application Default Credentials are attached, otherwise requests come back 401 Unauthorized. The target project must have the Cloud CLI Execution API (cloudcli.googleapis.com) enabled and my identity must hold the MCP Tool User role (roles/mcp.toolUser) plus the normal permissions on the resources touched, otherwise the endpoint returns 403 Forbidden. The tool's project parameter names the API host project, used only for quota, billing and API enablement: it does not set the command's project, so project-scoped commands still carry --project inside the command string itself, and non-project-scoped commands that need a quota project carry --billing-project. Success is judged by exit_code alone (0 means success): stderr often carries ordinary status messages even on success. The remote server does not support local-machine command groups — gcloud auth, gcloud config, gcloud iam service-accounts, gcloud init, gcloud survey and interactive SSH are unsupported there — and destructive or state-changing commands through it need my explicit consent, with --async, data reduction and --quiet applied just as in direct CLI use. 3. When I say "yes, install", install it as a skill: copy the whole fetched plugins/cloud/google-cloud-developer/skills/gcloud/ folder (SKILL.md and references/, keeping the references/ subfolder so the relative links in SKILL.md keep working) into the agent's skills directory, in a folder named "google-skills-gcloud". 4. Verify with no network calls: frontmatter valid, files in place, and the copied SKILL.md still matches its fingerprint above. 5. Report what was installed, where, and what I still need to do myself (e.g. install and authenticate the gcloud CLI, set my project ID; if I want the MCP mode, enable the Cloud CLI Execution API on the target project and make sure my identity holds the MCP Tool User role; no gcloud, REST or MCP command, and no attribution tagging, happens until I ask for Google Cloud work). GitHub is optional: if I have a GitHub account or the gh CLI, you may use it; otherwise public access is fine. Never require it unless it's in the prerequisites above. Rules: don't touch anything outside the temp folder and the install target. If anything looks off, stop and ask me.
Saved to your recent installs. Find it anytime on /connect.
🔒 Security, provenance and what this touches
The install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Verification certificate
Dated facts about what was checked for this listing, and how. This is not a safety certification.
- Pinned version
- 22bf5d1 · 2026-10-20
- Sandbox install test
- Install ran in our test sandbox · Nov 18, 2026
- Creator identity
- Not verified
- Fingerprint watch
- Last checked · Nov 19, 2026 : no change detected in the files linked by this install prompt
- Install prompt analysis
- 2026-10-13 : No commands, network calls, packages, file writes or API keys detected.
Skill Harbor never reviews the code of a listed skill. These are dated facts about the install prompt and our install test, not a safety certification. Review a skill yourself before you install it. How we verify
Questions
How do I install a skill?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the skill up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a skill before installing it.