gcloud
Interacts with Google Cloud services using the gcloud CLI safely and efficiently. Covers command validation, data reduction, safety guardrails with a denylist, and workflows for discovery and investigation. You MUST read this skill before invoking any gcloud command. Use when managing cloud resources, querying configurations, or troubleshooting issues via gcloud. Don't use when writing or debugging Google Cloud client library code or raw REST/gRPC API interactions.
What this skill does
# gcloud CLI Skill for AI Agents
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.
## Getting Started
### 1. Installation
If the `gcloud` executable is missing, refer to the official
[Google Cloud CLI Installation Guide](https://docs.cloud.google.com/sdk/docs/install-sdk)
to install it on your platform (Linux, macOS, Windows, etc.).
### 2. Authorization
Authenticate the CLI with Google Cloud. Choose the flow that matches your
running environment:
* **User Account (Interactive)**: Run `gcloud auth login`. Follow the browser
prompts to sign in.
* **User Account (Headless Flow)**: If operating on a terminal without a web
browser (e.g. containers, remote SSH), append the `--no-browser` flag:
`gcloud auth login --no-browser`. Copy the URL, sign in on another machine,
and return the authentication code.
* **Application Default Credentials (ADC)**: To authenticate code calls from
local applications or SDK libraries, set up ADC via `gcloud auth
application-default login` (append `--no-browser` for headless
environments).
* **Service Account (Best for Detached/Headless Automation)**: Authenticate
directly using a JSON key file. Ideal for fully automated, background tasks
and pipelines: `gcloud auth activate-service-account
--key-file=path/to/key.json`. Note that some organizations may restrict
access to JSON key files for security reasons.
* **Service Account Impersonation (Preferred for Local Pair-Programming
Agents)**: Leverage the human developer's existing user credentials to
assume a service account identity. Best for local development assistants to
avoid insecure private keys on human workstations: `gcloud config set
auth/impersonate_service_account SERVICE_ACCT_EMAIL`
*Separation of Privilege (Critical)*: Both service account approaches ensure the
agent's permissions remain strictly distinct from the human user's wide access
limits (enforcing least privilege), and ensure actions are properly audited
under the agent's focused identity. *(Impersonation requires
`roles/iam.serviceAccountTokenCreator`)*.
For more detailed strategies and authentication types (such as Workload Identity
Federation), see
[Authorizing the gcloud CLI](https://docs.cloud.google.com/sdk/docs/authorizing).
## Core Principles
### 1. Explicit Command Validation (Mandatory)
Your internal knowledge of `gcloud` may be stale or prone to hallucination
(e.g., hallucinating commands, flags, flag values, or positional argument
syntax). You are **FORBIDDEN** from executing commands until you have validated
the exact syntax at the leaf level.
* **Action**: Always call `gcloud help <command>` for the *exact* command you
intend to 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.
Validation is not transitive from parent groups.
### 2. Data Reduction Strategies
To save context window space and reduce latency, always minimize the volume of
data returned by `gcloud`.
* **Projection**: Use `--format=json(key1, key2, ...)` to select only the
specific fields needed for your 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 your
context window with redundant data. To prevent this, discover a resource's
schema before executing queries. If you are 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.
* **No Interactivity**: Do not run interactive commands or commands requiring
a TTY (e.g., `gcloud interactive`). You must enforce non-interactive mode by
appending `--quiet` (or `-q`) to your commands. This ensures that defaults
are used or errors are raised if input is required.
### 4. Project and Location Scoping (Critical)
To ensure commands are deterministic, non-interactive, and target the correct
environment, you must explicitly manage 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 you omit the location flag (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 you do not know the correct region, zone, or
location for a service, 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)
You are **strictly prohibited** from executing 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
posRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.