Token导航 LogoToken导航

Agent Skill · 开发

runbook-generator(运行手册生成器)

runbook-generator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

runbook-generator 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 12,696。

总安装 1,164周安装 50GitHub Stars 103下载 408核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:runbook-generator(运行手册生成器)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/runbook-generator
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill runbook-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill runbook-generator

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

runbook-generator 根据代码库自动推导运维手册,包含命令、验证与回滚步骤。支持多种基础设施栈,输出可直接复用的操作指南与应急预案。具备配置变更检测能力,确保手册与实际环境保持同步。执行高危操作前应人工复核步骤与权限,防止误删或中断服务。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/runbook-generator

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/borghei/claude-skills --skill runbook-generato…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

runbook-generator 怎么安装?

在终端执行 npx skills add https://github.com/borghei/claude-skills --skill runbook-generator。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

runbook-generator 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

runbook-generator 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

runbook-generator 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

runbook-generator 用的人多吗?

公开数据是累计安装 1,164 次,近一周安装 50 次,下载 408 次,GitHub 103 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

runbook-generator 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
runbook-generator

运行手册生成器 · 本页

1,164103调用外部服务未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Runbook Generator

Tier: POWERFUL Category: Engineering / SRE Maintainer: Claude Skills Team

Overview

Analyze a codebase and generate production-grade operational runbooks with copy-paste commands, verification checks after every step, rollback procedures for every destructive action, escalation paths with contact information, and time estimates for capacity planning. Detects the stack (CI/CD, database, hosting, containers) and produces runbooks tailored to the actual infrastructure. Includes staleness detection to flag runbooks when referenced config files change.

Keywords

runbook, operational procedures, incident response, deployment, rollback, database maintenance, scaling, monitoring, on-call, SRE, postmortem

Core Capabilities

1. Stack Detection

  • Identify CI/CD platform, database, hosting, and orchestration from repo files
  • Map detected stack to appropriate runbook templates
  • Extract connection strings, deployment commands, and infrastructure details

2. Runbook Types

  • Deployment: pre-checks, deploy steps, smoke tests, rollback
  • Incident response: triage, diagnose, mitigate, resolve, postmortem
  • Database maintenance: backup, migration, vacuum, reindex
  • Scaling: horizontal and vertical scaling procedures
  • Monitoring: alert setup, dashboard configuration, on-call rotation

3. Format Discipline

  • Numbered steps with copy-paste commands
  • Verification check after EVERY step
  • Time estimates for capacity planning
  • Rollback procedure for every destructive action
  • Escalation paths with decision criteria

4. Maintenance

  • Staleness detection linked to config file modification dates
  • Quarterly review cadence
  • Staging dry-run validation framework

When to Use

  • Codebase has no runbooks and you need to bootstrap them
  • Existing runbooks are outdated or incomplete
  • Onboarding a new engineer for on-call rotation
  • Preparing for an incident response drill
  • Post-incident improvement: updating runbooks with lessons learned

Stack Detection

Scan the repository before writing any runbook:

# CI/CD Platform
[ -d ".github/workflows" ] && echo "GitHub Actions"
[ -f ".gitlab-ci.yml" ]    && echo "GitLab CI"
[ -f "Jenkinsfile" ]       && echo "Jenkins"

# Database
grep -rl "postgres\|postgresql" package.json pyproject.toml 2>/dev/null && echo "PostgreSQL"
grep -rl "mysql\|mariadb" package.json 2>/dev/null && echo "MySQL"
grep -rl "mongodb\|mongoose" package.json 2>/dev/null && echo "MongoDB"

# Hosting
[ -f "vercel.json" ]       && echo "Vercel"
[ -f "fly.toml" ]          && echo "Fly.io"
[ -f "railway.toml" ]      && echo "Railway"
[ -d "terraform" ]         && echo "Terraform (custom cloud)"
[ -d "k8s" ] || [ -d "kubernetes" ] && echo "Kubernetes"
[ -f "docker-compose.yml" ] && echo "Docker Compose"

# Framework
[ -f "next.config.mjs" ] || [ -f "next.config.ts" ] && echo "Next.js"
grep -q "fastapi" requirements.txt 2>/dev/null && echo "FastAPI"
[ -f "go.mod" ] && echo "Go"

Deployment Runbook Template

# Deployment Runbook — [App Name]

**Stack:** [Framework] + [Database] + [Hosting]
**Last verified:** YYYY-MM-DD
**Owner:** [Team Name]
**Estimated total time:** 15-25 minutes

---

## Staleness Check

| Config File | Last Modified | Affects Steps |
|-------------|--------------|---------------|
| vercel.json | `git log -1 --format=%ci -- vercel.json` | Deploy, Rollback |
| db/schema.ts | `git log -1 --format=%ci -- db/schema.ts` | Migration |
| .github/workflows/deploy.yml | `git log -1 --format=%ci -- .github/workflows/deploy.yml` | CI |

If any config was modified after "Last verified" date, review affected steps.

---

## Pre-Deployment Checklist
- [ ] All PRs merged to main
- [ ] CI passing on main branch
- [ ] Database migrations tested in staging
- [ ] Rollback plan confirmed
- [ ] On-call engineer notified

## Step 1: Verify CI Status (2 min)

Check latest CI run

gh run list --branch main --limit 3

Verify specific run

gh run view <run-id>


VERIFY: Latest run shows green checkmark. If red, do not proceed.

## Step 2: Apply Database Migrations (5 min)

Staging first

DATABASE_URL=$STAGING_DB_URL pnpm db:migrate

Verify migration applied

DATABASE_URL=$STAGING_DB_URL pnpm db:migrate status


VERIFY: Output shows "All migrations applied" with today's date.

Production (only after staging verification)

DATABASE_URL=$PROD_DB_URL pnpm db:migrate


VERIFY: Same output as staging. If error, see Rollback section.

WARNING: For migrations on tables with >1M rows, schedule during low-traffic window and monitor lock wait times.

## Step 3: Deploy to Production (5 min)

Option A: Git push triggers deployment

git push origin main

Option B: Manual trigger

vercel --prod

or: fly deploy

or: kubectl apply -f k8s/deployment.yaml


VERIFY: Deployment dashboard shows new version in progress. Note the deployment URL/ID for rollback.

## Step 4: Smoke Test (5 min)

Health check

curl -sf https://myapp.com/api/health | jq .

Critical user path

curl -sf https://myapp.com/api/v1/me \ -H "Authorization: Bearer $TEST_TOKEN" | jq '.id'

Check error rate (wait 2 minutes for data)

Dashboard: [link to monitoring dashboard]


VERIFY:

- Health returns `{"status": "ok", "db": "connected"}`
- User endpoint returns a valid user ID
- Error rate < 1% on monitoring dashboard

## Step 5: Monitor (10 min)

Watch these metrics for 10 minutes after deployment:

- Error rate: < 1% (dashboard: [link])
- P95 latency: < 200ms (dashboard: [link])
- Active DB connections: < 80% of max (query below)

psql $PROD_DB_URL -c "SELECT count(*) FROM pg_stat_activity;"


VERIFY: All metrics within normal range. If any spike, proceed to Rollback.

---

## Rollback

If smoke tests fail or metrics degrade:

Instant rollback via Vercel

vercel rollback [previous-deployment-url]

or Fly.io

fly releases --app myapp fly deploy --image [previous-image]

or Kubernetes

kubectl rollout undo deployment/myapp

Database rollback (ONLY if migration was applied in this deploy)

DATABASE_URL=$PROD_DB_URL pnpm db:rollback


VERIFY: Previous version serving traffic. Run smoke tests again.

---

## Escalation

| Level | Who | When | Contact |
| --- | --- | --- | --- |
| L1 | On-call engineer | First responder | PagerDuty rotation |
| L2 | Platform lead | DB issues, rollback failures | Slack: @platform-lead |
| L3 | VP Engineering | Production down > 30 min | Phone: [number] |

Incident Response Runbook Template

# Incident Response Runbook

**Severity:** P1 (down), P2 (degraded), P3 (minor)
**Estimated time:** P1: 30-60 min, P2: 1-4 hours, P3: next business day

---

## Phase 1: Triage (5 min)

### Confirm the Incident

Is the app responding?

curl -sw "%{http_code}" https://myapp.com/api/health -o /dev/null

Check for errors in recent logs

vercel logs --since=15m | grep -i "error\|exception\|5[0-9][0-9]"

or: kubectl logs -l app=myapp --since=15m | grep -i error


VERIFY: 200 = app is up. 5xx or timeout = incident confirmed.

### Declare Severity

| Condition | Severity | Action |
| --- | --- | --- |
| Site completely unreachable | P1 | Page L2/L3 immediately |
| Partial degradation or slow | P2 | Notify team channel |
| Single feature broken | P3 | Create ticket, fix in business hours |

### Communicate

Post to incident channel (adjust for your tool)

Slack: #incidents "INCIDENT: [severity] — [brief description]. Investigating. Updates every 15 min."


## Phase 2: Diagnose (10-15 min)

### Check Recent Changes

Was something just deployed?

vercel ls --limit 5

or: kubectl rollout history deployment/myapp

Recent commits

git log --oneline -10


### Check Database

Active queries (look for long-running or blocked queries)

psql $PROD_DB_URL -c " SELECT pid, now() - query_start AS duration, state, query FROM pg_stat_activity WHERE state != 'idle' ORDER BY duration DESC LIMIT 20;"

Connection pool saturation

psql $PROD_DB_URL -c " SELECT count(*) AS active, (SELECT setting::int FROM pg_settings WHERE name = 'max_connections') AS max FROM pg_stat_activity;"


### Diagnostic Decision Tree

Recent deploy + new errors → ROLLBACK (see Deployment Runbook) DB queries hanging → Kill long queries, check connection pool External API failing → Check status pages, enable circuit breaker Memory/CPU spike → Check for infinite loops, scale up temporarily


## Phase 3: Mitigate (variable)

Kill a runaway database query

psql $PROD_DB_URL -c "SELECT pg_terminate_backend(<pid>);"

Rollback last deployment

vercel rollback [previous-url]

Scale up (if capacity issue)

fly scale count 4 --app myapp

or: kubectl scale deployment/myapp --replicas=4


## Phase 4: Resolve and Postmortem

Within 24 hours of resolution:

1. Write incident timeline (what happened, when, who noticed, what fixed it)
2. Identify root cause (5 Whys analysis)
3. Define action items with owners and due dates
4. Update this runbook if a step was missing or wrong
5. Add monitoring/alerting that would have caught this earlier

Database Maintenance Runbook Template

# Database Maintenance — PostgreSQL

**Schedule:** Weekly vacuum (automated), monthly manual review

## Backup

pg_dump $PROD_DB_URL \ --format=custom \ --compress=9 \ --file="backup-$(date +%Y%m%d-%H%M%S).dump"


VERIFY: File exists and size > 0. Test monthly with:

pg_restore --dbname=$STAGING_DB_URL backup-*.dump psql $STAGING_DB_URL -c "SELECT count(*) FROM users;"


## Vacuum and Reindex

Check bloat

psql $PROD_DB_URL -c " SELECT tablename, pg_size_pretty(pg_total_relation_size(schemaname||'.'||tablename)) AS size, n_dead_tup, ROUND(n_dead_tup::numeric / NULLIF(n_live_tup, 0) * 100, 1) AS dead_pct FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 10;"

Vacuum high-bloat tables (non-blocking)

psql $PROD_DB_URL -c "VACUUM ANALYZE tablename;"

Reindex (CONCURRENTLY to avoid locks)

psql $PROD_DB_URL -c "REINDEX INDEX CONCURRENTLY index_name;"


VERIFY: dead_pct drops below 5% after vacuum.

Staleness Detection Automation

#!/bin/bash
# check-runbook-staleness.sh
# Run weekly in CI to detect stale runbooks

RUNBOOK_DIR="docs/runbooks"
EXIT_CODE=0

for runbook in "$RUNBOOK_DIR"/*.md; do
  LAST_VERIFIED=$(grep -oP 'Last verified:\s*\K\d{4}-\d{2}-\d{2}' "$runbook" 2>/dev/null)
  if [ -z "$LAST_VERIFIED" ]; then
    echo "WARNING: $runbook has no 'Last verified' date"
    continue
  fi

  # Extract referenced config files
  CONFIG_FILES=$(grep -oP 'git log.*-- \K[^\x60]+' "$runbook" 2>/dev/null)
  for config in $CONFIG_FILES; do
    if [ -f "$config" ]; then
      LAST_MODIFIED=$(git log -1 --format=%ci -- "$config" | cut -d' ' -f1)
      if [[ "$LAST_MODIFIED" > "$LAST_VERIFIED" ]]; then
        echo "STALE: $runbook references $config (modified $LAST_MODIFIED, verified $LAST_VERIFIED)"
        EXIT_CODE=1
      fi
    fi
  done
done

exit $EXIT_CODE

Quarterly Review Process

Every quarter (add to team calendar):

  1. Run each command in staging — does it still work?
  2. Check config drift — compare config modification dates vs runbook verification date
  3. Test rollback procedures — actually roll back in staging
  4. Update contact info — L1/L2/L3 assignments may have changed
  5. Add new failure modes discovered in the past quarter
  6. Update "Last verified" date at the top of each reviewed runbook
  7. Archive obsolete runbooks — services get decommissioned

Common Pitfalls

PitfallFix
Commands with placeholder valuesUse environment variables: $PROD_DB_URL not postgres://user:pass@host/db
No expected output after commandsAdd VERIFY block with exact expected output
Missing rollback stepsEvery destructive step needs a corresponding undo
Runbooks that never get testedSchedule quarterly staging dry-runs
Outdated escalation contactsReview contacts every quarter
Migration runbook ignores table locksExplicitly call out lock risk for large table operations
Copy-pasting production URLs into runbooksUse environment variable references that resolve at runtime

Best Practices

  1. Every command must be copy-pasteable — use env vars, not placeholder text
  2. VERIFY after every step — explicit expected output, not "it should work"
  3. Time estimates are mandatory — engineers need to know if they have time before SLA breach
  4. Rollback before you deploy — plan the undo before executing the action
  5. Runbooks live in the repo — docs/runbooks/, versioned with the code they describe
  6. Postmortem drives runbook updates — every incident should improve at least one runbook
  7. Link, do not duplicate — reference the canonical config, do not copy its contents
  8. Test runbooks like you test code — untested runbooks are worse than no runbooks (false confidence)

Troubleshooting

ProblemCauseSolution
Stack detection returns no resultsRepo uses non-standard config file names or pathsManually specify the stack in the runbook header; extend detection script with custom paths
Generated commands fail in stagingEnvironment variables not set or differ between environmentsVerify all referenced env vars exist in the target environment with `printenv \grep PROD` before executing
Staleness script reports false positivesConfig files touched by formatting-only commits (linting, whitespace)Filter staleness checks by diffing actual content changes: git diff --stat on the flagged commit
Runbook steps are out of order after a platform upgradeHosting provider changed their deploy pipeline or CLI flagsRe-run stack detection after every major platform upgrade; diff the new CLI help output against runbook commands
Escalation contacts are staleTeam rotations or org changes not reflected in runbooksIntegrate escalation tables with your on-call tool API (PagerDuty, Opsgenie) so contacts resolve dynamically
Rollback procedure fails mid-executionDatabase migration was partially applied before the deploy failedAlways wrap migrations in transactions where the engine supports it; include a "partial rollback" section for non-transactional DDL
Runbook verification checks pass but the feature is brokenSmoke tests only cover health endpoint, not critical user pathsAdd at least three smoke-test URLs per runbook: health, auth, and one core business endpoint

Success Criteria

  • Runbook coverage >= 90% — every production service has at least a deployment and incident response runbook
  • Mean time to mitigate (MTTM) drops by 30%+ within one quarter of adopting generated runbooks
  • Zero placeholder commands — every command in every runbook is copy-pasteable without manual editing beyond env var substitution
  • Staleness rate < 10% — fewer than 10% of runbooks flagged as stale in any given quarterly review cycle
  • Quarterly dry-run pass rate >= 95% — at least 95% of runbook steps execute successfully in staging during scheduled dry-runs
  • On-call onboarding time < 2 hours — a new engineer can read all runbooks for their service and feel confident to handle L1 incidents within two hours
  • Post-incident runbook update rate = 100% — every postmortem produces at least one runbook addition or correction

Scope & Limitations

This skill covers:

  • Generating deployment, incident response, database maintenance, scaling, and monitoring runbooks from codebase analysis
  • Stack detection for common CI/CD platforms (GitHub Actions, GitLab CI, Jenkins), databases (PostgreSQL, MySQL, MongoDB), and hosting providers (Vercel, Fly.io, Kubernetes, AWS)
  • Staleness detection automation and quarterly review processes
  • Escalation path templates with severity-based routing

This skill does NOT cover:

  • Automated execution of runbook steps — it generates documentation, not orchestration (see ci-cd-pipeline-builder for automated pipelines)
  • Infrastructure provisioning or Terraform/Pulumi code generation (see migration-architect for schema migration tooling)
  • Observability stack setup such as Prometheus rules, Grafana dashboards, or alert definitions (see observability-designer for monitoring infrastructure)
  • Security incident response or vulnerability remediation playbooks (see skill-security-auditor for security-focused analysis)

Integration Points

SkillIntegrationData Flow
ci-cd-pipeline-builderRunbook deployment steps align with pipeline stagesPipeline config feeds into deployment runbook generation; runbook rollback steps reference pipeline rollback triggers
observability-designerMonitoring runbook references alert rules and dashboardsObservability outputs (alert names, dashboard URLs) are embedded in runbook VERIFY and Monitor steps
migration-architectDatabase maintenance runbook uses migration tooling conventionsMigration file paths and commands flow into the database runbook template; rollback steps mirror migration rollback commands
release-managerRelease process triggers runbook execution checkpointsRelease tags and changelogs feed into runbook staleness checks; release gates reference runbook pre-deployment checklists
env-secrets-managerRunbook commands reference env vars managed by secrets toolingSecret names and vault paths flow into runbook env var references; rotation schedules inform runbook update cadence
changelog-generatorPost-deployment runbook steps cross-reference changelog entriesChangelog diffs help identify which runbook steps need re-verification after a release

平台分布

Codex

33.6%
按下载量换算137

Claude

29.1%
按下载量换算119

Cursor

19.08%
按下载量换算78

Gemini CLI

9.68%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills