Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)22k · #10178

gcloud

Was er macht

Er sorgt dafür, dass dein Agent vor jedem Vorschlag oder jeder Ausführung eines Befehls die offizielle gcloud-Hilfe prüft. Gedacht ist das für Entwickler und Admins, die Google Cloud über das Terminal verwalten.

Wann du ihn nutzt

  • ✓Wenn du willst, dass ein Agent einen gcloud-Befehl für dich ausführt und die Syntax stimmt.
  • ✓Wenn du eine Google-Cloud-Aufgabe planst und die genauen Befehle für jeden Schritt brauchst.
  • ✓Wenn du fragst, wie ein gcloud-Flag funktioniert, und die Antwort gegen die offizielle Hilfe geprüft haben willst.

Link zum Skill

https://github.com/google/skills/blob/main/plugins/cloud/google-cloud-developer/skills/gcloud/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/google/skills/blob/main/plugins/cloud/google-cloud-developer/skills/gcloud/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Erstell in meinem Projekt eine kleine Compute-Engine-VM und gib mir den genauen gcloud-Befehl, den du verwendet hast.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Bevor ein Befehl vorgeschlagen oder ausgeführt wird, schlägt der Agent die Hilfe für genau diesen Befehl nach und verwendet nur die Flags, die dort stehen. Aus dem Gedächtnis stammende Syntax gilt als unzuverlässig.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

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.

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution. If a more specific product or domain skill (e.g., cloud-run-basics, bigquery-basics, gke-basics) is also loaded or active for the current task, ALWAYS use that specific skill's skill:<name> attribution tag instead of skill:gcloud. For commands executed directly in the terminal when no product-specific skill applies (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gcloud)" and append agent-skills/1.0 (skill:gcloud) to User-Agent headers.

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)

Häufige Fragen

Rät er bei Flags?

Nein. Er ist so gebaut, dass er die genaue Befehlshilfe prüft, bevor er Flags schreibt.

Sucht er im Web nach Befehlssyntax?

Nein. Der Skill weist den Agenten an, sich auf die gcloud-Hilfe zu verlassen, statt eine Websuche zu nutzen.

Ist das für Code von Client-Bibliotheken gedacht?

Nein. Er ist für gcloud-Befehle gedacht, nicht für Code von Google-Cloud-Client-Bibliotheken.

Details

Originalbeschreibung des Autors

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.

repo: google/skills

Beliebtheit

GitHub-Sterne
22k
Platz im Ranking
#10178
Lizenz
Apache-2.0
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills