Runbook Generator Skill
Generate operational runbooks for alerts, deployments, and common procedures.
Trigger Conditions
- •New alert rule created
- •New service deployed
- •User invokes with "generate runbook" or "create runbook"
Input Contract
- •Required: Alert definition or service context
- •Required: Expected failure mode or procedure
- •Optional: Historical incident data, existing runbooks
Output Contract
- •Runbook document with step-by-step procedures
- •Diagnostic commands and expected outputs
- •Escalation contacts and criteria
- •Verification steps
Tool Permissions
- •Read: Alert configs, service configs, monitoring dashboards, logs
- •Write: Runbook documents in
docs/runbooks/ - •Search: Similar alerts and past incidents
Execution Steps
- •Analyze the alert or service requiring a runbook
- •Identify likely failure modes and diagnostic steps
- •Write step-by-step mitigation procedures
- •Include diagnostic commands with expected outputs
- •Define escalation criteria and contacts
- •Add verification steps to confirm resolution
- •Link runbook to alert configuration
Success Criteria
- •Runbook covers the most common failure scenarios
- •Each step has a concrete command or action
- •Escalation path defined
- •Runbook linked to its corresponding alert
Escalation Rules
- •Escalate if the runbook requires infrastructure access not available to on-call
- •Escalate if the failure mode has no known mitigation
Example Invocations
Input: "Generate a runbook for the 'payment-service-high-error-rate' alert"
Output: Runbook: 1) Check error logs (kubectl logs -l app=payment-service --since=5m), 2) Verify upstream dependencies (curl health endpoints), 3) Check recent deploys (gh run list --limit 5), 4) If deploy-related: rollback (kubectl rollout undo), 5) If dependency-related: check circuit breaker status, 6) Escalate to payments-team if unresolved in 15min.