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
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sreWhat 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-projectand 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@sreThis 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-code3Manually: put the files in place
~/.claude/skills/gcp-slo-management/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gcp-slo-management/
1Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-slo-management -a codex2Manually: put the files in place
.agents/skills/gcp-slo-management/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-slo-management -a cursor2Manually: put the files in place
.cursor/skills/gcp-slo-management/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install gemini-cli-extensions/sre skills/gcp-slo-management2Manually: put the files in place
.github/skills/gcp-slo-management/SKILL.md1Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-slo-management -a gemini-cli2Platform CLI
gemini skills install https://github.com/gemini-cli-extensions/sre --path skills/gcp-slo-managementManually: put the files in place
.devin/skills/gcp-slo-management/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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