Official agent skill

Gke Cost Analysis

by google in google/skills

Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics.

OfficialApache-2.0Auto-check passedDevOps & Cloud

Install Gke Cost Analysis

skills CLI
$ npx skills add google/skills --skill gke-cost-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills gke-cost-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/gke-cost-analysis .claude/skills/gke-cost-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gke-cost-analysis
GitHub stars
21k
Token cost
~1.5k tokens
SKILL.md length
598 words
Files
2 (incl. references)
Skills in repo
147
Repo updated
First seen
Licence
Apache-2.0

At a glance

Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics.

  • Works in 5 steps: Provide a Direct Answer: Address the… → Explain BigQuery Integration: Explain… → Check & Verify Cost Allocation: Explain… → …
  • Querying GKE costs across projects
  • SKILL.md covers Overview, Instructions, Key Points & Pricing Drivers and Live Cluster & Cost Monitoring, plus 2 more sections
  • Calls kubectl, gcloud and bq

What it does

Gke Cost Analysis is an agent skill from google/skills, published by the product's own GitHub organization. Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics. Use when querying GKE costs across projects, namespaces, or workloads, analyzing billing reports in BigQuery (bq), checking cluster cost budgets (gcloud billing), or diagnosing cost drivers like pod requests vs. actual utilization (kubectl top). Don't use for applying cost optimization changes, creating rightsizing manifests (VPA/MPA)…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/billing-queries.md`).

It sits in DevOps & Cloud, covering Cloud cost optimization, Data warehousing and Container orchestration. It works with Google Kubernetes Engine, Google BigQuery, Google Cloud and Kubernetes. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Querying GKE costs across projects
  • Analyzing billing reports in BigQuery (bq)
  • Checking cluster cost budgets (gcloud billing)
  • Diagnosing cost drivers like pod requests vs

Example prompts

  • “/gke-cost-analysis”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Provide a Direct Answer: Address the specific cost question or
  2. Explain BigQuery Integration: Explain how to query BigQuery for
  3. Check & Verify Cost Allocation: Explain that GKE Cost Allocation must be
  4. Analyze Pricing Drivers & Utilization: When diagnosing cost drivers,
  5. Provide Actionable Commands/Queries: Provide concrete BigQuery CLI (`bq

What it can do on your machine

Read from SKILL.md and the folder at commit 7d97937. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • kubectl
    • gcloud
    • bq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use kubectl and gcloud, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gke Cost Analysis loads about 1.5k tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 152 tokens; SKILL.md has 598 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~152
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 7d97937, republished under its Apache-2.0 licence (© google). 598 words, ~1,491 tokens.

Download SKILL.mdSave it as .claude/skills/gke-cost-analysis/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
gke-cost-analysis
description
Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics. Use when querying GKE costs across projects, namespaces, or workloads, analyzing billing reports in BigQuery (`bq`), checking cluster cost budgets (`gcloud billing`), or diagnosing cost drivers like pod requests vs. actual utilization (`kubectl top`). Don't use for applying cost optimization changes, creating rightsizing manifests (VPA/MPA), or selecting ComputeClasses (use gke-cost-optimization instead).
metadata.version
1.0.0
metadata.category
CloudObservabilityAndMonitoring

GKE Cost Analysis

This skill provides guidance on answering natural language questions about GKE-related costs, billing reports, and utilization analysis.

Overview

When users ask about GKE costs (e.g., "What are my costs across projects?", "What's my most expensive namespace?", "Why is my cluster cost spiking?"), use this skill to provide a structured and expert response using BigQuery billing exports, cost allocation metadata, and live cluster metrics.

Instructions

When handling a cost-related question:

  1. Provide a Direct Answer: Address the specific cost question or analytical request clearly and concisely.
  2. Explain BigQuery Integration: Explain how to query BigQuery for historical cost breakdown. Note that GKE costs originate from the GCP Billing Detailed BigQuery Export (gcp_billing_export_resource_v1_*).
  3. Check & Verify Cost Allocation: Explain that GKE Cost Allocation must be enabled on the cluster (--enable-cost-allocation) for namespace, label, and workload-level billing granularity. If queries return empty labels, provide the gcloud command to enable it.
  4. Analyze Pricing Drivers & Utilization: When diagnosing cost drivers, explain whether the cluster is in Autopilot (billed by requested pod CPU/memory) or Standard mode (billed by underlying VM node size + control plane fees), and compare live utilization (kubectl top) against provisioned requests.
  5. Provide Actionable Commands/Queries: Provide concrete BigQuery CLI (bq query) commands or read-only gcloud/kubectl inspection commands. Prefer bq over BigQuery Studio when available.

Key Points & Pricing Drivers

  • Data Source: GKE costs come from GCP Billing Detailed BigQuery Export. The user must provide the full path to their BigQuery table (dataset name and table name containing the Billing Account ID).
  • Granularity Requirement: GKE Cost Allocation (--enable-cost-allocation) must be enabled on the cluster to populate goog-k8s-cluster-name, k8s-namespace, k8s-workload-name, and k8s-workload-type labels in BigQuery.
  • Autopilot vs. Standard Cost Drivers:
    • Autopilot Pricing: Billed directly on pod resource requests (requests.cpu, requests.memory, ephemeral storage). Over-requested pods drive up billing regardless of whether the pod actively uses those CPU cycles or memory.
    • Standard Pricing: Billed on provisioned node pool VMs (e2, n4, c3, etc.). Idle nodes or multiple low-utilization dev clusters drive excess infrastructure costs.
    • Cluster Management Fee: ~$0.10/hour per cluster applies to BOTH Standard and Autopilot modes. The free tier waives it for one eligible cluster per billing account.
  • Credits & Discounts Impact: When analyzing cost versus cost_before_credits, note that Committed Use Discounts (CUDs) and Spot VMs appear as credits or reduced rate charges in the billing export.
  • Tools & Syntax: BigQuery CLI (bq) is preferred. When writing Standard SQL queries, use a dot (.) instead of a colon (:) to separate the project ID and dataset name ({project_id}.{dataset_name}.{table_name}).
  • Defaults: Assume last 30 days, row limit 10, ordering by cost descending (ORDER BY cost DESC), unless specified otherwise.
Show full SKILL.md (168 more words)Show less

Live Cluster & Cost Monitoring

Use read-only CLI commands to inspect current cluster budgets, node utilization, and pod resource consumption vs. requests:

bash
# View billing budgets for an account (requires Cost Management API)
gcloud billing budgets list --billing-account={billing_account} --quiet

# View live node resource utilization across the cluster
kubectl top nodes

# View pod resource usage across namespaces (compare against requested limits to diagnose waste)
kubectl top pods --all-namespaces --containers

Warning — cluster mutation, not read-only: Enabling GKE cost allocation modifies the cluster. Get explicit user confirmation before running it, and note that namespace/workload labels populate in the billing export only from enablement onward (no historical backfill).

bash
gcloud container clusters update {cluster_name} \
    --enable-cost-allocation \
    --region {region}

Applying Cost Optimizations

To apply rightsizing changes based on analysis (such as setting up VPA recommendation mode, adjusting CPU/memory to P95 * 1.2, configuring Spot VMs via nodeSelector or ComputeClass, enforcing ResourceQuotas, or selecting machine types and CUDs), use the gke-cost-optimization skill.

BigQuery Query Templates

Ready-to-adapt bq query templates — single workload cost, per-workload per-cluster breakdown, per-namespace breakdown — with the placeholder policy and defaults (30 days, LIMIT 10, ORDER BY cost DESC) are in references/billing-queries.md. All parameters (dataset, table, project, cluster, etc.) must be replaced with user values.

Note: Checking that the goog-k8s-cluster-name label exists scopes the total billing data specifically to GKE costs.

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/cloud/gke-cost-analysis of google/skills.

  • SKILL.md
  • references/billing-queries.md

Open the folder on GitHubat commit 7d97937

Compare with similar skills

Gke Cost Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gke Cost Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gke Cost Analysis this skillgoogle/skills21k—~1.5kAutomated safety check: PassApache-2.0
GCP Cloud Architectalirezarezvani/claude-skills28k—~3.2kAutomated safety check: PassMIT
Devopsnicepkg/auto-company1922 repos~814Automated safety check: PassMIT
Kcli Cluster Deploymentkarmab/kcli653—~1.5kAutomated safety check: PassApache-2.0
GCP Gkesickn33/agentic-awesome-skills47k2 repos~2.5kAutomated safety check: PassMIT
Resource Taggingancoleman/ai-design-components526—~4kAutomated safety check: PassMIT

Similar skills

  • GCP Cloud Architect

    alirezarezvani/claude-skills

    Design GCP architectures for startups and enterprises. An agent skill from alirezarezvani/claude-skills.

    28k GitHub stars~3.2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Devops

    nicepkg/auto-company

    Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm).

    192 GitHub starsUsed in 2 repos~814 tokens
    DevOps & CloudAuto-check passed
  • Guides deployment and management of Kubernetes clusters with kcli.

    653 GitHub stars~1.5k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • GCP Gke

    sickn33/agentic-awesome-skills

    Deploy and manage Google Kubernetes Engine clusters. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.5k tokens
    DevOps & CloudAuto-check passed
  • Resource Tagging

    ancoleman/ai-design-components

    Apply and enforce cloud resource tagging strategies across AWS, Azure, GCP, and Kubernetes for cost allocation, ownership tracking, compliance, and automation.

    526 GitHub stars~4k tokensUpdated 10 mo ago
    DevOps & CloudAuto-check passed
  • Deploying On GCP

    ancoleman/ai-design-components

    Implement applications using Google Cloud Platform (GCP) services.

    526 GitHub stars~3.9k tokensUpdated 10 mo ago
    DatabasesAuto-check passed

More from google/skills

All 147 skills in this repo
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed

Questions about Gke Cost Analysis

What does Gke Cost Analysis do?

Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics. Gke Cost Analysis is an agent skill from google/skills, published by the product's own GitHub organization. Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics.

When should I use Gke Cost Analysis?

Gke Cost Analysis fits situations like: querying GKE costs across projects; analyzing billing reports in BigQuery (bq); checking cluster cost budgets (gcloud billing); diagnosing cost drivers like pod requests vs.

How do I install Gke Cost Analysis in Claude Code?

Run `npx skills add google/skills --skill gke-cost-analysis -a claude-code`. Or copy the skill folder (skills/cloud/gke-cost-analysis in google/skills) into .claude/skills/gke-cost-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Gke Cost Analysis in Codex?

Run `npx skills add google/skills --skill gke-cost-analysis -a codex`. Or copy the skill folder (skills/cloud/gke-cost-analysis in google/skills) into .agents/skills/gke-cost-analysis in your project. Codex loads it when a task matches its description.

Can I use Gke Cost Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill gke-cost-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gke-cost-analysis, .gemini/skills/gke-cost-analysis, .github/skills/gke-cost-analysis and .opencode/skills/gke-cost-analysis in your project.

What does Gke Cost Analysis need to run?

Going by SKILL.md and its folder, Gke Cost Analysis needs the command-line tools its instructions call (kubectl, gcloud and bq).

Does Gke Cost Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gke Cost Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gke Cost Analysis use?

Gke Cost Analysis is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gke Cost Analysis use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 892 tokens, read only when the agent opens those files.

What are the alternatives to Gke Cost Analysis?

Skills that share tags, products or a category with Gke Cost Analysis: GCP Cloud Architect (alirezarezvani/claude-skills, 28k stars), Devops (nicepkg/auto-company, 192 stars), Kcli Cluster Deployment (karmab/kcli, 653 stars) and GCP Gke (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gke Cost Analysis?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 21,032 GitHub stars. The repository holds 147 skills in this directory. The repository was last updated on October 8, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.