agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when establishing reliability practice. Covers SLOs and error budgets, capacity planning, graceful degradation, load shedding, retry and timeout policy, and the arithmetic of availability.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill site-reliability --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/site-reliabilityContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when establishing reliability practice. Covers SLOs and error budgets, capacity planning, graceful degradation, load shedding, retry and timeout policy, and the arithmetic of availability.
name: site-reliability description: Use when establishing reliability practice. Covers SLOs and error budgets, capacity planning, graceful degradation, load shedding, retry and timeout policy, and the arithmetic of availability. metadata: category: devops version: 1.0.0 tags: [sre, slo, reliability, resilience, capacity]
Make reliability a measured, budgeted property rather than an aspiration. Perfect availability is neither achievable nor desirable — the goal is to be exactly as reliable as the product requires, and to spend the remaining budget on shipping.
1. **Pick SLIs the user would recognize** — Request success rate and latency for the operations that matter. Not internal metrics. 2. **Set the SLO from the business need** — 99.9% is 43 minutes of downtime per month. 99.99% is 4 minutes, and costs roughly ten times as much to achieve. Choose knowingly. 3. **Do the dependency arithmetic** — A service depending synchronously on four services, each at 99.9%, has a ceiling of 99.6%. If your SLO is higher than your dependency chain permits, the design must change, not the target. 4. **Design the degradation** — For each dependency: what does the user see when it is down? Serve stale, serve partial, or fail fast with a clear message. Decide in advance. 5. **Bound the retries** — A retry budget, not unlimited retries. Retries during a partial outage are what turn it into a total one. 6. **Shed load deliberately** — Under overload, reject the excess at the edge, cheaply. A system that accepts everything and times out serves nobody.
**Availability arithmetic, done before the SLO is promised:**
Checkout depends synchronously on:
auth 99.95%
inventory 99.9%
pricing 99.9%
payments 99.9% (third party, contractual)
Serial availability = 0.9995 x 0.999 x 0.999 x 0.999 = 99.65%
Maximum achievable checkout SLO: 99.65% (~2.5 hours downtime/month)
A 99.9% checkout SLO is therefore unachievable with this design.
Options:
1. Make pricing non-critical: cache prices, serve the last known good
on failure. -> removes 0.1%
2. Make inventory non-critical: accept the order, verify asynchronously,
cancel with an apology on the rare failure. -> removes 0.1%
3. Accept 99.6% and stop promising 99.9%.
Chosen: (1) and (3). Inventory remains critical because overselling is
worse than a failed checkout.**Retry budget that refuses to amplify an outage:**
class RetryBudget:
"""Allow retries only while they are a small fraction of total traffic.
During a broad outage every request fails, so an unbudgeted retry policy
triples the load on an already-failing dependency. The budget stops that.
"""
def __init__(self, ratio: float = 0.1, window: timedelta = timedelta(seconds=10)):
self.ratio = ratio
self.requests = SlidingWindowCounter(window)
self.retries = SlidingWindowCounter(window)
def allow_retry(self) -> bool:
total = self.requests.count()
if total < 20: # too little data; permit
return True
return self.retries.count() < total * self.ratioA curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…