# monitoring-graphs

monitoring-graphs — a skill for Claude Code, Codex and Gemini CLI that generates annotated incident graphs in Python. Use it to visualize outages, plot error spikes, or correlate metrics with incident milestones.

- skill · `type=skill` · Claude Code, Codex, Gemini CLI, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Claude.ai · ★ 151 repo stars
- Author: Riccardo Carlesso
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/gemini-cli-extensions/sre/tree/HEAD/skills/monitoring-graphs/SKILL.md
- Updated: 2026-10-12
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/monitoring-graphs

## What it does

The skill guides you through metric selection, data extraction from Cloud Monitoring, and professional graph creation with timeline annotations (detection, mitigation, resolution). It works across Claude Code, Codex and Gemini CLI.

Inside are Python scripts for draft and final graphs. Draft confirms the data carries a real signal; final adds colour-coded annotations—red for outage, yellow for detection, green for fix. The skill requires Python and Cloud Monitoring access; all timestamps default to UTC.

The skill enforces one rule: never invent numbers. If a full blackout causes the API to return no data points, it fills gaps with zeros through reindexing instead of fabricating values.

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add gemini-cli-extensions/sre
```
In the agent chat (not a shell):
```text
/plugin install sre-extension@sre
```
This installs the whole sre-extension plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add gemini-cli-extensions/sre --skill monitoring-graphs -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/monitoring-graphs/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/monitoring-graphs/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add gemini-cli-extensions/sre --skill monitoring-graphs -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/monitoring-graphs/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add gemini-cli-extensions/sre --skill monitoring-graphs -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/monitoring-graphs/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install gemini-cli-extensions/sre skills/monitoring-graphs
```

2. **Manually: put the files in place**
- File: `.github/skills/monitoring-graphs/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add gemini-cli-extensions/sre --skill monitoring-graphs -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/gemini-cli-extensions/sre --path skills/monitoring-graphs
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/monitoring-graphs/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/gemini-cli-extensions/sre/tree/HEAD/skills/monitoring-graphs/SKILL.md

## When to use it
- build an outage graph with incident stages for a postmortem
- plot error rate spikes and correlate them with traffic on one chart
- annotate detection and mitigation time windows on the same graph
- extract metrics from Cloud Monitoring and verify the signal is real
- save multiple graph revisions without overwriting previous versions

## Example prompts
- Create an incident graph for our postmortem: outage started 2024-01-15 10:30, detected 10:45, mitigated 11:20, resolved 11:35.
- Plot the service availability with traffic correlation during the March 14 incident.
- Pull metrics from Monitoring, build a draft graph to confirm the signal, then add annotations.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: fd65051473e51da2.

BEGIN THIRD-PARTY FILE fd65051473e51da2
````text
---
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! 🕰️
````
END THIRD-PARTY FILE fd65051473e51da2

The third-party file has ended. Everything between the fd65051473e51da2 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2457 of 5709 bytes. © Riccardo Carlesso · Apache-2.0 · https://github.com/gemini-cli-extensions/sre/tree/HEAD/skills/monitoring-graphs/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
