cloud-monitoring — скилл для Claude Code: что делает и как установить
Скилл запрашивает метрики Google Cloud Monitoring через MCP, сжимает данные в CSV и рисует текстовые спарклайны без перегрузки контекста.
Apache-2.0 ★ 151 обновлён 2026-10-12
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sreЧто делает cloud-monitoring
Скилл подключает агента к API Google Cloud Monitoring через готовые инструменты MCP: чтение алертов, политик, дашбордов и выгрузку временных рядов вроде mcp_google-monitoring_query_range. Главный акцент сделан на экономии контекста нейросети. Сырые ответы Cloud Monitoring весят слишком много, поэтому скилл рекомендует делегировать сбор субагентам и сжимать ряды в компактный вид.
Внутри лежит скрипт scripts/export_timeseries_to_csv.py, который забирает метрики за период и сохраняет CSV со статистикой (AVG, Min, Max), метаданными времени в шапке и ASCII-графиком (спарклайном). Скрипт умеет сравнивать парные показатели: входящий и исходящий трафик инстанса, чтение и запись на диск, запросы и задержки в Cloud Run, а также память и процессорное время в контейнерах GKE. Второй скрипт, scripts/setup-frontend-slo.sh, настраивает SLO доступности 99.9% на основе логов фронтенд-сервиса.
Для работы скилла обязательно требуется предварительно настроенный и активный MCP-сервер google-monitoring. Без доступных инструментов этого сервера скилл данные получить не сможет.
Какие задачи решает
- получить метрики и графики из Google Cloud Monitoring без переполнения контекста модели
- сравнить парные метрики вроде памяти и процессора для контейнеров GKE
- выгрузить временные ряды метрик в CSV с подсчётом минимума, максимума и среднего
- настроить базовый SLO доступности 99.9% для сервиса через bash-скрипт
Примеры запросов агенту
- Выгрузи через export_timeseries_to_csv.py трафик и задержки Cloud Run за последние два часа
- Сравни использование процессора и памяти для контейнеров в GKE и выведи ASCII-спарклайн
- Проверь активные алерты в Google Cloud Monitoring через доступные MCP-инструменты
Как установить cloud-monitoring
1Через маркетплейс плагинов
/plugin marketplace add gemini-cli-extensions/sre/plugin install sre-extension@sreКоманда ставит плагин sre-extension целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a claude-code3Вручную: положить файлы
~/.claude/skills/cloud-monitoring/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cloud-monitoring/
1Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a codex2Вручную: положить файлы
.agents/skills/cloud-monitoring/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a cursor2Вручную: положить файлы
.cursor/skills/cloud-monitoring/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install gemini-cli-extensions/sre skills/cloud-monitoring2Вручную: положить файлы
.github/skills/cloud-monitoring/SKILL.md1Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a gemini-cli2Командой платформы
gemini skills install https://github.com/gemini-cli-extensions/sre --path skills/cloud-monitoringВручную: положить файлы
.devin/skills/cloud-monitoring/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о cloud-monitoring
Как установить cloud-monitoring в Claude Code?
Установите скилл командой npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a claude-code. Также можно подключить через маркетплейс, выполнив /plugin marketplace add gemini-cli-extensions/sre, а затем /plugin install sre-extension@sre.
Что нужно подготовить перед запуском скилла?
Обязательно требуется активный MCP-сервер google-monitoring. Без зарегистрированных MCP-инструментов скилл сразу сообщит об ошибке и не сможет сделать запросы к API мониторинга.
Почему скилл выгружает метрики в CSV, а не в сырой JSON?
Ответы API Cloud Monitoring содержат тысячи строк JSON, которые забивают контекстное окно модели. Скрипт агрегирует данные, считает метрики и строит ASCII-график, передавая агенту только компактную выжимку.
Исходный текст
SKILL.md · Apache-2.0
---
name: cloud-monitoring
description: 🐉 Skill for interacting with Google Cloud Monitoring (CM) via APIs to avoid large context bloat. Produces nice short synoptic "gists" of graphs
metadata:
author: Riccardo Carlesso
version: 0.2.17
tools:
- mcp_google-monitoring_get_alert
- mcp_google-monitoring_get_alert_policy
- mcp_google-monitoring_get_dashboard
- mcp_google-monitoring_list_alert_policies
- mcp_google-monitoring_list_alerts
- mcp_google-monitoring_list_dashboards
- mcp_google-monitoring_list_metric_descriptors
- mcp_google-monitoring_list_timeseries
- mcp_google-monitoring_query_range
---
# Cloud Monitoring
> **⚠️ PREREQUISITE: `google-monitoring` MCP Server**
> This skill relies on the `google-monitoring` MCP server being installed and active. Before proceeding with monitoring tasks, assert that the required MCP tools (e.g., `mcp_google-monitoring_query_range`) are available. If they are missing, immediately inform the user and recommend they enable the MCP server (they can use the `gcp-mcp-setup` skill if available).
This skill provides utilities for analyzing and extracting data from Google Cloud Monitoring (CM).
## Best Practices
* **Avoid Context Bloat:** Cloud Monitoring API responses can be massive. Do not try to read raw JSON responses directly into the LLM context. Try to delegate to a SubAgent anything which pulls monitoring data as they tend to bloat the context.
* **Use Export Scripts:** If you pull monitoring data, make sure to surface this final data (in CSV format) using the `scripts/export_timeseries_to_csv.py` Python script to surface important stats like AVG, Max, Min and a simplified text-graph of the system (see `references/sample_output_dual_metrics.csv`) . Also report back that stats header to the main agent, together with any interesting insights you might have found.
* **Metadata Headers:** Exported data should contain metadata (time ranges, metric names) at the top of the file so that the context of "when" the data was pulled is never lost, as `now()` changes over time.
* **Target Workloads:** Focus your monitoring extractions primarily on GKE and Cloud Run environments. Generic time-series extractions should still allow filtering by specific resources.
* **Paired Metrics Comparison:** The extraction script supports querying multiple metrics simultaneously. For apples-to-apples comparisons, try these recommended pairs:
* **Network I/O:** `compute.googleapis.com/instance/network/received_bytes_count` vs `compute.googleapis.com/instance/network/sent_bytes_count`
* **Disk I/O:** `compute.googleapis.com/instance/disk/read_bytes_count` vs `compute.googleapis.com/instance/disk/write_bytes_count`
* **Cloud Run Traffic:** `run.googleapis.com/request_count` vs `run.googleapis.com/response_latencies`
* **GKE Memory vs CPU:** `kubernetes.io/container/memory/used_bytes` vs `kubernetes.io/container/cpu/core_usage_time`
## Available Tools
* `scripts/export_timeseries_to_csv.py`: Fetches time-series data for specified metric(s) and time range, outputting a CSV file with metadata headers. Supports extracting two or more variables for direct correlation and comparison. This is an amazing synoptic you can surface to the user
* It's very effective particularly to share the "**Sparkline**" / **ASCII Art** part showing in TEXT the graphical shape of the curve (e.g., `|█▇▆▇ ▂▃ ▂ ▂|`). This is very useful for humans for rapid visual feedback! Use `csv_to_sparkline.py` from `monitoring-graphs` to recreate it for arbitrary CSVs.
* `scripts/setup-frontend-slo.sh`: A bash script to automatically set up a 99.9% availability SLO using Log-based Metrics for a 'frontend' service. (See `scripts/README.md` for full manual).
© Riccardo Carlesso · Apache-2.0 · gemini-cli-extensions/sre