К основному содержанию
скилл CX Codex

monitoring-graphs — скилл для Claude Code

Скилл monitoring-graphs для Claude Code, Codex и Gemini CLI генерирует аннотированные графики инцидентов на Python. Запускается, когда нужно визуализировать сбой, показать скачки ошибок или соотнести метрики с этапами инцидента.

Apache-2.0 ★ 151 обновлён 2026-10-12

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Открыть на GitHub

Что делает monitoring-graphs

Скилл помогает выбрать релевантные метрики, извлечь данные из Cloud Monitoring и построить профессиональный график с разметкой по времени (обнаружение, смягчение, разрешение). Работает на Claude Code, Codex и Gemini CLI.

Внутри — Python-скрипты для черновика и финального графика. Черновик подтверждает, что данные содержат сигнал; финальный граф добавляет аннотации красным (сбой), жёлтым (обнаружение) и зелёным (исправление). Скилл требует Python и доступа к Cloud Monitoring для извлечения данных; все временные метки по умолчанию в UTC.

Скилл соблюдает принцип: никогда не выдумывает числа, только работает с реальными данными. Если произошёл полный отказ и API не вернула точки, скилл заполняет нулями через переиндексирование, а не фальсифицирует значения.

Какие задачи решает

  • построить граф сбоя с этапами инцидента для постмортема
  • визуализировать скачки ошибок и корреляцию с трафиком
  • аннотировать временные интервалы обнаружения и смягчения на одном графике
  • извлечь метрики из Cloud Monitoring и подтвердить их сигнал
  • создать несколько версий графика без перезаписи предыдущих

Примеры запросов агенту

  • Сверстай граф инцидента для постмортема: время начала 2024-01-15 10:30, обнаружение 10:45, смягчение 11:20, конец 11:35.
  • Покажи граф доступности сервиса с корреляцией трафика за инцидент 14 марта.
  • Загрузи метрики из Monitoring, построй черновик графика, чтобы убедиться в сигнале, а потом добавь аннотации.

Как установить monitoring-graphs

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 monitoring-graphs -a claude-code

3Вручную: положить файлы

~/.claude/skills/monitoring-graphs/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/monitoring-graphs/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о monitoring-graphs

Как установить monitoring-graphs в Claude Code?

В Claude Code выполни /plugin marketplace add gemini-cli-extensions/sre, затем /plugin install sre-extension@sre, потом npx skills add gemini-cli-extensions/sre --skill monitoring-graphs -a claude-code. Скилл будет доступен в ~/.claude/skills/monitoring-graphs/SKILL.md.

Что делает monitoring-graphs?

Скилл генерирует аннотированные графики инцидентов: извлекает метрики из Cloud Monitoring, строит черновой граф для проверки сигнала, затем создаёт финальный граф с разметкой этапов (обнаружение, смягчение, разрешение) красным, жёлтым и зелёным цветом.

Какие данные нужны для работы скилла?

Нужны Python, доступ к Cloud Monitoring для извлечения метрик и временные метки в UTC. Скилл не выдумывает числа: если произошёл полный отказ и API не вернула точки, скилл заполняет нулями, а не фальсифицирует значения.

Исходный текст

SKILL.md · Apache-2.0
---
name: monitoring-graphs
description: 🐉 Skill for generating high-quality, annotated incident graphs for post-mortems using Python. Use this when the user needs to visualize an outage, show error rates, or correlate metrics with incident milestones.
#verbose_description: Expert SRE skill for generating high-quality, annotated incident graphs for post-mortems using Python and Monitoring MCP on Google Cloud. Use this when the user needs to visualize an outage, show error rates, or correlate metrics with incident milestones (start, detection, mitigation, end).
metadata:
  author: Riccardo Carlesso
  version: 0.0.6
---

# 📈 Monitoring & Incident Graphing Skill 📊

This skill guides the agent through identifying high-signal metrics, extracting data efficiently, and creating professional annotated graphs.

## 🚨 DATA INTEGRITY: NEVER MAKE UP NUMBERS
- **ONLY REAL DATA:** Absolutely **NEVER** fake data, interpolate guesses, or hard-code values (like forcing a firewall block period to exactly 0) just to make a graph look "correct" or align with a narrative. 
- **The Data Is The Source Of Truth:** If there is an outage, the raw metrics or the *absence* of metrics must prove it. Show the *real* raw availability.
- **Handling Complete Blackouts:** If a full blackout causes missing data points from the API, do not invent data. Instead, use Pandas `reindex` to fill the missing continuous time intervals with 0s.

## 🚀 Workflow

### 1. Metric Selection & Efficient Extraction 🕵️‍♀️
- **Standard Time:** Always use **UTC** for all timestamps by default. 🌐
- **Performance Tip:** Cloud Monitoring can be **VERY SLOW** for high-res data. 🐢
- **Execution:**
  1. Use Monitoring MCP to find relevant metrics for the incident time window.
  2. Download the data as CSV (e.g., `out/incident/metric.csv`) or directly parse JSON.
  3. Use a sub-agent (`generalist`) for large datasets to keep the main session history lean.
- **Reference:** See [archetypes.md](references/archetypes.md) for "Apple-to-Apple" strategies and granularity tables.

### 2. Baseline Graph (Draft) 🖼️
- **Rule:** Always generate a raw "Draft" graph first to confirm the data shows a clear signal.
- **Command:**
  ```bash
  uv run ./scripts/plot_archetype.py --csv data.csv --out draft.png --title "Title"
  ```
- **Verification:** Ensure the graph is not "flat." The X-axis must explicitly show "Time (UTC)" so there is no ambiguity! 🕰️

### 3. Annotated Graph (Final) 🔴
- **Requirement:** Only proceed after the user confirms the draft is "good."
- **Command:**
  ```bash
  # Times are assumed to be UTC unless --timezone is specified
  uv run ./scripts/plot_archetype.py \
    --csv data.csv \
    --out final.png \
    --final \
    --start "YYYY-MM-DD HH:MM:SS" \
    --detect "YYYY-MM-DD HH:MM:SS" \
    --mitigate "YYYY-MM-DD HH:MM:SS" \
    --end "YYYY-MM-DD HH:MM:SS"
  ```
- **Styling Guidelines (Annotations):**
  - **Red (`#d93025`):** Breakages, outages, faults, or incident start/end. Use different line thicknesses (`linewidth=1` to `3`) or styles (`:`, `--`, `-.`) to denote severity.
  - **Yellow (`#f9ab00`):** Human detection or alert triggered.
  - **Green (`#1e8e3e`):** Fix, mitigation, or resolution applied.

## 📝 Safeguards & Tips

* **Scaling Lines:** Use `--hmin` and `--hmax` to show Cloud Run/GKE scaling limits (min/max instances).
* **Auto-Coloring:** Blue for `ingress`, Green for `egress` for Network I/O.
* **Timeouts:** Use `timeout 60` for data extraction tool calls to avoid infinite loops. Also prefer MCP calls to Monitoring/Logging (faster) vs `gcloud` commands (slower).
* **Clear Timing:** Ensure that looking at the time variable allows a person to know EXACTLY what that time is. 
    * For instance, if time is 03:00 ensure the TZ is specified in the X-axis label.
    * If the graph only contains HOURS (ie, all happens within a day) and no days, then ensure the day is also written in the X-axis label.
* **Correlation in graphs**: if you need to prove a time-correlation between heterogeneous graphs (eg error logs volume vs increase in traffic) remember:
    * **Time is key** - keep a single X-axis with consistent time across the 2+ graphs.
    * Example: `assets/sample_correlation_data/improved_incident_graphs.png`
* **Revision and multiple files**. Since images are very succulent, if you create a new image do NOT overwrite the old image, rather add _rev1, _rev2, .. to the file name.
    * If an image is proven to be wrong by further investigation, do NOT delete it, rather add it to Trash/ within the original folder, and possibly rename it to why it was wrong in the filename.

## 🐍 Juicy Python Patterns (From Real Investigations)

See `scripts/reference_dual_plot.py` for a complete example of parsing JSON and plotting.

### 1. Handling Missing Data (Reindexing)
```python
# Force 0s for missing data in outages (Pandas)
full_range = pd.date_range(start=df.index.min(), end=df.index.max(), freq='1min')
df = df.reindex(full_range, fill_value=0)
```

### 2. Smoothing "Golden Signals"
```python
# 5min rolling average for smoother 'Golden Signal' look
vol_smooth = grouped['Total'].rolling(5, min_periods=1).mean().fillna(0)
avail_smooth = grouped['Availability'].rolling(5, min_periods=1).mean().fillna(0)
```

### 3. Dual Axes (Availability & Traffic)
```python
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(15, 10), sharex=True)
ax1.plot(df.index, df.avail, color='#d93025', label='Success Rate') # Top: %
ax1.fill_between(df.index, df.avail, color='#d93025', alpha=0.1)
ax2.plot(df.index, df.vol, color='#1a73e8', label='Traffic') # Bottom: Volume
ax2.fill_between(df.index, df.vol, color='#1a73e8', alpha=0.1)
```

© Riccardo Carlesso · Apache-2.0 · gemini-cli-extensions/sre

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
huawei-cloud-monitoring-query huaweicloud Скилл huawei-cloud-monitoring-query читает состояние мониторинга Huawei Cloud: правила алертов, историю срабатываний, дашборды и данные enterprise-проектов. Только чтение, без изменений. CX Codex +1 18 300установок cloud-monitoring-promql-query официальный google Скилл cloud-monitoring-promql-query для Cloud Monitoring на Claude Code, Gemini CLI и Codex. Генерирует валидные PromQL-запросы из дескрипторов метрик и параметров ресурсов Google Cloud. CX Codex +1 3 700установок monitoring-operations alexander-cedergren Скилл monitoring-operations для Claude Code и Codex настраивает метрики и алерты OCI Monitoring, разбирает молчащие алерты и пропавшие метрики. CX Codex +1 1 400установок huawei-cloud-ces-ecs-monitoring huaweicloud Скилл huawei-cloud-ces-ecs-monitoring для Claude Code и Codex запрашивает метрики ECS через Cloud Eye Service. Помогает смотреть загрузку ресурсов и разбирать динамику показателей. CX Codex +1 239установок openstatus openstatusHQ Управляйте через ИИ-агента мониторами, страницами статуса, инцидентами и окнами обслуживания в openstatus. CX Codex +1 ★ 9 277звёзд репо logclaw-mcp-server logclaw Подключает ИИ-агента к инцидентам, логам и аномалиям LogClaw. Работает с облачным API или self-hosted инстансом. CX Codex +1 ★ 79звёзд репо

Из того же набора17

Весь набор →
cloud-monitoring Скилл запрашивает метрики Google Cloud Monitoring через MCP, сжимает данные в CSV и рисует текстовые спарклайны без перегрузки контекста. CX Codex +1 ★ 151звёзд репо postmortem-aggregator Скилл postmortem-aggregator для Claude Code разбирает Post Mortem в папке, рассчитывает показатели сбоев и обновляет POMO_AGGREGATED.md. Помогает находить повторяющиеся причины инцидентов. CX Codex +1 ★ 151звёзд репо gcp-mcp-setup Скилл gcp-mcp-setup для Claude Code, Codex и Gemini CLI автоматизирует подключение Google Managed MCP-серверов (OneMCP) к CLI-окружению. Включает нужные API, генерирует ключи и записывает конфигурацию в нужный файл настроек. CX Codex +1 ★ 151звёзд репо generic-mitigations Скилл generic-mitigations учит ИИ-агента купировать сбои в продакшене типовыми мерами SRE вместо долгих раскопок причин во время аварии. CX Codex +1 ★ 151звёзд репо anomaly-detection Скилл anomaly-detection находит аномалии во временных рядах из CSV, мониторинга облака и других источников. Автоматически выбирает алгоритм и параметры сглаживания, или работает по вашим настройкам. CX Codex +1 ★ 151звёзд репо investigation-entrypoint Скилл investigation-entrypoint расследования сбоев в Google Cloud Platform для Claude Code, Codex и Gemini CLI. Координирует диагностику GKE и Cloud Run при инцидентах. CX Codex +1 ★ 151звёзд репо postmortem-generator Скилл postmortem-generator для Claude Code собирает постмортем по инциденту: ведёт к таймлайну, action items и черновику Google Doc. Нужны данные расследования и root cause. CX Codex +1 ★ 151звёзд репо gcp-architecture-discovery Скилл gcp-architecture-discovery обходит GCP-проект от сбойного сервиса и собирает карту зависимостей: compute, сети, базы, бакеты. Результат кладёт в файлы, чтобы следующая сессия не начинала с нуля. CX Codex +1 ★ 151звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой