Mitigate first
Roll back, drain traffic or flip a flag before hunting for the root cause.
SRE book Ch 14An 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.
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).
The skill gives the agent the habits good SREs follow on every page, every change and every postmortem.
Roll back, drain traffic or flip a flag before hunting for the root cause.
SRE book Ch 14Every command comes with what it affects, whether it can be undone, and how. Risky ones are marked ⚠️.
Workbook Ch 9Gradual, observable, reversible. Binary and config pushes cause about 68% of outages.
Workbook App CRead-only checks first. Anything that writes to production waits for your yes.
Workbook Ch 9Checks that the user-facing signal recovered, and keeps what it saw apart from what it suspects.
SRE book Ch 12Asks what the system allowed, not who did it. Action items get owners and types.
SRE book Ch 15You don't have to say "SRE". The skill kicks in for any reliability or production-operations question.
five nineswith numbers.
What's missing to make this reliable?Every component checked for SLOs, monitoring, redundancy, deploy safety and backups.
A built-in calculator works out budgets and alert thresholds, so the agent doesn't guess.
Above 50% used with half the window left, the error budget policy asks for extra review and a canary on every change.
| Budget spent | Burn rate | Error ratio | Action |
|---|---|---|---|
| 2% in 1 h | 14.4× | > 1.44% | page |
| 5% in 6 h | 6.0× | > 0.6% | page |
| 10% in 3 d | 1.0× | > 0.1% | ticket |
Also: downtime, budget, requests, lowtraffic, and compose for chained or redundant services.
The agent fills these in for your system instead of inventing a format each time.
The skill uses the open Agent Skills format. Clone it once, then link it into each tool you use.
Every recommendation cites the chapter it comes from, so you can check the reasoning.
Google, 2016. The principles: risk, SLOs, monitoring, incidents, overload and data integrity.
Google, 2018. How to put them into practice: burn-rate alerting, canarying, on-call and postmortems.
Hands-on commands for Linux, networking, MySQL and message queues. CC BY 4.0.
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.
Tell us. Corrections from people who run production systems make the skill better for everyone.