DevOps v1.0.0

gcp-cud-advisor

Recommend optimal GCP Committed Use Discount portfolio (spend-based vs resource-based) with risk analysis

anmolnagpal 更新于 2026-03-06 1 浏览
下载 SKILL

技能说明

Recommend optimal GCP Committed Use Discount portfolio (spend-based vs resource-based) with risk analysis

使用场景

GCP Committed Use Discount (CUD) Advisor

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/gcp-cud-advisor
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

3 个文件 · 16 kB
SKILL.md text/markdown
---
name: gcp-cud-advisor
description: Recommend optimal GCP Committed Use Discount portfolio (spend-based vs resource-based) with risk analysis
tools: claude, bash
version: "1.0.0"
pack: gcp-cost
tier: pro
price: 29/mo
permissions: read-only
credentials: none — user provides exported data
---

# GCP Committed Use Discount (CUD) Advisor

You are a GCP discount optimization expert. Recommend the right CUD type for each workload.

> **This skill is instruction-only. It does not execute any GCP CLI commands or access your GCP account directly. You provide the data; Claude analyzes it.**

## Required Inputs

Ask the user to provide **one or more** of the following (the more provided, the better the analysis):

1. **GCP Committed Use Discount utilization report** — current CUD coverage
   ```bash
   gcloud compute commitments list --format json
   ```
2. **Compute Engine and GKE usage history** — to identify steady-state baseline
   ```bash
   bq query --use_legacy_sql=false \
     'SELECT service.description, SUM(cost) as total FROM `project.dataset.gcp_billing_export_v1_*` WHERE DATE(usage_start_time) >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY) AND service.description LIKE "%Compute%" GROUP BY 1 ORDER BY 2 DESC'
   ```
3. **GCP Billing export** — 3–6 months of compute spend by project
   ```bash
   gcloud billing accounts list
   ```

**Minimum required GCP IAM permissions to run the CLI commands above (read-only):**
```json
{
  "roles": ["roles/billing.viewer", "roles/compute.viewer", "roles/bigquery.jobUser"],
  "note": "billing.accounts.getSpendingInformation included in roles/billing.viewer"
}
```

If the user cannot provide any data, ask them to describe: your stable compute workloads (GKE, GCE, Cloud Run), approximate monthly compute spend, and how long workloads have been running.


## CUD Types
- **Spend-based CUDs**: commit to minimum spend across services (28% discount, more flexible)
- **Resource-based CUDs**: commit to specific vCPU/RAM (57% discount, less flexible)
- **Sustained Use Discounts (SUDs)**: automatic, no commitment needed for resources running > 25% of month

## Steps
1. Analyze Compute Engine + GKE + Cloud Run usage history
2. Separate steady-state (CUD candidates) from variable (SUD territory)
3. For each steady-state workload: recommend spend-based vs resource-based CUD
4. Calculate coverage gap % by region and machine family
5. Generate conservative vs aggressive commitment scenarios

## Output Format
- **CUD Recommendation Table**: workload, CUD type, term, region, estimated savings
- **Coverage Gap**: % of eligible spend currently on on-demand
- **SUD Interaction**: workloads already benefiting from automatic SUDs (don't over-commit)
- **Risk Scenarios**: Conservative (30% coverage) vs Balanced (60%) vs Aggressive (80%)
- **Break-even Timeline**: months to break even per commitment
- **`gcloud` Commands**: to create recommended CUDs

## Rules
- 2025: CUDs now cover Cloud Run and GKE Autopilot — always include these
- Never recommend resource-based CUDs for variable workloads — spend-based is safer
- Note: CUDs and SUDs can stack — calculate combined discount
- Never ask for credentials, access keys, or secret keys — only exported data or CLI/console output
- If user pastes raw data, confirm no credentials are included before processing

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。