agentleFS
abdullahkhawerabdullahkhawer/devops-skills/skills/gcp-cli/SKILL.md

gcp-cli

Skill8 starsChanged 6 months agoApache-2.0View on GitHub

Use the correct GCP CLI (gcloud) project, account, and region when running Google Cloud commands based on the target environment.

  • Installs packages

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When running gcloud commands, always pass the --project flag based on the target environment, and configure the region/zone explicitly.

    line 8
  2. Distinctive:

    Update the project map below with your GCP project IDs:

    line 12
  3. Very specific:

    Always pass --region <your-default-region> or --zone <your-default-zone> unless the user specifies a different location.

    line 24
  4. Distinctive:

    If not already authenticated, inform the user that setup is required and ask them to complete the following steps manually.

    line 28
  5. Very specific:

    Always specify --project and --account explicitly — never rely on the default gcloud config values, as they may point to the wrong project.

    line 87
  6. Very specific:

    Always specify --region/--zone explicitly — never rely on the default configured region.

    line 88
  7. Distinctive:

    If the target environment is unclear, ask the user before running the command.

    line 89
  8. Distinctive:

    NEVER run any command in the "Never run" table above without explicit user instruction — a human must execute these, especially against …

    line 90
  9. Very specific:

    NEVER read or output service account key files, gcloud auth print-access-token output, or any credential value.

    line 91
  10. Very specific:

    If unsure which project an account belongs to, run gcloud projects describe <project-id> --account <account> to verify before proceeding.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GCP CLI Skill

When running gcloud commands, always pass the --project flag based on the target environment, and configure the region/zone explicitly.

Configuration

Update the project map below with your GCP project IDs:

EnvironmentProject IDAccount
Production<your-prod-project-id><your-prod-account>
Staging / Non-Prod<your-nonprod-project-id><your-nonprod-account>
Sandbox / Dev<your-sandbox-project-id><your-sandbox-account>

Default Region / Zone

Set your default region and zone here: <your-default-region> / <your-default-zone> (e.g. us-central1 / us-central1-a).

Always pass --region <your-default-region> or --zone <your-default-zone> unless the user specifies a different location.

Prerequisites (one-time setup by user)

If not already authenticated, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.

brew install --cask google-cloud-sdk
gcloud auth login
gcloud auth list

Command Format

gcloud <group> <command> --project <project-id> --account <account> [--region <region> | --zone <zone>] [options]

Examples

# Production
gcloud compute instances list --project <your-prod-project-id> --account <your-prod-account>

# Staging / Non-Prod
gcloud compute instances list --project <your-nonprod-project-id> --account <your-nonprod-account>

Available Commands

Read-only (safe, no confirmation needed)

Command patternDescription
gcloud * listList any resource type
gcloud * describe <name>Describe a resource
gcloud projects describe <project-id>Show project metadata
gcloud auth listShow authenticated accounts
gcloud config listShow current CLI configuration
gcloud logging read <query>Read Cloud Logging entries
gcloud monitoring ... (read subcommands)Query Cloud Monitoring

Mutating operations (confirm with user before running)

Command patternDescription
gcloud * createCreate a new resource
gcloud * updateUpdate an existing resource
gcloud deploy releases createTrigger a deployment
gcloud run deployDeploy a Cloud Run service

Never run — requires explicit human approval

Command patternReason
gcloud * deleteIrreversible resource deletion
gcloud projects deleteIrreversibly deletes an entire project
gcloud iam ... add-iam-policy-binding / remove-iam-policy-bindingAlters access control, security-sensitive
gcloud compute instances stop/resetDisrupts running workloads
gcloud sql instances delete/restartDisrupts or destroys a database

Rules

  • Always specify --project and --account explicitly — never rely on the default gcloud config values, as they may point to the wrong project.
  • Always specify --region/--zone explicitly — never rely on the default configured region.
  • If the target environment is unclear, ask the user before running the command.
  • NEVER run any command in the "Never run" table above without explicit user instruction — a human must execute these, especially against production.
  • NEVER read or output service account key files, gcloud auth print-access-token output, or any credential value.
  • If unsure which project an account belongs to, run gcloud projects describe <project-id> --account <account> to verify before proceeding.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.