slo-error-budget
Define, compute and review service level indicators, SLO targets and error budgets. Expresses availability, latency, correctness, freshness and throughput…
от Navinspire-ia★ 37 звёзд на GitHub
Установить slo-error-budget в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
SLO and Error Budget
Overview
This skill turns raw good and bad event counts into service level indicators, error budgets, burn rates and alert decisions, and writes the artifacts that make them operational: Prometheus rules, OpenSLO or Sloth specs, an error budget policy and a review report. The default posture is read-only and evidence-based: query the metrics, compute from exported buckets, show the formulas and the series used, and never load alert rules, change an SLO definition or a monitor on a target system without the user's explicit approval.
When it applies
- A team needs its first SLOs for a service, or wants to check whether an existing target matches reality.
- An on-call engineer or a release manager asks how much error budget is left and whether the current incident is burning it fast.
- Alerting must move from static thresholds to burn-rate alerts, or existing burn-rate alerts page too much or too late.
- SLO definitions must be expressed in OpenSLO, Sloth, Pyrra, Nobl9, Datadog or Grafana SLO, or migrated between them.
- A monthly SLO review or an error budget policy needs a report with the numbers and the decisions.
Hand over to observability-agent for the incident investigation itself and
to sre-incident-responder for incident command.
Engines and sources
Formulas
- SLI as a ratio:
good / totalover the window. Each SLI type is defined by what counts as good and what counts as total; the table inreferences/slo-review-template.mdgives the standard choices for availability, latency, correctness, freshness and throughput. - Error budget
B = 1 - target. Budget consumedC = (1 - SLI) / B; remaining1 - C. For 99.9% over 30 days the budget is 43.2 minutes of full outage. - Burn rate over a span
BR(w) = error_ratio(w) / B. Time to exhaustion at a constant burn iswindow / BR. - Multi-window alerts (Google SRE workbook): page at 14.4x over 1h with a 5m
short window (2% of the budget in one hour, exhaustion in 50 hours), page
at 6x over 6h with 30m (5%, 5 days), ticket at 3x over 1d with 2h (10%,
10 days), ticket at 1x over 3d with 6h (10%, 30 days). Both windows must
exceed the threshold. Derivations, detection times and low-traffic
adjustments:
references/burn-rate-alerts.md.
Prometheus
- Recording rules
slo:sli_error:ratio_rate<window>for 5m, 30m, 1h, 2h, 6h, 1d, 3d, built as1 - sum(rate(good[w])) / sum(rate(total[w]));slo:error_budget:remainingfromincrease(...[30d]). - Alert rules compare the long and short window series to
factor * budget. Validate withpromtool check rulesandpromtool test rules. - Latency SLIs use
http_request_duration_seconds_bucket{le="0.3"}over_count; the threshold must be an existing bucket boundary. - Historical buckets for offline computation come from
GET /api/v1/query_range?query=<good or total increase>&start=&end=&step=300on Prometheus, Thanos or Mimir, or from Grafana through theconnectorstool.
Spec and platform formats
- OpenSLO v1:
apiVersion: openslo/v1,kind: SLO,spec.service,spec.indicator.spec.ratioMetric.good|totalorthresholdMetric,spec.objectives[].target(0..1),spec.timeWindow[].durationandisRolling,spec.budgetingMethod,spec.alertPolicies. - Sloth:
version: prometheus/v1,slos[].objectivein percent,sli.events.error_queryandtotal_querywith{{.window}},alerting.page_alertandticket_alert;sloth validate -i slo.yml,sloth generate -i slo.yml -o rules.yml. - Pyrra
ServiceLevelObjectiveCRD, Nobl9sloctl, DatadogPOST /api/v1/sloandGET /api/v1/slo/{id}/history, Grafana SLO plugin API. Field tables and examples:references/openslo-sloth.md.
Navin integration
- Prometheus, Alertmanager, Sloth and Pyrra running in Kubernetes are read
through the
infratool at observe level (kubectl get prometheusrule,kubectl get servicelevelobjectives); applying generated rules is a prepare then execute operation that waits for approval. - Datadog and Grafana SLOs, Slack delivery of the report, GitHub pull request
with the rules: use the
connectorstool. DD_API_KEY,DD_APP_KEY,GRAFANA_TOKEN,NOBL9_CLIENT_SECRETstay in environment variables; report presence only.promtool,sloth,oslomissing: install with thetoolbeltskill.- Large
query_rangeexports and rule files are searched with thegreptool before being read.
Workflow
- Define the SLI with the user: service, user journey, good event, total
event, exclusions (health checks, 4xx, synthetic traffic). Write the two
PromQL selectors (or the equivalent query in the user's platform) and
confirm they exist with a
querycall at observe level. - Export history: run
query_rangeforincrease(good[5m])andincrease(total[5m])over at least the SLO window (30 days at a 5m step is 8640 buckets) and writetimestamp,good,totalCSV. Thir
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- examples/sli_buckets.csv
- examples/slo_spec.json
- references/burn-rate-alerts.md
- references/openslo-sloth.md
- references/slo-review-template.md
- scripts/burn_rate_rules.py
- scripts/error_budget.py
FAQ
Что делает скилл slo-error-budget?
Define, compute and review service level indicators, SLO targets and error budgets. Expresses availability, latency, correctness, freshness and throughput SLIs as good over total events, computes budget consumed and remaining over rolling or calendar windows, burn rates over 1h, 6h, 1d and 3d, and evaluates the Google SRE multi-window burn-rate alerts. Generates Prometheus recording and alert rules, reads and writes OpenSLO v1 and Sloth specs, maps to Pyrra, Nobl9, Datadog SLOs and Grafana SLO, and produces error budget policies and SLO review reports. Use when the user asks to "define an SLO for this service", "how much error budget is left", "set up burn rate alerts", "generate Prometheus rules for my SLO", "convert this to OpenSLO", or when a reliability review or release freeze decision needs numbers. In French "calculer le budget d'erreur", "definir des SLO", "alertes de burn rate".
Как установить скилл slo-error-budget?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл slo-error-budget запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…