cloud-monitoring-list-time-series-request
Что он делает
Скилл пишет запрос, который получает данные метрик из Google Cloud Monitoring. Он нужен разработчикам и аналитикам, которым требуется точный формат запроса для диаграммы или отчёта.
Когда использовать
- ✓Когда нужен запрос ListTimeSeries, чтобы получить данные метрики для диаграммы.
- ✓Когда нужны настройки фильтра и агрегации для метрики Cloud Monitoring.
- ✓Когда у вас есть имя метрики и нужны правильные параметры REST для неё.
Ссылка на скилл
https://github.com/google/skills/blob/main/skills/cloud/cloud-monitoring-list-time-series-request/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Напиши запрос ListTimeSeries, который покажет среднюю загрузку CPU моих виртуальных машин Compute Engine за последний день.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл читает данные о метрике и настройки ресурса, затем собирает запрос с частями фильтра, временного диапазона и агрегации. Сам метрики он не ищет.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Cloud Monitoring ListTimeSeries Request Generator
Use this skill to translate any Cloud Monitoring metric descriptor into valid,
production-ready ListTimeSeries REST API query parameters (name, filter,
interval.startTime, interval.endTime, aggregation.*, view).
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:cloud-monitoring-list-time-series-request)"
and append agent-skills/1.0 (skill:cloud-monitoring-list-time-series-request) to User-Agent headers.
CRITICAL RULES
- Mandatory Project ID Clarification: You MUST ensure the GCP Project ID
is present in the user prompt, input payload, or environment context (such
as via
gcloud config get-value project). If the Project ID is missing and cannot be resolved, you MUST ask the user to clarify it before generating or executingListTimeSeriesrequests. Do NOT use placeholders for project names.
Workflow
Inspect Metric Metadata
- Use Provided Metric Metadata First: If the user's prompt already
includes metric metadata such as
metric.type,metricKind,valueType, resource types, or label keys, use those values directly instead of calling API tools. - Discover Missing Metadata: If exact metric descriptors including
metric.type,metricKind, andvalueTypeare missing or underspecified, resolve the target metric's descriptor using one of these paths:- Vague Query: If the prompt is vague, such as asking for VM CPU
usage, use the
cloud-monitoring-metric-selectionskill first to identify the specific metric type. - Known Metric Type: If you already have the specific metric type name
such as
compute.googleapis.com/instance/cpu/utilization, but need its descriptor, call thelist_metric_descriptorsMCP tool. If the tool is missing, refer to thecloud-monitoring-metric-selectionskill to configure the Cloud Monitoring MCP server. - Fallback: If the MCP tool cannot be configured, fall back to making a direct Cloud Monitoring API call.
- Vague Query: If the prompt is vague, such as asking for VM CPU
usage, use the
- Identify Key Fields: From the retrieved descriptor, identify key schema
attributes:
type: The Cloud Monitoring metric type string.metricKind:GAUGE,DELTA, orCUMULATIVE.valueType:INT64,DOUBLE,DISTRIBUTION, orBOOL.monitoredResourceTypes: Compatibleresource.typestrings, for example["cloudsql_database", "cloudsql_instance"]. If multiple resource types are listed, select the specificresource.typethat matches the target granularity of the user's request.
Construct Monitoring Filter
The filter parameter is a mandatory string in Cloud Monitoring syntax that
restricts the query to a single metric.type and optional resource and metric
labels:
Single Metric Type Restriction: Every
filterMUST specify exactly onemetric.typeclause using an equality operator. For example:metric.type = "compute.googleapis.com/instance/cpu/utilization"
Monitored Resource Type Filter: MUST include the
resource.typefilter when the target resource granularity is known, preventing collisions across services that share metric types or sub-resources. For example:metric.type = "cloudsql.googleapis.com/database/cpu/utilization" AND resource.type = "cloudsql_database"
Preserve User Literals and IDs: You MUST use literal resource names, IDs, zones, and project parameters provided by the user without alteration. Do NOT override or replace user-specified identifiers with active resources found during metric metadata discovery unless explicitly requested.
Label Type Prefixing:
- Prefix resource-level dimensions, such as instance ID, zone, project,
database ID, or subscription ID, with the
resource.labels.prefix. For example:resource.labels.instance_id = "123456789"resource.labels.database_id = "my-project:my-instance"
- Prefix metric-level dimensions,
- Prefix resource-level dimensions, such as instance ID, zone, project,
database ID, or subscription ID, with the
Частые вопросы
Он находит нужную мне метрику?
Нет. Поиск метрик выполняет скилл выбора метрик, поэтому сначала нужно знать метрику.
Нужен ли ID проекта?
Да. Запросу нужен ID вашего проекта Google Cloud, и скилл спрашивает его, если не может найти.
Использует ли он условные названия проектов?
Нет. Ему нужны настоящие данные проекта, прежде чем он сгенерирует или выполнит запрос.
Подробности
Оригинальное описание автора
Generates valid Cloud Monitoring ListTimeSeries requests and aggregation specifications from metric descriptors and resource parameters. Use when asked to create, generate, format, or build ListTimeSeries requests, JSON payloads, filter expressions, or aligner/reducer aggregations for Cloud Monitoring metrics and charts. Don't use for metric discovery or metric selection.
repo: google/skills
Популярность
- Звёзды на GitHub
- 22k
- Место в рейтинге
- #10241
- Лицензия
- Apache-2.0
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
finding-google-skills
22kПомогает агенту найти нужные руководства Google для задач настройки, например хостинга, баз данных, хранилища, входа или запуска ИИ-моделей.
gcloud
22kПомогает агенту писать и проверять команды gcloud для Google Cloud, сверяя синтаксис с официальной справкой перед запуском, чтобы не угадывать флаги.
google-cloud-recipe-auth
22kВедёт агента через настройку идентификации и доступа в Google Cloud: как люди и сервисы входят в систему и какие права они получают.
google-cloud-recipe-onboarding
22kВедёт нового разработчика через первые шаги в Google Cloud: выбор проекта, подключение оплаты и развёртывание первого ресурса.
Похожие скиллы
openclaw-update
394kПомогает агенту обновить уже работающий OpenClaw Gateway, выбрав способ обновления по тому, как он был установлен, и сохранив вашу сессию.
diagnose-gateway
394kПомогает агенту выяснить, почему ваш OpenClaw Gateway не работает, проверяя настройки, каналы и порты, но ничего не меняя.
crabbox-apps
394kПомогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.