[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FB1EGZ49H61250F4PJ7VTP":3,"skill-same:01M6FB1EGZ49H61250F4PJ7VTP":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":28,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":61,"install":62,"resources":75},"01M6FB1EGZ49H61250F4PJ7VTP","runbook-creation",null,"Create operational runbooks and standard operating procedures. Document troubleshooting guides and recovery procedures. Use when documenting operational knowledge.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-runbook-creation\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"runbook creation","runbook","creation","devops","2026","apply","runbooks","controls","guides","operating","main","community","document","agent-skills","safe","use","knowledge","recovery","devops-security","license","framework","create","change","security","github","2026-11-10 10:12:30",false,"---\nname: runbook-creation\ndescription: Create operational runbooks and standard operating procedures. Document\n  troubleshooting guides and recovery procedures. Use when documenting operational\n  knowledge.\ncategory: security\nrisk: safe\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Checklist and framework guidance; no privileged tooling required. Apply\n  controls through your own change process.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Runbook Creation\n\nCreate effective operational runbooks, standard operating procedures, and\ntroubleshooting guides that any on-call engineer can follow under pressure.\n\n## Runbook Template — Full Structure\n\n````markdown\n# Runbook: [Service \u002F Process Name]\n\n**Owner:** [Team or individual]\n**Last Reviewed:** YYYY-MM-DD\n**Version:** X.Y\n**Severity if unavailable:** SEV[1-4]\n\n---\n\n## Overview\n\nBrief description of the service, why this runbook exists, and when to\nuse it.\n\n## Prerequisites\n\n- [ ] Required access \u002F IAM role: [details]\n- [ ] Tools installed: [kubectl, aws-cli, psql, etc.]\n- [ ] VPN connected to [environment]\n- [ ] Communication channel open: [Slack #channel]\n\n## Procedure\n\n### Step 1 — [Action Name]\n\n[Explanation of what this step does and why.]\n\n```bash\n# command here\n```\n\n**Expected output:** [describe what success looks like]\n\n### Step 2 — [Action Name]\n\n```bash\n# command here\n```\n\n**Expected output:** [description]\n\n*(Continue with numbered steps...)*\n\n## Verification\n\nHow to confirm the procedure succeeded:\n\n- [ ] [Check 1 — e.g., health endpoint returns 200]\n- [ ] [Check 2 — e.g., no errors in logs for 5 minutes]\n- [ ] [Check 3 — e.g., metrics return to baseline]\n\n## Rollback\n\nIf the procedure fails or causes unexpected issues:\n\n### Rollback Step 1\n```bash\n# rollback command\n```\n\n### Rollback Step 2\n```bash\n# rollback command\n```\n\n## Troubleshooting\n\n| Symptom | Likely Cause | Resolution |\n|---------|-------------|------------|\n| [symptom 1] | [cause] | [fix] |\n| [symptom 2] | [cause] | [fix] |\n\n## Escalation\n\nIf unresolved after [X] minutes:\n- **Primary:** @[team-lead] — [phone\u002FSlack]\n- **Secondary:** @[manager] — [phone\u002FSlack]\n\n## Related Runbooks\n\n- [Link to related runbook 1]\n- [Link to related runbook 2]\n\n## Change Log\n\n| Date | Author | Change |\n|------|--------|--------|\n| YYYY-MM-DD | [Name] | Initial version |\n````\n\n## Overview\n\nFailover the primary PostgreSQL instance to the synchronous replica when\nthe primary is unreachable or degraded. This runbook covers both planned\n(maintenance) and unplanned (emergency) failover.\n\n## Prerequisites\n\n- [ ] DBA or SRE-level access to primary and replica hosts\n- [ ] `psql` client installed (v14+)\n- [ ] VPN connected to production network\n- [ ] Slack channel #db-ops open\n- [ ] Confirm replica is in sync: replication lag \u003C 1 MB\n\n## Procedure\n\n### Step 1 — Verify Replica Health\n\n```bash\npsql -h replica.db.internal -U dba -d postgres -c \\\n  \"SELECT pg_is_in_recovery(), pg_last_wal_replay_lsn();\"\n```\n\n**Expected output:** `pg_is_in_recovery = t`, LSN advancing.\n\n### Step 2 — Stop Application Writes\n\n```bash\nkubectl scale deployment api-server --replicas=0 -n production\nkubectl scale deployment worker --replicas=0 -n production\n```\n\n**Expected output:** Deployments scaled to 0 pods.\n\n### Step 3 — Fence the Old Primary and Confirm Write Quiescence\n\nBefore promotion, use the documented failover manager\u002Ffencing mechanism to ensure the old primary cannot accept writes, including after network recovery. Scaling two deployments and observing zero active queries is not proof of fencing or absence of other writers. If the primary is unreachable and fencing cannot be confirmed, stop and escalate; do not risk two primaries. Capture original replica counts\u002Fconfiguration for restoration.\n\n```bash\npsql -h primary.db.internal -U dba -d postgres -c \\\n  \"SELECT count(*) FROM pg_stat_activity WHERE state = 'active' AND query !~ 'pg_stat';\"\n```\n\n**Expected output:** Count = 0 (no active queries).\n\n### Step 4 — Promote Replica\n\n```bash\npsql -h replica.db.internal -U dba -d postgres -c \"SELECT pg_promote();\"\n```\n\nWait up to 30 seconds, then confirm:\n\n```bash\npsql -h replica.db.internal -U dba -d postgres -c \"SELECT pg_is_in_recovery();\"\n```\n\n**Expected output:** `pg_is_in_recovery = f` (no longer a replica).\n\n### Step 5 — Update DNS\n\n```bash\naws route53 change-resource-record-sets \\\n  --hosted-zone-id Z1234567890 \\\n  --change-batch '{\n    \"Changes\": [{\n      \"Action\": \"UPSERT\",\n      \"ResourceRecordSet\": {\n        \"Name\": \"db.internal.example.com\",\n        \"Type\": \"CNAME\",\n        \"TTL\": 60,\n        \"ResourceRecords\": [{\"Value\": \"replica.db.internal\"}]\n      }\n    }]\n  }'\n```\n\n### Step 6 — Restart Application\n\n```bash\nkubectl scale deployment api-server --replicas=6 -n production\nkubectl scale deployment worker --replicas=4 -n production\n```\n\n## Verification\n\n- [ ] `psql -h db.internal.example.com -c \"SELECT 1;\"` returns successfully\n- [ ] Application logs show successful DB connections (no errors for 5 min)\n- [ ] Transaction throughput returns to baseline on Grafana dashboard\n- [ ] No replication-lag alerts firing\n\n## Rollback\n\nPromotion is not undone by restoring a backup. Establish the authoritative primary, fence other writers and obtain a DBA-approved data-recovery\u002Frejoin plan. The following restores a separate RDS instance and may lose writes since the snapshot; it is not an automatic rollback for the self-managed PostgreSQL example:\n\n```bash\n# Restore latest automated snapshot (RDS example)\naws rds restore-db-instance-from-db-snapshot \\\n  --db-instance-identifier prod-db-restored \\\n  --db-snapshot-identifier prod-db-latest-snapshot\n```\n\n## Escalation\n\nIf unresolved after 15 minutes:\n- **Primary:** @dba-lead — +1-555-0101\n- **Secondary:** @platform-oncall — +1-555-0102\n````\n\nThe shell fragments assume Linux\u002FGNU date, curl, jq\u002Fopenssl and authorized cluster\u002Fcloud access. Use bounded timeouts for network probes and protect collected logs\u002Fqueries; a fresh temporary directory does not make raw incident data safe to publish.\n\n## Automation Scripts for Common Operations\n\n### Service Health Check\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# health-check.sh — Check health of critical services\nset -euo pipefail\n\nSERVICES=(\n  \"https:\u002F\u002Fapi.example.com\u002Fhealthz\"\n  \"https:\u002F\u002Fapp.example.com\u002Fhealthz\"\n  \"https:\u002F\u002Fadmin.example.com\u002Fhealthz\"\n)\n\nEXIT_CODE=0\n\nfor url in \"${SERVICES[@]}\"; do\n  if ! HTTP_CODE=$(curl -so \u002Fdev\u002Fnull -w '%{http_code}' --max-time 5 \"$url\" 2>\u002Fdev\u002Fnull); then\n    HTTP_CODE=000\n  fi\n  if [ \"$HTTP_CODE\" -eq 200 ]; then\n    printf \"  OK    %s\\n\" \"$url\"\n  else\n    printf \"  FAIL  %s (HTTP %s)\\n\" \"$url\" \"$HTTP_CODE\"\n    EXIT_CODE=1\n  fi\ndone\n\nexit $EXIT_CODE\n```\n\n### Log Collection for Incident Investigation\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# collect-logs.sh — Gather logs from multiple sources for incident review\nset -euo pipefail\n\nINCIDENT_ID=\"${1:?Usage: collect-logs.sh \u003Cincident-id>}\"\n[[ \"$INCIDENT_ID\" =~ ^[A-Za-z0-9_-]+$ ]] || exit 2\numask 077\nOUTDIR=$(mktemp -d \"${TMPDIR:-\u002Ftmp}\u002Fincident-${INCIDENT_ID}.XXXXXX\")\n\necho \"Collecting logs for incident $INCIDENT_ID...\"\n\n# Kubernetes pod logs (last 30 min)\nkubectl logs -l app=api-server -n production --since=30m \\\n  > \"${OUTDIR}\u002Fapi-server-pods.log\" 2>&1\n\n# CloudWatch Logs (last 30 min)\naws logs filter-log-events \\\n  --log-group-name \u002Fecs\u002Fproduction\u002Fapi \\\n  --start-time \"$(date -d '30 minutes ago' +%s)000\" \\\n  --output text > \"${OUTDIR}\u002Fcloudwatch-api.log\" 2>&1\n\n# Database slow query log\npsql -h db.internal -U dba -d postgres -c \\\n  \"SELECT * FROM pg_stat_activity WHERE state != 'idle' ORDER BY query_start;\" \\\n  > \"${OUTDIR}\u002Fdb-active-queries.log\" 2>&1\n\n# System resource snapshot\nkubectl top pods -n production > \"${OUTDIR}\u002Fpod-resources.log\" 2>&1\n\necho \"Logs saved to $OUTDIR\"\ntar czf \"${OUTDIR}.tar.gz\" -C \"$(dirname \"$OUTDIR\")\" \"$(basename \"$OUTDIR\")\"\necho \"Archive: ${OUTDIR}.tar.gz\"\n```\n\n### Certificate Expiry Check\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# cert-check.sh — Warn if TLS certificates expire within 30 days\nset -euo pipefail\n\nDOMAINS=(\n  \"api.example.com\"\n  \"app.example.com\"\n  \"admin.example.com\"\n)\n\nWARN_DAYS=30\nTODAY=$(date +%s)\nEXIT_CODE=0\n\nfor domain in \"${DOMAINS[@]}\"; do\n  if ! EXPIRY=$(echo | openssl s_client -servername \"$domain\" -connect \"${domain}:443\" 2>\u002Fdev\u002Fnull \\\n    | openssl x509 -noout -enddate 2>\u002Fdev\u002Fnull | cut -d= -f2); then\n    printf \"  FAIL  %s certificate unavailable\\n\" \"$domain\"\n    EXIT_CODE=1\n    continue\n  fi\n  EXPIRY_EPOCH=$(date -d \"$EXPIRY\" +%s 2>\u002Fdev\u002Fnull || echo 0)\n  DAYS_LEFT=$(( (EXPIRY_EPOCH - TODAY) \u002F 86400 ))\n\n  if [ \"$DAYS_LEFT\" -lt \"$WARN_DAYS\" ]; then\n    printf \"  WARN  %s expires in %d days (%s)\\n\" \"$domain\" \"$DAYS_LEFT\" \"$EXPIRY\"\n    EXIT_CODE=1\n  else\n    printf \"  OK    %s — %d days remaining\\n\" \"$domain\" \"$DAYS_LEFT\"\n  fi\ndone\n\nexit $EXIT_CODE\n```\n\n### Disk Space Cleanup\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# disk-cleanup.sh — Free disk space on a host\nset -euo pipefail\n\necho \"=== Disk Usage Before ===\"\ndf -h \u002F\n\n# Inventory first; no deletion in this diagnostic example.\njournalctl --disk-usage\ndocker system df\nfind \u002Fvar\u002Flog -type f -name \"*.gz\" -mtime +7 -print\n# Use service-specific approved retention and reviewed exact paths for cleanup.\n# Do not prune volumes or globally delete \u002Ftmp; backups\u002Flog evidence may be needed.\n\necho \"=== Disk Usage After ===\"\ndf -h \u002F\n```\n\n## Runbook Review Checklist\n\nUse this checklist every time a runbook is created or updated.\n\n```yaml\ncontent_review:\n  - [ ] Title clearly identifies the service and operation\n  - [ ] Overview explains WHEN and WHY to use this runbook\n  - [ ] Prerequisites list all required access, tools, and setup\n  - [ ] Every step has a concrete command (no vague instructions)\n  - [ ] Expected output is documented for each step\n  - [ ] Verification section confirms success with specific checks\n  - [ ] Rollback section exists and has been tested\n  - [ ] Escalation contacts are current (names, phones, Slack handles)\n  - [ ] Troubleshooting table covers the top 3-5 known failure modes\n\nusability_review:\n  - [ ] A new team member can follow the runbook without tribal knowledge\n  - [ ] Steps are numbered and sequential (no branching without clear labels)\n  - [ ] Commands can be copy-pasted (no placeholder values without explanation)\n  - [ ] Time estimates included for long-running steps\n  - [ ] No jargon or acronyms used without definition\n\nmaintenance_review:\n  - [ ] Owner and last-reviewed date are set\n  - [ ] Version number incremented\n  - [ ] Change log entry added\n  - [ ] Related runbooks section is up to date\n  - [ ] Links to dashboards and docs are valid (not broken)\n```\n\n## Runbook Testing Procedures\n\n```yaml\ntesting_strategy:\n  dry_run:\n    frequency: \"Every time a runbook is created or substantially edited\"\n    method: \"Walk through each step in a staging environment\"\n    goal: \"Verify commands work and output matches documentation\"\n\n  peer_review:\n    frequency: \"Every edit\"\n    method: \"Another engineer follows the runbook in staging without help\"\n    goal: \"Confirm the runbook is self-contained and unambiguous\"\n\n  scheduled_validation:\n    frequency: \"Quarterly\"\n    method: \"SRE team picks 5 runbooks at random, executes in staging\"\n    goal: \"Catch runbooks that have drifted from production reality\"\n\n  incident_triggered:\n    trigger: \"Any time a runbook is used in a real incident\"\n    method: \"Post-mortem includes runbook accuracy assessment\"\n    goal: \"Capture improvements while the experience is fresh\"\n\n  automation_testing:\n    method: \"CI pipeline validates bash scripts with shellcheck and dry-run\"\n    example: |\n      # .github\u002Fworkflows\u002Frunbook-lint.yml\n      name: Lint Runbook Scripts\n      on: [pull_request]\n      jobs:\n        shellcheck:\n          runs-on: ubuntu-latest\n          steps:\n            - uses: actions\u002Fcheckout@v4\n            - name: ShellCheck\n              run: |\n                find runbooks\u002F -name \"*.sh\" -exec shellcheck {} +\n```\n\n\n\n## When to Use\n\n- Creating or updating operational runbooks, SOPs, on-call procedures, or incident recovery guides.\n\n## Limitations\n\n- Runbooks must be validated in staging; examples use placeholder hostnames and account IDs.\n- Docs-only import: upstream template files are not bundled.\n\n### Example\n\n```markdown\nDraft a SEV2 database failover runbook with prerequisites, verification, and rollback.\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n","# Runbook Creation\n\nCreate effective operational runbooks, standard operating procedures, and\ntroubleshooting guides that any on-call engineer can follow under pressure.\n\n## Runbook Template — Full Structure\n\n````markdown\n# Runbook: [Service \u002F Process Name]\n\n**Owner:** [Team or individual]\n**Last Reviewed:** YYYY-MM-DD\n**Version:** X.Y\n**Severity if unavailable:** SEV[1-4]\n\n---\n\n## Overview\n\nBrief description of the service, why this runbook exists, and when to\nuse it.\n\n## Prerequisites\n\n- [ ] Required access \u002F IAM role: [details]\n- [ ] Tools installed: [kubectl, aws-cli, psql, etc.]\n- [ ] VPN connected to [environment]\n- [ ] Communication channel open: [Slack #channel]\n\n## Procedure\n\n### Step 1 — [Action Name]\n\n[Explanation of what this step does and why.]\n\n```bash\n# command here\n```\n\n**Expected output:** [describe what success looks like]\n\n### Step 2 — [Action Name]\n\n```bash\n# command here\n```\n\n**Expected output:** [description]\n\n*(Continue with numbered steps...)*\n\n## Verification\n\nHow to confirm the procedure succeeded:\n\n- [ ] [Check 1 — e.g., health endpoint returns 200]\n- [ ] [Check 2 — e.g., no errors in logs for 5 minutes]\n- [ ] [Check 3 — e.g., metrics return to baseline]\n\n## Rollback\n\nIf the procedure fails or causes unexpected issues:\n\n### Rollback Step 1\n```bash\n# rollback command\n```\n\n### Rollback Step 2\n```bash\n# rollback command\n```\n\n## Troubleshooting\n\n| Symptom | Likely Cause | Resolution |\n|---------|-------------|------------|\n| [symptom 1] | [cause] | [fix] |\n| [symptom 2] | [cause] | [fix] |\n\n## Escalation\n\nIf unresolved after [X] minutes:\n- **Primary:** @[team-lead] — [phone\u002FSlack]\n- **Secondary:** @[manager] — [phone\u002FSlack]\n\n## Related Runbooks\n\n- [Link to related runbook 1]\n- [Link to related runbook 2]\n\n## Change Log\n\n| Date | Author | Change |\n|------|--------|--------|\n| YYYY-MM-DD | [Name] | Initial version |\n````\n\n## Overview\n\nFailover the primary PostgreSQL instance to the synchronous replica when\nthe primary is unreachable or degraded. This runbook covers both planned\n(maintenance) and unplanned (emergency) failover.\n\n## Prerequisites\n\n- [ ] DBA or SRE-level access to primary and replica hosts\n- [ ] `psql` client installed (v14+)\n- [ ] VPN connected to production network\n- [ ] Slack channel #db-ops open\n- [ ] Confirm replica is in sync: replication lag \u003C 1 MB\n\n## Procedure\n\n### Step 1 — Verify Replica Health\n\n```bash\npsql -h replica.db.internal -U dba -d postgres -c \\\n  \"SELECT pg_is_in_recovery(), pg_last_wal_replay_lsn();\"\n```\n\n**Expected output:** `pg_is_in_recovery = t`, LSN advancing.\n\n### Step 2 — Stop Application Writes\n\n```bash\nkubectl scale deployment api-server --replicas=0 -n production\nkubectl scale deployment worker --replicas=0 -n production\n```\n\n**Expected output:** Deployments scaled to 0 pods.\n\n### Step 3 — Fence the Old Primary and Confirm Write Quiescence\n\nBefore promotion, use the documented failover manager\u002Ffencing mechanism to ensure the old primary cannot accept writes, including after network recovery. Scaling two deployments and observing zero active queries is not proof of fencing or absence of other writers. If the primary is unreachable and fencing cannot be confirmed, stop and escalate; do not risk two primaries. Capture original replica counts\u002Fconfiguration for restoration.\n\n```bash\npsql -h primary.db.internal -U dba -d postgres -c \\\n  \"SELECT count(*) FROM pg_stat_activity WHERE state = 'active' AND query !~ 'pg_stat';\"\n```\n\n**Expected output:** Count = 0 (no active queries).\n\n### Step 4 — Promote Replica\n\n```bash\npsql -h replica.db.internal -U dba -d postgres -c \"SELECT pg_promote();\"\n```\n\nWait up to 30 seconds, then confirm:\n\n```bash\npsql -h replica.db.internal -U dba -d postgres -c \"SELECT pg_is_in_recovery();\"\n```\n\n**Expected output:** `pg_is_in_recovery = f` (no longer a replica).\n\n### Step 5 — Update DNS\n\n```bash\naws route53 change-resource-record-sets \\\n  --hosted-zone-id Z1234567890 \\\n  --change-batch '{\n    \"Changes\": [{\n      \"Action\": \"UPSERT\",\n      \"ResourceRecordSet\": {\n        \"Name\": \"db.internal.example.com\",\n        \"Type\": \"CNAME\",\n        \"TTL\": 60,\n        \"ResourceRecords\": [{\"Value\": \"replica.db.internal\"}]\n      }\n    }]\n  }'\n```\n\n### Step 6 — Restart Application\n\n```bash\nkubectl scale deployment api-server --replicas=6 -n production\nkubectl scale deployment worker --replicas=4 -n production\n```\n\n## Verification\n\n- [ ] `psql -h db.internal.example.com -c \"SELECT 1;\"` returns successfully\n- [ ] Application logs show successful DB connections (no errors for 5 min)\n- [ ] Transaction throughput returns to baseline on Grafana dashboard\n- [ ] No replication-lag alerts firing\n\n## Rollback\n\nPromotion is not undone by restoring a backup. Establish the authoritative primary, fence other writers and obtain a DBA-approved data-recovery\u002Frejoin plan. The following restores a separate RDS instance and may lose writes since the snapshot; it is not an automatic rollback for the self-managed PostgreSQL example:\n\n```bash\n# Restore latest automated snapshot (RDS example)\naws rds restore-db-instance-from-db-snapshot \\\n  --db-instance-identifier prod-db-restored \\\n  --db-snapshot-identifier prod-db-latest-snapshot\n```\n\n## Escalation\n\nIf unresolved after 15 minutes:\n- **Primary:** @dba-lead — +1-555-0101\n- **Secondary:** @platform-oncall — +1-555-0102\n````\n\nThe shell fragments assume Linux\u002FGNU date, curl, jq\u002Fopenssl and authorized cluster\u002Fcloud access. Use bounded timeouts for network probes and protect collected logs\u002Fqueries; a fresh temporary directory does not make raw incident data safe to publish.\n\n## Automation Scripts for Common Operations\n\n### Service Health Check\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# health-check.sh — Check health of critical services\nset -euo pipefail\n\nSERVICES=(\n  \"https:\u002F\u002Fapi.example.com\u002Fhealthz\"\n  \"https:\u002F\u002Fapp.example.com\u002Fhealthz\"\n  \"https:\u002F\u002Fadmin.example.com\u002Fhealthz\"\n)\n\nEXIT_CODE=0\n\nfor url in \"${SERVICES[@]}\"; do\n  if ! HTTP_CODE=$(curl -so \u002Fdev\u002Fnull -w '%{http_code}' --max-time 5 \"$url\" 2>\u002Fdev\u002Fnull); then\n    HTTP_CODE=000\n  fi\n  if [ \"$HTTP_CODE\" -eq 200 ]; then\n    printf \"  OK    %s\\n\" \"$url\"\n  else\n    printf \"  FAIL  %s (HTTP %s)\\n\" \"$url\" \"$HTTP_CODE\"\n    EXIT_CODE=1\n  fi\ndone\n\nexit $EXIT_CODE\n```\n\n### Log Collection for Incident Investigation\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# collect-logs.sh — Gather logs from multiple sources for incident review\nset -euo pipefail\n\nINCIDENT_ID=\"${1:?Usage: collect-logs.sh \u003Cincident-id>}\"\n[[ \"$INCIDENT_ID\" =~ ^[A-Za-z0-9_-]+$ ]] || exit 2\numask 077\nOUTDIR=$(mktemp -d \"${TMPDIR:-\u002Ftmp}\u002Fincident-${INCIDENT_ID}.XXXXXX\")\n\necho \"Collecting logs for incident $INCIDENT_ID...\"\n\n# Kubernetes pod logs (last 30 min)\nkubectl logs -l app=api-server -n production --since=30m \\\n  > \"${OUTDIR}\u002Fapi-server-pods.log\" 2>&1\n\n# CloudWatch Logs (last 30 min)\naws logs filter-log-events \\\n  --log-group-name \u002Fecs\u002Fproduction\u002Fapi \\\n  --start-time \"$(date -d '30 minutes ago' +%s)000\" \\\n  --output text > \"${OUTDIR}\u002Fcloudwatch-api.log\" 2>&1\n\n# Database slow query log\npsql -h db.internal -U dba -d postgres -c \\\n  \"SELECT * FROM pg_stat_activity WHERE state != 'idle' ORDER BY query_start;\" \\\n  > \"${OUTDIR}\u002Fdb-active-queries.log\" 2>&1\n\n# System resource snapshot\nkubectl top pods -n production > \"${OUTDIR}\u002Fpod-resources.log\" 2>&1\n\necho \"Logs saved to $OUTDIR\"\ntar czf \"${OUTDIR}.tar.gz\" -C \"$(dirname \"$OUTDIR\")\" \"$(basename \"$OUTDIR\")\"\necho \"Archive: ${OUTDIR}.tar.gz\"\n```\n\n### Certificate Expiry Check\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# cert-check.sh — Warn if TLS certificates expire within 30 days\nset -euo pipefail\n\nDOMAINS=(\n  \"api.example.com\"\n  \"app.example.com\"\n  \"admin.example.com\"\n)\n\nWARN_DAYS=30\nTODAY=$(date +%s)\nEXIT_CODE=0\n\nfor domain in \"${DOMAINS[@]}\"; do\n  if ! EXPIRY=$(echo | openssl s_client -servername \"$domain\" -connect \"${domain}:443\" 2>\u002Fdev\u002Fnull \\\n    | openssl x509 -noout -enddate 2>\u002Fdev\u002Fnull | cut -d= -f2); then\n    printf \"  FAIL  %s certificate unavailable\\n\" \"$domain\"\n    EXIT_CODE=1\n    continue\n  fi\n  EXPIRY_EPOCH=$(date -d \"$EXPIRY\" +%s 2>\u002Fdev\u002Fnull || echo 0)\n  DAYS_LEFT=$(( (EXPIRY_EPOCH - TODAY) \u002F 86400 ))\n\n  if [ \"$DAYS_LEFT\" -lt \"$WARN_DAYS\" ]; then\n    printf \"  WARN  %s expires in %d days (%s)\\n\" \"$domain\" \"$DAYS_LEFT\" \"$EXPIRY\"\n    EXIT_CODE=1\n  else\n    printf \"  OK    %s — %d days remaining\\n\" \"$domain\" \"$DAYS_LEFT\"\n  fi\ndone\n\nexit $EXIT_CODE\n```\n\n### Disk Space Cleanup\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# disk-cleanup.sh — Free disk space on a host\nset -euo pipefail\n\necho \"=== Disk Usage Before ===\"\ndf -h \u002F\n\n# Inventory first; no deletion in this diagnostic example.\njournalctl --disk-usage\ndocker system df\nfind \u002Fvar\u002Flog -type f -name \"*.gz\" -mtime +7 -print\n# Use service-specific approved retention and reviewed exact paths for cleanup.\n# Do not prune volumes or globally delete \u002Ftmp; backups\u002Flog evidence may be needed.\n\necho \"=== Disk Usage After ===\"\ndf -h \u002F\n```\n\n## Runbook Review Checklist\n\nUse this checklist every time a runbook is created or updated.\n\n```yaml\ncontent_review:\n  - [ ] Title clearly identifies the service and operation\n  - [ ] Overview explains WHEN and WHY to use this runbook\n  - [ ] Prerequisites list all required access, tools, and setup\n  - [ ] Every step has a concrete command (no vague instructions)\n  - [ ] Expected output is documented for each step\n  - [ ] Verification section confirms success with specific checks\n  - [ ] Rollback section exists and has been tested\n  - [ ] Escalation contacts are current (names, phones, Slack handles)\n  - [ ] Troubleshooting table covers the top 3-5 known failure modes\n\nusability_review:\n  - [ ] A new team member can follow the runbook without tribal knowledge\n  - [ ] Steps are numbered and sequential (no branching without clear labels)\n  - [ ] Commands can be copy-pasted (no placeholder values without explanation)\n  - [ ] Time estimates included for long-running steps\n  - [ ] No jargon or acronyms used without definition\n\nmaintenance_review:\n  - [ ] Owner and last-reviewed date are set\n  - [ ] Version number incremented\n  - [ ] Change log entry added\n  - [ ] Related runbooks section is up to date\n  - [ ] Links to dashboards and docs are valid (not broken)\n```\n\n## Runbook Testing Procedures\n\n```yaml\ntesting_strategy:\n  dry_run:\n    frequency: \"Every time a runbook is created or substantially edited\"\n    method: \"Walk through each step in a staging environment\"\n    goal: \"Verify commands work and output matches documentation\"\n\n  peer_review:\n    frequency: \"Every edit\"\n    method: \"Another engineer follows the runbook in staging without help\"\n    goal: \"Confirm the runbook is self-contained and unambiguous\"\n\n  scheduled_validation:\n    frequency: \"Quarterly\"\n    method: \"SRE team picks 5 runbooks at random, executes in staging\"\n    goal: \"Catch runbooks that have drifted from production reality\"\n\n  incident_triggered:\n    trigger: \"Any time a runbook is used in a real incident\"\n    method: \"Post-mortem includes runbook accuracy assessment\"\n    goal: \"Capture improvements while the experience is fresh\"\n\n  automation_testing:\n    method: \"CI pipeline validates bash scripts with shellcheck and dry-run\"\n    example: |\n      # .github\u002Fworkflows\u002Frunbook-lint.yml\n      name: Lint Runbook Scripts\n      on: [pull_request]\n      jobs:\n        shellcheck:\n          runs-on: ubuntu-latest\n          steps:\n            - uses: actions\u002Fcheckout@v4\n            - name: ShellCheck\n              run: |\n                find runbooks\u002F -name \"*.sh\" -exec shellcheck {} +\n```\n\n\n\n## When to Use\n\n- Creating or updating operational runbooks, SOPs, on-call procedures, or incident recovery guides.\n\n## Limitations\n\n- Runbooks must be validated in staging; examples use placeholder hostnames and account IDs.\n- Docs-only import: upstream template files are not bundled.\n\n### Example\n\n```markdown\nDraft a SEV2 database failover runbook with prerequisites, verification, and rollback.\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n",{"name":5,"risk":32,"source":48,"license":14,"category":41,"metadata":49,"date_added":52,"description":7,"source_repo":53,"source_type":29,"compatibility":54,"license_source":55},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills",{"author":50,"version":51},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Checklist and framework guidance; no privileged tooling required. Apply controls through your own change process.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-runbook-creation",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add boisenoise\u002Fskills-collections --skill runbook-creation",{"tool":68,"command":69},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill runbook-creation",{"tool":71,"command":72},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill runbook-creation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-runbook-creation\u002FSKILL.md",true,[76],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fdetails.md","REFERENCE","参考文档",2625,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-runbook-creation\u002Freferences\u002Fdetails.md",[83,92,100,109,117,125],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":91},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":108},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":108},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":108},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":129,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":108},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]