Skip to main content
skill CX Codex

gcp-slo-management — Claude Code skill: what it does, how to install

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.

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 gcp-slo-management does

This skill gives the agent a way to work with SLOs in Google Cloud Monitoring: list the services in a project, show the objectives already attached to them, create new ones for availability or latency. It exists because gcloud ships no command for creating an SLO, so the job goes through the Monitoring REST API instead.

A bundled script handles discovery: python3 skills/gcp-slo-management/scripts/discovery.py <PROJECT_ID> prints a table of display names and service IDs. Every objective hangs off a service, so take the ID there first, then POST JSON with curl to the serviceLevelObjectives endpoint, carrying a bearer token from gcloud auth application-default print-access-token. The body holds displayName, goal, rollingPeriod and a basicSli block.

Services that discovery misses need a requestBased or windowBased SLI with metric filters you write yourself. A latency objective adds a latency threshold inside basicSli. The account needs roles/monitoring.editor — a 403 means the role or the application-default login is missing.

What it helps with

  • find the service ID before creating an SLO
  • create a 99% availability objective over a 7-day window
  • list the SLOs already attached to a service
  • write a metric-filtered SLI for a service discovery missed
  • add a latency threshold to an objective

Example prompts for the agent

  • List the services in my-project and show me their service IDs.
  • Create a 99% availability SLO over 7 days for service wl:abc123.
  • Why does creating an SLO come back with 403?

How to install gcp-slo-management

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 gcp-slo-management -a claude-code

3Manually: put the files in place

~/.claude/skills/gcp-slo-management/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gcp-slo-management/

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

Questions about gcp-slo-management

How do I install gcp-slo-management in Claude Code?

Through the marketplace: run /plugin marketplace add gemini-cli-extensions/sre, then /plugin install sre-extension@sre.

What does gcp-slo-management do?

It discovers Google Cloud Monitoring services, lists their SLOs and creates availability or latency objectives through the Monitoring REST API.

What permissions are needed to create an SLO?

The account needs roles/monitoring.editor and a completed gcloud auth application-default login. Otherwise the API call returns 403.

Source text

SKILL.md · Apache-2.0
---
name: gcp-slo-management
description: 🐉 Manage Service Level Objectives (SLOs) on Google Cloud. Use when you need to discover Monitoring Services, list existing SLOs, or create new SLOs (Availability/Latency) via the REST API when gcloud commands are unavailable.
metadata:
  author: Google
  version: 0.1.0
  status: published
---

# GCP SLO Management

## Overview

This skill enables the discovery and management of SLOs in Google Cloud Monitoring. Since `gcloud` lacks native SLO creation commands, this skill leverages the Monitoring REST API and a bundled discovery script.

## Core Pattern

### 1. Discover Services
Every SLO must be attached to a **Service**. Use the discovery script to find the correct `Service ID`.
- **Command**: `python3 skills/gcp-slo-management/scripts/discovery.py <PROJECT_ID>`
- **Output**: A table showing `Display Name` and `Service ID`.

### 2. Create an SLO
Use `curl` to POST a JSON definition to the service.

#### Example: 99% Availability (7-day rolling)
```bash
# Set variables
PROJECT_ID="your-project"
SERVICE_ID="wl:..." # From step 1
TOKEN=$(gcloud auth application-default print-access-token)

curl -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  "https://monitoring.googleapis.com/v3/projects/$PROJECT_ID/services/$SERVICE_ID/serviceLevelObjectives" \
  -d '{
    "displayName": "99% Availability - Last 7 Days",
    "goal": 0.99,
    "rollingPeriod": "604800s",
    "serviceLevelIndicator": {
      "basicSli": {
        "availability": {}
      }
    }
  }'
```

## Advanced Patterns

- **Custom Services**: For services not automatically discovered (e.g., frontend logs), you must use `requestBased` or `windowBased` SLIs with specific metric filters.
- **Latency SLOs**: Requires defining a `latency` threshold within `basicSli`.

## Troubleshooting
- **403 Forbidden**: Ensure you have run `gcloud auth application-default login` and that your account has `roles/monitoring.editor`.
- **Service Not Found**: Use the discovery script to verify the `Service ID` exists in the target project.

© Google · Apache-2.0 · gemini-cli-extensions/sre

Similar skills

All skills for Cloud: AWS, Azure, GCP →
google-cloud-slo-alert-configuration official google google-cloud-slo-alert-configuration configures PromQL-based SLO alerts in Google Cloud and generates Terraform. Use it when you need service-level monitoring for App Hub or individual resources. CX Codex +1 4,300installs observability-monitoring-slo-implement sickn33 observability-monitoring-slo-implement is a Claude Code skill for defining SLI and SLO targets, setting error budgets, and planning reliability monitoring tied to product priorities. CX Codex +1 ★ 50,109repo stars slo Son Nguyen slo is a Claude Code command that fetches agent reliability metrics from a local monitor and checks completion, tool success, and error rates against default targets. CX Codex +1 ★ 1,198repo stars dt-obs-gcp Dynatrace dt-obs-gcp — a skill for Claude Code, Codex, Cursor, GitHub Copilot, and Gemini CLI that queries GCP resources via Dynatrace Smartscape and DQL. Covers Compute Engine, GKE, Cloud Run, Pub/Sub, VPC, IAM, and Secret Manager. CX Codex +1 2,300installs observability-cloud-planning WHOISABHISHEKADHIKARI observability-cloud-planning is a Claude Code skill that plans cloud services, monitoring, and incident readiness. It responds to requests about SLOs, alert owners, cloud budgets, or service choices. CX Codex +1 ★ 85repo stars observability-service-reliability elastic observability-service-reliability guides you from picking an SLI to running SLOs in Elastic Observability through the Kibana API. Useful when alerts are noisy and the error budget does not add up. CX Codex +1 1,500installs

From the same set17

The whole set →
gcp-setup The gcp-setup skill checks and aligns identities across gcloud, Application Default Credentials, and kubectl at the start of your session. Use it to ensure all three systems authenticate as the same user before you begin working with GCP. CX Codex +1 ★ 151repo stars data-ingestion data-ingestion collects time-series points from CSV files or metric backends and converts them into standardized JSON. CX Codex +1 ★ 151repo stars cloud-logging Skill for analyzing Google Cloud Logging and Error Reporting. Processes large JSON logs from GCP and converts them to Apache format for efficient analysis. 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 cloud-monitoring Interacts with Google Cloud Monitoring through MCP, rendering ASCII sparklines and concise CSV summaries to prevent context bloat. 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

Project sponsors

Companies that keep this analytics open