Official agent skill

Cloud Monitoring Metric Selection

by google in google/skills

Retrieve, query, and identify relevant Cloud Monitoring metric descriptors on Google Cloud for a service or resource (such as Compute Engine, Spanner, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Cloud…

OfficialApache-2.0Auto-check passedDatabases

Install Cloud Monitoring Metric Selection

skills CLI
$ npx skills add google/skills --skill cloud-monitoring-metric-selection -a claude-code

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

GitHub CLI
$ gh skill install google/skills cloud-monitoring-metric-selection --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/cloud-monitoring-metric-selection .claude/skills/cloud-monitoring-metric-selection && 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
cloud-monitoring-metric-selection
GitHub stars
21k
Token cost
~2.4k tokens
SKILL.md length
991 words
Files
1
Skills in repo
150
Repo updated
First seen
Licence
Apache-2.0

At a glance

Retrieve, query, and identify relevant Cloud Monitoring metric descriptors on Google Cloud for a service or resource (such as Compute Engine, Spanner, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Cloud…

  • Works in 5 steps: Verify & Auto-Configure MCP → Analyze Request & Extract Keywords → Query Metric Descriptors via… → …
  • Discover GCP metric types
  • SKILL.md covers CRITICAL RULES, Workflow and Reference Documentation & Links
  • Reaches monitoring.googleapis.com

What it does

Cloud Monitoring Metric Selection is an agent skill from google/skills, published by the product's own GitHub organization. Retrieve, query, and identify relevant Cloud Monitoring metric descriptors on Google Cloud for a service or resource (such as Compute Engine, Spanner, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Cloud Storage, etc.). Use when asked to find, list, search, or discover GCP metric types, names, kind/value schemas, or descriptors.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Event-driven systems and Data warehousing. It works with Google Cloud, Cloud Run, Google BigQuery and SQL. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Discover GCP metric types
  • Kind/value schemas

Example prompts

  • “/cloud-monitoring-metric-selection”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Verify & Auto-Configure MCP
  2. Analyze Request & Extract Keywords
  3. Query Metric Descriptors via list_metric_descriptors Tool
  4. Local Filtering & Fallback Protocol
  5. Output Selected Metrics

What it can do on your machine

Read from SKILL.md and the folder at commit 4b940dd. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • monitoring.googleapis.com

    Also links to:

    • cloud.google.com
    • docs.cloud.google.com

    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

Cloud Monitoring Metric Selection loads about 2.4k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 991 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~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 4b940dd, republished under its Apache-2.0 licence (© google). 991 words, ~2,413 tokens.

Download SKILL.mdSave it as .claude/skills/cloud-monitoring-metric-selection/SKILL.md (or your agent's skills folder).
name
cloud-monitoring-metric-selection
description
Retrieve, query, and identify relevant Cloud Monitoring metric descriptors on Google Cloud for a service or resource (such as Compute Engine, Spanner, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Cloud Storage, etc.). Use when asked to find, list, search, or discover GCP metric types, names, kind/value schemas, or descriptors.
metadata.version
1.0.1
metadata.category
CloudObservabilityAndMonitoring

Metric Selection (Service Query & Local Keyword Filtering)

Use this skill to identify the most relevant Cloud Monitoring metric descriptors. It queries all metric descriptors for a target service from the API and filters them locally inside the agent's context using keyword matching.

CRITICAL RULES

  • Always Query Live APIs: You MUST always retrieve the most up-to-date metric descriptors dynamically by calling the list_metric_descriptors MCP tool.
  • Mandatory Project ID and Resource Parameter Clarification: BEFORE calling any API tools (such as list_metric_descriptors), you MUST ensure the GCP Project ID is provided in the prompt, URI, or environment context. If the Project ID cannot be resolved, you MUST ask the user to clarify or provide it BEFORE executing API queries. Do NOT run API queries against unconfirmed default or placeholder project names (such as mock-project, my-project-id, unused, or YOUR_PROJECT_ID).
  • Fallback Reporting: If API calls fail and fallback sources (such as public docs) are used, you MUST state the error, the fallback source, and the risks of non-live data (such as potential staleness, missing custom metrics, or schema mismatches).

Workflow

Step 1: Verify & Auto-Configure MCP
  1. Check if any tool matching list_metric_descriptors (such as google-cloud-monitoring:list_metric_descriptors, mcp_google-cloud-monitoring_list_metric_descriptors, or a similar pattern) is available in your active toolset.

  2. Verify via Unique URL: To ensure you are calling the correct Cloud Monitoring tool, confirm that the underlying MCP server configuration points to: https://monitoring.googleapis.com/mcp.

  3. If the tool is missing:

    • Locate the MCP configuration file for the user's environment. Check common paths:

      • ~/.gemini/config/mcp_config.json
      • ~/.codeium/windsurf/mcp_config.json
      • cline_mcp_settings.json
      • claude_desktop_config.json
    • Directly update/merge the configuration file with the following server configuration. CRITICAL: Merge the JSON object to preserve any existing MCP servers in mcpServers. Do not overwrite the file.

      json
      "google-cloud-monitoring": {
        "url": "https://monitoring.googleapis.com/mcp",
        "authProviderType": "google_credentials",
        "enabledTools": [
          "list_metric_descriptors"
        ]
      }
    • Print a clear message notifying the user that the google-cloud-monitoring MCP server has been configured, and request them to restart or start a new chat session to refresh tools. Stop calling further tools and end the turn.

Step 2: Analyze Request & Extract Keywords
  1. Resolve Project ID and Identifiers: Check for the GCP Project ID and resource identifiers in the prompt, resource URIs, or environment context. According to the CRITICAL RULES above, do NOT use placeholder project names.

  2. Identify Service Prefix: Map target GCP services to their standard prefix (such as compute, spanner, bigquery, storage).

  3. Extract Metric Concepts: Extract metric keywords from user prompt (such as "CPU", "memory", "bytes scanned", "latency", "connections") and map to search substrings.

Example Query Analysis:

  • User Prompt: "Check Cloud Storage bucket write throughput and request count"
  • Resource URI: //storage.googleapis.com/projects/my-project/buckets/my-bucket
  • Service Prefix: storage (mapped to storage.googleapis.com)
  • Metric Keywords: write, throughput, request, count
  • Mapped Substrings: write, throughput, request_count, count
Step 3: Query Metric Descriptors via list_metric_descriptors Tool

Query all metric descriptors for each identified service prefix using the list_metric_descriptors MCP tool (using pageSize: 200). Because Cloud Monitoring filters do not allow combining multiple metric.type restrictions with OR, you must initiate a separate query for each identified service prefix (either sequentially or in parallel).

If any response includes a nextPageToken, you MUST make consecutive follow-up calls passing pageToken until all remaining descriptors for that prefix are retrieved before filtering.

Filter Pattern Construction: Map the target service domain to its appropriate prefix style:

  1. Standard Google Cloud Services: starts_with("<service_prefix>.googleapis.com/") (such as bigquery.googleapis.com/, redis.googleapis.com/).
  2. Ops Agent (Guest OS): starts_with("agent.googleapis.com/") (for guest OS memory/disk metrics).
  3. Kubernetes / GKE Native: starts_with("kubernetes.io/")
  4. Istio Service Mesh: starts_with("istio.io/")
  5. Knative Serving / Autoscaler: starts_with("knative.dev/")
  6. Custom / External Metrics: Use starts_with("custom.googleapis.com/") or starts_with("external.googleapis.com/").

Example Tool Call Payload: If both Spanner and Compute Engine are targeted in the request, execute these two tool calls:

  1. Spanner query:
json
{
  "name": "projects/my-project-id",
  "filter": "metric.type = starts_with(\"spanner.googleapis.com/\")",
  "pageSize": 200
}
  1. Compute Engine query:
json
{
  "name": "projects/my-project-id",
  "filter": "metric.type = starts_with(\"compute.googleapis.com/\")",
  "pageSize": 200
}

Call the list_metric_descriptors tool with these payloads.

Show full SKILL.md (383 more words)Show less
Step 4: Local Filtering & Fallback Protocol

Aggregate all descriptors returned from Step 3, and filter them locally inside your LLM context:

  1. Keyword Filtering: Filter the list by matching your target metric keywords (such as "cpu", "latency") against the type, displayName, and description fields of the descriptors.
  2. Resource Alignment: Check if the metric contains labels matching the target resource granularity (such as checking for a database label if targeting a database resource). Do not attempt to dynamically match resource type strings directly, as Cloud Monitoring resource mappings (like Spanner databases mapping to spanner_instance) can be counter-intuitive.
Troubleshooting & API Fallbacks

If any tool call fails, times out, or returns empty results, use these strategies:

  • Case A: API Syntax Error: Examine the error message, correct the filter syntax, and retry.
  • Case B: Timeout / Rate Limits: Retry the call once with a smaller page size (such as pageSize: 20).
  • Case C: Unrecoverable Failure / Empty List:
    1. Verify if the target service is enabled in the project.
    2. Search Google Cloud public documentation to verify standard metrics for the service.
Step 5: Output Selected Metrics

For each service domain, return only the 5-15 key metrics directly relevant to the user's intent.

You MUST report the selected metrics in clean Markdown tables, grouped by service (that is, one table per service prefix). The table MUST include the following columns: "Metric Type", "Display Name", "Description", "Metric Kind", "Value Type", "Unit", and "Monitored Resource Types". Map the fields from the Cloud Monitoring list_metric_descriptors tool call response objects directly to the table columns:

  • Metric Type: Map to the type field (for example, spanner.googleapis.com/instance/cpu/utilization).
  • Display Name: Map to the displayName field.
  • Description: Map to the description field.
  • Metric Kind: Map to the metricKind field (for example, GAUGE, DELTA, CUMULATIVE).
  • Value Type: Map to the valueType field (for example, INT64, DOUBLE, DISTRIBUTION, BOOL).
  • Unit: Map to the unit field (for example, 1, By, s, ms).
  • Monitored Resource Types: Map to the monitoredResourceTypes list field (for example, ["spanner_instance"]).

Example Output Table:

Metric TypeDisplay NameDescriptionMetric KindValue TypeUnitMonitored Resource Types
spanner.googleapis.com/instance/cpu/utilizationInstance CPU UtilizationFraction of allocated CPU currently in use.GAUGEDOUBLE1["spanner_instance"]

© 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

Just SKILL.md in skills/cloud/cloud-monitoring-metric-selection of google/skills.

Open the folder on GitHubat commit 4b940dd

Compare with similar skills

Cloud Monitoring Metric Selection 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.

Cloud Monitoring Metric Selection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloud Monitoring Metric Selection this skillgoogle/skills21k—~2.4kAutomated safety check: PassApache-2.0
Imaging Data CommonsK-Dense-AI/scientific-agent-skills48k1 repos~7.8kAutomated safety check: PassMIT
Deploying On GCPancoleman/ai-design-components525—~3.9kAutomated safety check: PassMIT
GCP Cloud Architectalirezarezvani/claude-skills28k—~3.2kAutomated safety check: PassMIT
Semantic Analystsidequery/sidemantic129—~982Automated safety check: PassAGPL-3.0
Bigquery Basicsdavila7/claude-code-templates33k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Imaging Data Commons

    K-Dense-AI/scientific-agent-skills

    Queries and downloads public cancer imaging data from NCI Imaging Data Commons.

    48k GitHub starsUsed in 1 repo~7.8k tokens
    DatabasesAuto-check passed
  • Deploying On GCP

    ancoleman/ai-design-components

    Implement applications using Google Cloud Platform (GCP) services.

    525 GitHub stars~3.9k tokensUpdated 10 mo ago
    DatabasesAuto-check passed
  • 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
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Bigquery Basics

    davila7/claude-code-templates

    Manages datasets, tables, and jobs in BigQuery, and integrates with BigQuery ML and Gemini for advanced data analytics and AI-driven insights.

    33k GitHub stars~1.1k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Migrating To Amazon Redshift

    aws/agent-toolkit-for-aws

    Official

    Guides an end-to-end data-warehouse migration to Amazon Redshift — discovery, schema/SQL/stored-procedure/macro/script conversion, data migration, validation, performance comparison, and reporting.

    2.8k GitHub stars~2.7k tokensUpdated yesterday
    DatabasesAuto-check: notes

More from google/skills

All 150 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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    Auto-check passed

Categories

Questions about Cloud Monitoring Metric Selection

What does Cloud Monitoring Metric Selection do?

Retrieve, query, and identify relevant Cloud Monitoring metric descriptors on Google Cloud for a service or resource (such as Compute Engine, Spanner, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Cloud…. Cloud Monitoring Metric Selection is an agent skill from google/skills, published by the product's own GitHub organization.).

When should I use Cloud Monitoring Metric Selection?

Cloud Monitoring Metric Selection fits situations like: discover GCP metric types; kind/value schemas.

How do I install Cloud Monitoring Metric Selection in Claude Code?

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

How do I install Cloud Monitoring Metric Selection in Codex?

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

Can I use Cloud Monitoring Metric Selection 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 cloud-monitoring-metric-selection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloud-monitoring-metric-selection, .gemini/skills/cloud-monitoring-metric-selection, .github/skills/cloud-monitoring-metric-selection and .opencode/skills/cloud-monitoring-metric-selection in your project.

What does Cloud Monitoring Metric Selection need to run?

SKILL.md names no scripts, command-line tools or credentials: Cloud Monitoring Metric Selection is instructions for the agent only.

Does Cloud Monitoring Metric Selection access the network?

SKILL.md names 3 domains. In commands or code: monitoring.googleapis.com; the agent is likely to contact it when it follows the instructions. As links in the text: cloud.google.com and docs.cloud.google.com. This is read from the text; nothing was executed.

Is Cloud Monitoring Metric Selection 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 Cloud Monitoring Metric Selection use?

Cloud Monitoring Metric Selection 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 Cloud Monitoring Metric Selection use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cloud Monitoring Metric Selection?

Skills that share tags, products or a category with Cloud Monitoring Metric Selection: Imaging Data Commons (K-Dense-AI/scientific-agent-skills, 48k stars), Deploying On GCP (ancoleman/ai-design-components, 525 stars), GCP Cloud Architect (alirezarezvani/claude-skills, 28k stars) and Semantic Analyst (sidequery/sidemantic, 129 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloud Monitoring Metric Selection?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 21,097 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 9, 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.