# Where to Find Operational Commands and gcloud Invocations for Skills

> Find operational commands and gcloud invocations for Google Skills. Explore CLI usage patterns in the dedicated reference Markdown files within each skill's references directory.

- Repository: [Google/skills](https://github.com/google/skills)
- Tags: how-to-guide
- Published: 2026-09-04

---

**All operational commands and `gcloud` invocations for the Google Skills repository are stored in dedicated reference Markdown files under each skill's `references/` directory, with the core CLI patterns documented in [`skills/cloud/gcloud/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/gcloud/references/cli-usage.md).**

The `google/skills` repository organizes cloud operational knowledge into discrete skills, each containing executable command references for Google Cloud Platform services. Developers needing precise `gcloud` syntax for authentication, service management, or service-specific operations can locate authoritative examples directly in the source code rather than external documentation.

## Core gcloud Reference Structure

The repository maintains a centralized **gcloud** skill at `skills/cloud/gcloud` that serves as the foundation for all Google Cloud CLI operations. This skill contains the primary reference file [`skills/cloud/gcloud/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/gcloud/references/cli-usage.md), which documents the exact authentication and configuration patterns used across the entire repository.

Individual service-specific skills—such as Spanner, Workload Manager, and Composer—extend these core patterns in their own `references/` subdirectories. This modular structure ensures that each skill encapsulates both its conceptual logic and its executable command interface.

## Standard Operational Workflow

Every cloud-facing skill in the repository follows a consistent four-step operational pattern for `gcloud` interactions.

### Authentication

Most skills rely on a user-authenticated `gcloud` session or an application-default token obtained through standard CLI commands.

```bash

# User authentication flow

ACCESS_TOKEN=$(gcloud auth print-access-token)

# Application default credentials

ACCESS_TOKEN=$(gcloud auth application-default print-access-token)

```

According to the source code in [`skills/cloud/gcloud/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/gcloud/references/cli-usage.md), these token retrieval patterns are the standard prerequisite for all subsequent API calls.

### Project Configuration

Before executing service commands, skills enforce explicit project selection to ensure operations target the correct GCP resource container.

```bash

# Set active project

gcloud config set project PROJECT_ID

# Export for use in scripts

export PROJECT_ID="$(gcloud config get-value project)"

```

This pattern appears in the core gcloud reference and is replicated across all cloud service skills to maintain environment consistency.

### Service Enablement

Each skill declares its required Google Cloud APIs and enables them programmatically using the `services enable` command.

```bash
gcloud services enable workloadmanager.googleapis.com --quiet

```

The `--quiet` flag suppresses interactive prompts, making this pattern suitable for automated scripts and CI/CD pipelines as implemented in the Workload Manager skill.

## Skill-Specific Command References

While authentication and project setup remain consistent, operational commands vary by service and are documented in skill-specific reference files.

### Spanner Operations

The Spanner skill at [`skills/cloud/spanner-basics/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/references/cli-usage.md) contains the complete command reference for database lifecycle management.

```bash

# Create instance and database infrastructure

gcloud spanner instances create my-instance
gcloud spanner databases create my-database --instance=my-instance

# Execute SQL queries

gcloud spanner databases execute-sql my-database \
    --instance=my-instance \
    --sql="SELECT 1"

```

These commands cover instance provisioning, database creation, and direct SQL execution against Spanner resources.

### Workload Manager IAM Configuration

Unlike Spanner, Workload Manager does not expose a dedicated `gcloud workload-manager` command group. Instead, the skill at [`skills/cloud/workload-manager-basics/references/public-cli-status.md`](https://github.com/google/skills/blob/main/skills/cloud/workload-manager-basics/references/public-cli-status.md) documents IAM and authentication setup using standard project-level commands.

```bash
gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="serviceAccount:..." \
    --role="roles/workloadmanager.admin"

```

This approach uses `gcloud` strictly for identity management while relying on API clients for actual Workload Manager operations.

### Composer Environment Management

The managed Airflow skill documents environment inspection and DAG manipulation in [`skills/cloud/managed-airflow-migrations/references/environment-inspection.md`](https://github.com/google/skills/blob/main/skills/cloud/managed-airflow-migrations/references/environment-inspection.md).

```bash

# List and inspect environments

gcloud composer environments list
gcloud composer environments describe ENV_NAME

# Access DAG storage

gcloud storage cp gs://BUCKET/dags/… .

# Execute Airflow CLI commands

gcloud composer environments run ENV_NAME -- <airflow command>

```

These commands enable operators to migrate workflows by extracting DAG files and executing Airflow metadata commands against Cloud Composer environments.

## Key Reference Files

| Skill | File Path | Contents |
|-------|-----------|----------|
| **Core gcloud** | [`skills/cloud/gcloud/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/gcloud/references/cli-usage.md) | Authentication patterns, project configuration, service enablement |
| **Spanner** | [`skills/cloud/spanner-basics/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/references/cli-usage.md) | Instance creation, database management, SQL execution, backup operations |
| **Workload Manager** | [`skills/cloud/workload-manager-basics/references/public-cli-status.md`](https://github.com/google/skills/blob/main/skills/cloud/workload-manager-basics/references/public-cli-status.md) | IAM bindings and authentication requirements |
| **Composer** | [`skills/cloud/managed-airflow-migrations/references/environment-inspection.md`](https://github.com/google/skills/blob/main/skills/cloud/managed-airflow-migrations/references/environment-inspection.md) | Environment listing, DAG retrieval, Airflow CLI execution |
| **Developer Knowledge** | [`skills/developers/retrieving-developer-knowledge/references/api-fallback.md`](https://github.com/google/skills/blob/main/skills/developers/retrieving-developer-knowledge/references/api-fallback.md) | Fallback authentication examples using `gcloud auth print-access-token` |

## Summary

- **The [`skills/cloud/gcloud/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/gcloud/references/cli-usage.md) file** serves as the authoritative source for base `gcloud` authentication and configuration commands used across the repository.
- **Service-specific commands** reside in each skill's `references/` subdirectory, with exact syntax for Spanner, Workload Manager IAM, and Composer operations.
- **The standard workflow** requires authentication via `gcloud auth print-access-token`, explicit project selection with `gcloud config set project`, and proactive service enablement using `gcloud services enable`.
- **Reference files contain executable bash snippets** that can be copied directly into operational scripts or automation pipelines.

## Frequently Asked Questions

### Where is the primary location for gcloud authentication commands in the skills repository?

The primary location is [`skills/cloud/gcloud/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/gcloud/references/cli-usage.md). This file contains the canonical patterns for retrieving access tokens via both user authentication and application-default credentials, serving as the foundation for all cloud service interactions in the repository.

### How do I find the specific gcloud commands for managing Spanner resources?

Navigate to [`skills/cloud/spanner-basics/references/cli-usage.md`](https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/references/cli-usage.md) in the repository. This reference file contains the exact commands for creating instances, provisioning databases, executing SQL queries, and managing backups using the `gcloud spanner` command group.

### Why doesn't the Workload Manager skill have dedicated gcloud commands?

According to [`skills/cloud/workload-manager-basics/references/public-cli-status.md`](https://github.com/google/skills/blob/main/skills/cloud/workload-manager-basics/references/public-cli-status.md), Workload Manager does not expose a public `gcloud` CLI surface for data operations. The skill uses `gcloud` exclusively for authentication and IAM management (such as `gcloud projects add-iam-policy-binding`), while actual workload operations require direct API calls or client libraries.

### What is the command pattern for accessing Cloud Composer DAGs in the skills repository?

As documented in [`skills/cloud/managed-airflow-migrations/references/environment-inspection.md`](https://github.com/google/skills/blob/main/skills/cloud/managed-airflow-migrations/references/environment-inspection.md), use `gcloud composer environments describe` to identify the environment's Cloud Storage bucket, then `gcloud storage cp` to transfer DAG files locally. For Airflow metadata operations, use `gcloud composer environments run ENV_NAME -- <command>`.