← 返回 Skills 市场
anmolnagpal

Cud Advisor

作者 Anmol Nagpal · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
307
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cud-advisor
功能描述
Recommend optimal GCP Committed Use Discount portfolio (spend-based vs resource-based) with risk analysis
使用说明 (SKILL.md)

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
    gcloud compute commitments list --format json
    
  2. Compute Engine and GKE usage history — to identify steady-state baseline
    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
    gcloud billing accounts list
    

Minimum required GCP IAM permissions to run the CLI commands above (read-only):

{
  "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
安全使用建议
This skill appears coherent for recommending GCP CUDs, but take these precautions before using it: (1) Run the suggested gcloud/bq commands yourself in your environment and paste only the exported JSON/CSV or summarized figures — do NOT paste private keys, tokens, or full console pages that might include secrets. (2) Confirm that pasted data contains no account keys, service-account JSON, or long-lived tokens; the SKILL.md itself warns to confirm this. (3) Treat generated 'gcloud' commands as recommendations: review them carefully and run them only with an account that has appropriate billing/commitment authority. (4) If you cannot produce exported data, provide conservative workload descriptions and cost estimates instead; the quality of recommendations depends on the accuracy and completeness of the input data.
功能分析
Type: OpenClaw Skill Name: cud-advisor Version: 1.0.0 The gcp-cud-advisor skill is a purely instructional tool designed to help users optimize GCP costs. It provides read-only gcloud and BigQuery commands for the user to manually execute and share the output for analysis. The SKILL.md file includes explicit safety instructions for the AI agent to never ask for credentials and to verify that user-provided data does not contain sensitive keys before processing.
能力评估
Purpose & Capability
Name/description (GCP CUD advisor) matches the instructions: the skill asks for billing, compute, and BigQuery export data and explains required read-only IAM roles. Nothing in the SKILL.md requests unrelated services or credentials.
Instruction Scope
The SKILL.md instructs the user to provide outputs of gcloud and BigQuery queries (or to describe workloads). It explicitly states it will not run GCP CLI commands or request credentials. Small inconsistency: the file header lists 'tools: claude, bash' which could imply command execution, but the body clarifies it is instruction-only. Users should avoid pasting any outputs that contain sensitive identifiers/credentials and sanitize exported data before sharing.
Install Mechanism
No install spec and no code files; this is an instruction-only skill so nothing will be downloaded or installed on the host.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. It requests only exported read-only data or user-provided CLI output, which is proportional to the stated function.
Persistence & Privilege
The skill is not always-on (always:false) and uses the platform's normal autonomous invocation settings. It does not request persistent system privileges or modify other skills/configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cud-advisor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cud-advisor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of gcp-cud-advisor skill. - Provides guidance on selecting optimal GCP Committed Use Discount (CUD) types (spend-based vs resource-based) for compute workloads with risk analysis. - Supports evaluation for Compute Engine, GKE, and Cloud Run workloads. - Users provide exported data (utilization reports, usage history, or billing export); no direct access or credentials required. - Outputs clear CUD recommendations with savings estimates, coverage gaps, SUD interaction, and risk scenarios. - Includes updated rules for 2025: Cloud Run and GKE Autopilot are now CUD-eligible.
元数据
Slug cud-advisor
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cud Advisor 是什么?

Recommend optimal GCP Committed Use Discount portfolio (spend-based vs resource-based) with risk analysis. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 307 次。

如何安装 Cud Advisor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cud-advisor」即可一键安装,无需额外配置。

Cud Advisor 是免费的吗?

是的,Cud Advisor 完全免费(开源免费),可自由下载、安装和使用。

Cud Advisor 支持哪些平台?

Cud Advisor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cud Advisor?

由 Anmol Nagpal(@anmolnagpal)开发并维护,当前版本 v1.0.0。

💬 留言讨论