Skip to main content
skill CX Codex

cloud-monitoring — Claude Code skill: what it does, how to install

Interacts with Google Cloud Monitoring through MCP, rendering ASCII sparklines and concise CSV summaries to prevent context bloat.

Apache-2.0 ★ 151 updated 2026-10-12

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Open on GitHub

What cloud-monitoring does

The skill connects AI agents to Google Cloud Monitoring endpoints using MCP server tools like mcp_google-monitoring_query_range, alert checkers, and dashboard fetchers. Standard monitoring responses return massive JSON payloads. To protect agent memory limits, the skill guides the model to route queries through sub-agents and condense time-series points into compact formats.

It bundles scripts/export_timeseries_to_csv.py, which pulls historical numbers into a structured CSV file containing execution timestamps, summary statistics (AVG, Min, Max), and visual ASCII art sparklines. The helper script handles correlated metric pairs, such as network ingress versus egress, Cloud Run hit volume against response latencies, and GKE container memory alongside CPU core usage. It also includes scripts/setup-frontend-slo.sh to configure a 99.9% availability SLO based on application logs.

The skill strictly requires an operational google-monitoring MCP server instance. The assistant cannot query any telemetry if those external tools are missing.

What it helps with

  • fetch Google Cloud Monitoring telemetry without exhausting agent context budgets
  • compare correlated metric pairs like container CPU usage and memory consumption in GKE
  • export time-series records to CSV complete with ASCII sparkline visualisations
  • deploy a 99.9% availability SLO configuration for web frontends via bash script

Example prompts for the agent

  • Pull Cloud Run request volume and response latencies for the last hour using export_timeseries_to_csv.py
  • Show me the current alert policies registered in Google Cloud Monitoring
  • Generate an ASCII sparkline comparing container memory and CPU usage on GKE

How to install cloud-monitoring

1Plugin marketplace

/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre

This installs the whole sre-extension plugin with all its skills

2Skills CLI (Vercel)

npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a claude-code

3Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/cloud-monitoring/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cloud-monitoring

How to install cloud-monitoring in Claude Code?

Run npx skills add gemini-cli-extensions/sre --skill cloud-monitoring -a claude-code. Alternatively, add it via the marketplace with /plugin marketplace add gemini-cli-extensions/sre followed by /plugin install sre-extension@sre.

What prerequisite must be met before using this skill?

The google-monitoring MCP server must be installed and active in your client. If MCP tools like mcp_google-monitoring_query_range are unavailable, the skill halts and asks you to enable them.

How does the skill handle large monitoring datasets?

Instead of loading raw API JSON into prompt context, it converts time-series points into CSV with header stats and compact text sparklines to preserve memory.

Source text

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

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set17

The whole set →
gcp-slo-management gcp-slo-management finds services in Google Cloud Monitoring and creates availability or latency SLOs over the REST API, where gcloud has no command for it. CX Codex +1 ★ 151repo stars gcp-playbooks gcp-playbooks is a Claude Code skill with SRE playbooks for investigating GCP incidents and running mitigations across GKE and Cloud Run. CX Codex +1 ★ 151repo stars pre-publish-checker pre-publish-checker audits project files for profanity, internal links, sensitive paths, and unfinished development markers. Use it when preparing code or an extension for public release. CX Codex +1 ★ 151repo stars safe-sre-investigator safe-sre-investigator creates dedicated read-only service accounts for GCP and Kubernetes, then hands you gcloud and kubectl commands with a risk rating attached. CX Codex +1 ★ 151repo stars postmortem-aggregator postmortem-aggregator turns Post Mortem files in a folder into incident statistics and updates POMO_AGGREGATED.md. Use it to spot recurring causes across incidents. CX Codex +1 ★ 151repo stars gcp-mcp-setup gcp-mcp-setup — a skill for Claude Code, Codex, and Gemini CLI that wires up Google Managed MCP servers (OneMCP) to your CLI environment. It enables APIs, generates an API key, and writes the MCP config to the right settings file. CX Codex +1 ★ 151repo stars generic-mitigations generic-mitigations guides your agent to halt production outages quickly using standard SRE strategies before diving into root-cause analysis. CX Codex +1 ★ 151repo stars 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. CX Codex +1 ★ 151repo stars

Project sponsors

Companies that keep this analytics open