Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

compute-on-demand-reservations

БесплатноБез исполняемых скриптовНе проверен

Inspects, verifies, and manages Google Compute Engine (GCE) On-Demand reservations and analyzes consumed versus available reserved capacity. Use when checking…

googleот google★ 25 380 звёзд на GitHub

Об этом скилле

Compute Engine On-Demand Reservations

The compute-on-demand-reservations skill inspects and manages active Google Compute Engine (GCE) On-Demand reservations. It determines whether guaranteed capacity is available, calculates consumption, verifies instance targeting policies, and audits cross-project sharing.

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.


Prerequisites, IAM & Billing

Before querying or managing On-Demand reservations, ensure the environment meets these requirements:

  1. Project & Region Configuration: Prefer passing --project={project_id} and --zone={zone} directly on each command to avoid overwriting global workstation state, or obtain explicit user confirmation before setting defaults (e.g., us-central1 / us-central1-a):
    gcloud config set project {project_id}
    gcloud config set compute/region {region}
    gcloud config set compute/zone {zone}
    
  2. Billing & API Enablement: Ensure the project has an active billing account attached and the Compute Engine API is enabled:
    gcloud services enable compute.googleapis.com --project={project_id}
    
  3. Cloud SDK & Authentication: Ensure the Google Cloud CLI is installed (never execute unprompted host installation commands such as apt-get or curl | bash without explicit user approval; direct the user to the installation guide instead), then authenticate via gcloud auth login (for interactive CLI), gcloud auth application-default login (for SDKs), or GOOGLE_APPLICATION_CREDENTIALS (for service accounts).
  4. IAM Permissions:
    • Read-Only Inspection (list, describe): Grant roles/compute.viewer (or custom role with compute.reservations.list and compute.reservations.get).
    • Reservation Lifecycle (create, update, delete): Grant roles/compute.admin (or custom role with compute.reservations.create, compute.reservations.resize, compute.reservations.update, and compute.reservations.delete).
    • Consuming Reservations (instances create): Grant roles/compute.instanceAdmin.v1 on the project launching VMs (and on both the host/owner project and the consumer project when consuming a shared reservation).
  5. Quota & Organization Policy: Creating an On-Demand reservation immediately consumes regional CPU, GPU, or Local SSD quota. For shared reservations, Compute Engine deducts regional quota in both the host project (at reservation creation) and the consumer project (when VMs launch), and requires the host project to be allowlisted in organization policy constraints/compute.sharedReservationsOwnerProjects.
  6. Billing & Pricing Warning: On-Demand reservations are billed immediately upon creation at the full On-Demand VM rate whether or not VMs are running and consuming the reservation. Review Compute Engine Pricing, Available Regions and Zones, and Google Cloud Locations (strip .md.txt suffixes when presenting documentation URLs to human users) before provisioning.

Command Syntax & Reference

1. List Reservations in a Project / Zone

gcloud compute reservations list \
  --project={project_id} \
  [--filter="zone:({zone})"] \
  [--format="table(name,zone.basename(),specificReservation.instanceProperties.machineType.basename(),specificReservation.assuredCount,specificReservation.inUseCount,specificReservation.count,specificReservationRequired,shareSettings.shareType,status)"]

2. Inspect Reservation Details & Capacity Metrics

gcloud compute reservations describe {reservation_name} \
  --zone={zone} \
  --project={project_id}

(Note: Dense accelerator reservations backed by aggregateReservation leave specificReservation.* columns blank in list and expose aggregateReservation.totalResources and aggregateReservation.inUseResources via describe.)

3. Create a New On-Demand Reservation

[!IMPORTANT] Creating a reservation immediately incurs billing charges. Always obtain explicit human approval before executing gcloud compute reservations create.

gcloud compute reservations create {reservation_name} \
  --project={project_id} \
  --zone={zone} \
  --vm-count={vm_count} \
  (--machine-type={machine_type} | --source-instance-template={template_name}) \
  [--min-cpu-platform={min_cpu_platform}] \
  [--accelerator=count={gpu_count},type={gpu_type}] \
  [--local-ssd=interface={nvme|scsi}] \
  [--require-specific-reservation] \
  [--share-setting=projects --share-with={consumer_project_ids}]  # up to 100 consumer projects in the same org (excluding the host project)

4. Update or Resize an Exis

Полный SKILL.md на GitHub

Установить compute-on-demand-reservations в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/attribution.md

FAQ

Что делает скилл compute-on-demand-reservations?

Inspects, verifies, and manages Google Compute Engine (GCE) On-Demand reservations and analyzes consumed versus available reserved capacity. Use when checking active reservation capacity, determining whether reserved VMs are available or exhausted, verifying reservation targeting (automatic versus specific reservation), or sharing reservations across projects. Don't use for Spot capacity advice (use gcloud compute advice capacity --provisioning-model=SPOT) or future calendar bookings (use compute-future-reservations).

Как установить скилл compute-on-demand-reservations?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл compute-on-demand-reservations запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить compute-on-demand-reservations с