sre-expert
БесплатноБез исполняемых скриптовНе проверенExpert-level site reliability engineering, SLOs, incident management, and operational excellence. Use when the user mentions reliability, monitoring, incident…
от personamanagmentlayer★ 46 звёзд на GitHubОб этом скилле
Site Reliability Engineering Expert
Expert guidance for SRE practices, reliability engineering, SLOs/SLIs, incident management, and operational excellence.
Core Concepts
SRE Fundamentals
- Service Level Objectives (SLOs)
- Service Level Indicators (SLIs)
- Error budgets
- Toil reduction
- Monitoring and alerting
- Capacity planning
Reliability Practices
- Incident management
- Post-incident reviews (PIRs)
- On-call rotations
- Chaos engineering
- Disaster recovery
- Change management
Automation
- Infrastructure as Code
- Configuration management
- Deployment automation
- Self-healing systems
- Runbook automation
- Automated remediation
SLO/SLI Management
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import List, Dict
import numpy as np
@dataclass
class SLI:
"""Service Level Indicator"""
name: str
description: str
query: str
unit: str # 'percentage', 'milliseconds', etc.
@dataclass
class SLO:
"""Service Level Objective"""
name: str
sli: SLI
target: float
window_days: int
class SLOTracker:
"""Track and manage SLOs"""
def __init__(self):
self.slos: Dict[str, SLO] = {}
self.measurements: Dict[str, List[Dict]] = {}
def define_slo(self, slo: SLO):
"""Define a new SLO"""
self.slos[slo.name] = slo
self.measurements[slo.name] = []
def record_measurement(self, slo_name: str, value: float, timestamp: datetime):
"""Record SLI measurement"""
if slo_name in self.slos:
self.measurements[slo_name].append({
'value': value,
'timestamp': timestamp
})
def calculate_slo_compliance(self, slo_name: str) -> Dict:
"""Calculate SLO compliance"""
slo = self.slos.get(slo_name)
if not slo:
return {}
measurements = self.measurements.get(slo_name, [])
window_start = datetime.now() - timedelta(days=slo.window_days)
recent_measurements = [
m for m in measurements
if m['timestamp'] > window_start
]
if not recent_measurements:
return {'status': 'no_data'}
values = [m['value'] for m in recent_measurements]
actual = np.mean(values)
return {
'slo_name': slo_name,
'target': slo.target,
'actual': actual,
'compliant': actual >= slo.target,
'window_days': slo.window_days,
'sample_count': len(recent_measurements)
}
def calculate_error_budget(self, slo_name: str) -> Dict:
"""Calculate remaining error budget"""
compliance = self.calculate_slo_compliance(slo_name)
if compliance.get('status') == 'no_data':
return {'status': 'no_data'}
target = compliance['target']
actual = compliance['actual']
error_budget_target = 100 - target
errors_actual = 100 - actual
remaining = error_budget_target - errors_actual
remaining_pct = (remaining / error_budget_target) * 100 if error_budget_target > 0 else 100
return {
'slo_name': slo_name,
'error_budget_target': error_budget_target,
'errors_actual': errors_actual,
'remaining': remaining,
'remaining_percentage': remaining_pct,
'exhausted': remaining < 0
}
# Example SLOs
def define_standard_slos() -> List[SLO]:
"""Define standard SLOs for a web service"""
return [
SLO(
name="api_availability",
sli=SLI(
name="availability",
description="Percentage of successful requests",
query="sum(rate(http_requests_total{code!~'5..'}[5m])) / sum(rate(http_requests_total[5m])) * 100",
unit="percentage"
),
target=99.9,
window_days=30
),
SLO(
name="api_latency",
sli=SLI(
name="latency_p95",
description="95th percentile latency",
query="histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))",
unit="seconds"
),
target=0.5, # 500ms
window_days=30
)
]
Incident Management
from enum import Enum
from datetime import datetime
from typing import List, Optional
class Severity(Enum):
SEV1 = "sev1" # Critical
SEV2 = "sev2" # High
SEV3 = "sev3" # Medium
SEV4 = "sev4" # Low
class IncidentStatus(Enum):
INVESTIGATING = "investigating"
IDENTIFIED = "identified"
MONITORING = "monitoring"
RESOLVED = "resolved"
@dataclass
class Incident:
incident_id: str
title: str
severity: Severity
status: IncidentStatus
started_at: datetime
detected_at: datetime
resolved_at: Optional[datetime]
incident_commander: str
respo
Установить sre-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBash(python:*, python3:*, pip:*, pytest:*)FAQ
Что делает скилл sre-expert?
Expert-level site reliability engineering, SLOs, incident management, and operational excellence. Use when the user mentions reliability, monitoring, incident management, SLOs, or observability, or when the task involves SRE Fundamentals, Reliability Practices, SRE Principles, or On-Call.
Как установить скилл sre-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sre-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub