Get the FREE Ultimate OpenClaw Setup Guide →

runbook-creation

npx machina-cli add skill BagelHole/DevOps-Security-Agent-Skills/runbook-creation --openclaw
Files (1)
SKILL.md
1.8 KB

Runbook Creation

Create effective operational runbooks and procedures.

Runbook Structure

# Runbook: [Service/Process Name]

## Overview
Brief description of the service and runbook purpose.

## Prerequisites
- Required access
- Tools needed
- Knowledge required

## Procedure
Step-by-step instructions with commands.

## Verification
How to confirm success.

## Rollback
Steps to undo if needed.

## Escalation
When and how to escalate.

## Related Runbooks
Links to related procedures.

Example Runbook

# Runbook: Database Failover

## Overview
Procedure to failover PostgreSQL to replica.

## Prerequisites
- [ ] DBA access to primary and replica
- [ ] VPN connected
- [ ] Slack channel #db-ops open

## Procedure

### 1. Verify Replica Status
\`\`\`bash
psql -h replica -c "SELECT pg_is_in_recovery();"
# Should return 't'
\`\`\`

### 2. Stop Application Writes
\`\`\`bash
kubectl scale deployment app --replicas=0
\`\`\`

### 3. Promote Replica
\`\`\`bash
psql -h replica -c "SELECT pg_promote();"
\`\`\`

### 4. Update DNS
\`\`\`bash
aws route53 change-resource-record-sets ...
\`\`\`

## Verification
- [ ] Application connects to new primary
- [ ] No replication lag errors
- [ ] Transactions completing

## Escalation
If issues persist after 15 minutes, escalate to:
- Primary: @dba-lead
- Secondary: @platform-oncall

Best Practices

  • Keep procedures simple and clear
  • Include verification steps
  • Test runbooks regularly
  • Version control runbooks
  • Include troubleshooting tips

Source

git clone https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/compliance/continuity/runbook-creation/SKILL.mdView on GitHub

Overview

This skill helps you craft structured, actionable runbooks and standard operating procedures. It emphasizes documenting troubleshooting guides and recovery steps so teams can resolve outages quickly and consistently.

How This Skill Works

Develop a per-service Runbook using the defined sections: Overview, Prerequisites, Procedure, Verification, Rollback, Escalation, and Related Runbooks. Documents are written in Markdown, include step-by-step commands, checks, and rollback paths, and are kept in version control for auditing and updates.

When to Use It

  • Documenting a new service's operational knowledge for future reference
  • Outages or incidents that require a repeatable resolution procedure
  • Disaster recovery planning and failover testing
  • Onboarding new operators who need SOPs and standard steps
  • Change management and versioned procedure updates

Quick Start

  1. Step 1: Define the Runbook name and the service or process it covers.
  2. Step 2: Fill in the sections (Overview, Prerequisites, Procedure, Verification, Rollback, Escalation).
  3. Step 3: Save to Markdown and add to version control; test the runbook.

Best Practices

  • Keep procedures simple and clear
  • Include verification steps
  • Test runbooks regularly
  • Version control runbooks
  • Include troubleshooting tips

Example Use Cases

  • Database Failover Runbook: Overview and steps to failover PostgreSQL to replica, including verifying replica status, stopping writes, promoting the replica, and updating DNS; verification and escalation steps are documented.
  • Runbook Template for a Service: Use the Runbook Structure (Overview, Prerequisites, Procedure, Verification, Rollback, Escalation, Related Runbooks) to document any service.
  • Web Service Restart Runbook: Steps to safely restart a web service with minimal downtime, including checks, restart commands, verification, and rollback.
  • Backup Restoration Runbook: Procedures to identify the latest backup, perform restore, verify integrity, and switch traffic or resume operations.
  • Incident Escalation Runbook: Guidelines for detecting incidents, paging on-call, escalating to primary and secondary contacts, and logging for post-incident review.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers