# SLO 落地实施 (slo-implementation)

> 定义 SLI 和 SLO，计算错误预算并制定预算策略，用 Prometheus 记录规则、燃烧率告警和 Grafana 仪表盘落地。

- 分类: [监控与运维](https://www.myskills.tools/zh/categories/monitoring-ops/)
- 来源: 社区 · Seth Hobson
- 代码仓库: https://github.com/wshobson/agents/tree/main/plugins/observability-monitoring/skills/slo-implementation (commit 156b7a5)
- SKILL.md: https://github.com/wshobson/agents/blob/main/plugins/observability-monitoring/skills/slo-implementation/SKILL.md
- 安装命令: `npx skills add wshobson/agents --skill slo-implementation`
- 许可证: MIT
- 兼容工具: Claude Code, Codex, Cursor, Copilot, OpenCode
- 权限: read-repo ✓, write-files ✓, shell ✗, network ✗
- 状态: 扫描通过
- 规则扫描无法覆盖所有风险，安装前请阅读此技能的 SKILL.md，确认权限后再使用。

## 核心规则

错误预算等于 1 减去 SLO 目标，剩余预算决定变更节奏，耗尽时冻结功能开发。

## 执行阶段

1. **定义 SLI** — 用 PromQL 将可用性、延迟、持久性等指标表示为成功事件与总事件之比。
2. **设定 SLO 目标** — 结合用户预期、业务需求、当前表现和可靠性成本，选定目标值和统计窗口（如 28 天）。
3. **错误预算策略** — 计算错误预算，并规定剩余 50%、10%、0% 时分别推迟风险变更、冻结非关键变更或冻结功能。
4. **规则、告警与看板** — 编写 Prometheus 记录规则和快慢两档燃烧率告警，并在 Grafana 中展示合规率、剩余预算和趋势。

## 权限说明（据 SKILL.md 整理）

| 能力 | 是否需要 | 说明 |
|---|---|---|
| 文件写入 | 需要 | 编写 SLO 定义、Prometheus 记录与告警规则、错误预算策略和 Grafana 仪表盘配置。 |
| 命令执行 | 不需要 | 这是框架与模板参考，未要求运行任何命令。 |
| 网络外发 | 不需要 | 未要求访问 Prometheus、Grafana 或其他外部服务。 |

## SKILL.md 头部信息（YAML）

```yaml
---
name: slo-implementation
description: Define and implement Service Level Indicators (SLIs) and Service Level Objectives (SLOs) with error budgets and alerting. Use when establishing reliability targets, implementing SRE practices, or measuring service performance.
---
```

首页: https://www.myskills.tools/zh/ · URL: https://www.myskills.tools/zh/skills/slo-implementation/
