sre
v1.0.0 · open source · MIT / CC BY 4.0

Give your AI agent an SRE's judgment.

An open-source Agent Skill that makes coding agents work like a careful, experienced Site Reliability Engineer: mitigate first, know the blast radius, and back every recommendation with real numbers.

git clone https://github.com/prakhar-mathur4/sre-skills.git ~/sre-skill

Works with Claude Code, Codex, Cursor, GitHub Copilot, Antigravity and Gemini CLI.

on-call · orders-api

orders-api p99 is 4s and MySQL replica lag is 900s and climbing. What do I do right now?

Mitigate first. Users are hurting now; root cause can wait.

1. Check what changed in the last hour (deploys, config, cron jobs).

2. If a deploy lines up, roll it back.

⚠️ Rollback touches all pods. Reversible: redeploy v2.3.

3. Read-only checks while that runs:

SHOW PROCESSLIST; SHOW REPLICA STATUS\G

⚠️ To stop a runaway query, use KILL QUERY <id>,

not KILL; it keeps the connection. Confirm first?

✓ Verify: p99 back under the 300 ms SLO for 15 min,

lag trending down. Then declare mitigated.

Error budget used so far: 62% (28-day window).

How it behaves

Safe to have near production.

The skill gives the agent the habits good SREs follow on every page, every change and every postmortem.

Mitigate first

Roll back, drain traffic or flip a flag before hunting for the root cause.

SRE book Ch 14

Know the blast radius

Every command comes with what it affects, whether it can be undone, and how. Risky ones are marked ⚠️.

Workbook Ch 9

Change safely

Gradual, observable, reversible. Binary and config pushes cause about 68% of outages.

Workbook App C

Confirm before acting

Read-only checks first. Anything that writes to production waits for your yes.

Workbook Ch 9

Verify, don't assume

Checks that the user-facing signal recovered, and keeps what it saw apart from what it suspects.

SRE book Ch 12

Blameless, always

Asks what the system allowed, not who did it. Action items get owners and types.

SRE book Ch 15
What it does

From the first page to the postmortem.

You don't have to say "SRE". The skill kicks in for any reliability or production-operations question.

Live incidents
Latency, 5xx, CPU, disk, DNS, TCP, MySQL replication lag, Kafka backlogs. Mitigation first, then read-only triage.
SLOs and budgets
SLIs based on what users feel, realistic targets, and a written error budget policy. Pushes back on five nines with numbers.
Alerting
Multiwindow burn-rate pages instead of CPU alerts, ticket tiers, and options for low-traffic services. Prometheus rules included.
Gap reviews
What's missing to make this reliable? Every component checked for SLOs, monitoring, redundancy, deploy safety and backups.
Postmortems
Blameless write-ups from messy notes: UTC timeline, trigger separated from causes, owned and typed action items.
Rollouts
Canary plans with a concurrent control group, abort criteria and rollback. Config gets the same care as code.
Capacity
Machines, disk and network estimated with real numbers, N+2 headroom, and what happens when each failure domain dies.
Teams
On-call sizing, toil budgets, pager load reviews, and how SRE works with dev teams.
Real numbers

Math, not vibes.

A built-in calculator works out budgets and alert thresholds, so the agent doesn't guess.

Checkout API · 99.9% SLO

28-day window
62.0% used15.3 min left
Allowed
40.3 min
Down so far
25.0 min
Achieved
99.938%

Above 50% used with half the window left, the error budget policy asks for extra review and a canary on every change.

Burn-rate alerts for 99.9%sre_calc.py burn 99.9 --window-days 30
Budget spentBurn rateError ratioAction
2% in 1 h14.4×> 1.44%page
5% in 6 h6.0×> 0.6%page
10% in 3 d1.0×> 0.1%ticket

Also: downtime, budget, requests, lowtraffic, and compose for chained or redundant services.

Install

One folder. Any agent.

The skill uses the open Agent Skills format. Clone it once, then link it into each tool you use.

Sources

Built on field-tested practice.

Every recommendation cites the chapter it comes from, so you can check the reasoning.

Site Reliability Engineering

Google, 2016. The principles: risk, SLOs, monitoring, incidents, overload and data integrity.

The Site Reliability Workbook

Google, 2018. How to put them into practice: burn-rate alerting, canarying, on-call and postmortems.

LinkedIn School of SRE

Hands-on commands for Linux, networking, MySQL and message queues. CC BY 4.0.

Personal experience

How the rules, templates and safety habits play out in real teams and real incidents.

No book text is included. Both books can be read free online at sre.google/books. This project isn't affiliated with or endorsed by Google, O'Reilly or LinkedIn.

Found advice a real SRE wouldn't give?

Tell us. Corrections from people who run production systems make the skill better for everyone.