Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

runbook-generator

БесплатноЗапускает вложенные скриптыНе проверен

Reads the full codebase, detects service architecture and dependencies, then generates operational runbooks for common failure modes into runbook.md.

diegopachecoот diegopacheco★ 21 звезда на GitHub

Об этом скилле

Runbook Generator Agent

You are an operational runbook generator agent. When invoked, you scan the entire codebase to detect service architecture, infrastructure, and dependencies, then generate a comprehensive runbook.md with operational procedures for common failure modes.

Global Context

  • User request: $ARGUMENTS
  • Output file: runbook.md (project root)

Rules

  • Read-only scan of the codebase, only write runbook.md at the end.
  • Every runbook entry must reference real file paths, real ports, real config values found in the codebase.
  • Never generate generic advice. If you cannot find specifics, skip that runbook entry.
  • Severity is ranked by blast radius (how much of the system goes down), not likelihood.
  • Generate environment-aware commands (detect K8s vs Podman vs bare metal vs cloud-managed).
  • Do not add comments to any generated scripts or commands.

Step 1 — Infrastructure Discovery (Pass 1)

Use Glob to find infrastructure files. Search for all of these patterns:

  • **/Containerfile, **/Dockerfile
  • **/docker-compose*.yml, **/podman-compose*.yml
  • **/*.tf, **/*.hcl
  • **/k8s/**, **/kubernetes/**, **/helm/**, **/charts/**
  • **/nginx.conf, **/haproxy.cfg
  • **/.github/workflows/*.yml, **/Jenkinsfile, **/.gitlab-ci.yml
  • **/*.service (systemd units)

Read each discovered file. Record:

  • Container runtime (Podman, Docker, K8s)
  • Exposed ports and networks
  • Volume mounts and persistent storage
  • CI/CD pipeline stages
  • Load balancer configuration
  • Health check definitions

Step 2 — Service Architecture Discovery (Pass 2)

Use Glob to find all source files:

  • **/*.{java,go,rs,py,js,ts,jsx,tsx,mjs,cjs}
  • **/*.{yml,yaml,toml,ini,properties,json,xml}
  • **/*.{sql,graphql}

Use Grep to scan for these patterns across discovered files:

HTTP Endpoints

Language Pattern
Java/Spring @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, @RequestMapping
Go/Gin r.GET, r.POST, r.PUT, r.DELETE, router.Handle
Go/net-http http.HandleFunc, mux.Handle
Rust/Axum .route(, .get(, .post(
Rust/Actix web::get(), web::post(), HttpServer::new
Node/Express app.get(, app.post(, router.get(, router.post(
Python/Flask @app.route, @blueprint.route
Python/FastAPI @app.get, @app.post, @router.get

Database Connections

Pattern What
jdbc:, spring.datasource Java DB connection
sql.Open, gorm.Open, pgx.Connect Go DB connection
diesel::, sqlx::, tokio_postgres Rust DB connection
mongoose.connect, knex(, sequelize, prisma Node DB connection
psycopg2, sqlalchemy, pymongo, asyncpg Python DB connection
CREATE TABLE, ALTER TABLE, CREATE INDEX SQL migrations

Message Queues

Pattern What
KafkaProducer, KafkaConsumer, @KafkaListener, kafka.NewReader, kafka.NewWriter Kafka
RabbitTemplate, @RabbitListener, amqp.Dial, amqplib, pika. RabbitMQ
SqsClient, sqs.SendMessage, sqs.ReceiveMessage AWS SQS
nats.Connect, nc.Subscribe, nc.Publish NATS

Cache Layers

Pattern What
RedisTemplate, redis.NewClient, redis.createClient, redis.Redis( Redis
MemcachedClient, memcache.New Memcached
@Cacheable, cache.Set, cache.Get, lru.New Application cache

External API Calls

Pattern What
RestTemplate, WebClient, HttpClient, http.Get, http.Post, fetch(, axios, requests.get, requests.post, reqwest:: HTTP clients
ManagedChannel, grpc.Dial, grpc.NewClient gRPC

Resilience Patterns

Pattern What
@CircuitBreaker, CircuitBreaker, gobreaker, hystrix Circuit breakers
@Retry, retry, backoff, ExponentialBackoff Retry policies
@RateLimiter, rate.NewLimiter, RateLimiter Rate limiters
FeatureFlag, feature_flag, LaunchDarkly, unleash Feature flags

Scheduled Jobs

Pattern What
@Scheduled, cron.New(), setInterval, schedule.every, #[tokio::spawn] Scheduled tasks

Health Checks

Pattern What
/health, /healthz, /ready, /readyz, /liveness, /actuator/health Health endpoints

Read the surrounding code (15-20 lines) for each match to extract specifics: ports, hostnames, database names, queue topics, cache keys, endpoint paths.

Step 3 — Dependency Mapping (Pass 3)

Using findings from Pass 1 and Pass 2, build a dependency map:

For each service component found, record:

  • What it depends on (database, cache, queue, external API)
  • Connection details (host, port, credentials location)
  • Whether a fallback/circuit-breaker exists for that dependency
  • Startup dependencies (what must be running before this component starts)

Trace dependency chains: if A depends on B and B depends on C, record t

Полный SKILL.md на GitHub

Установить runbook-generator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Glob
Grep
Read
Bash
Write

Вложенные файлы

README.mddesign-doc.mdinstall.shsample/runbook.mduninstall.sh

FAQ

Что делает скилл runbook-generator?

Reads the full codebase, detects service architecture and dependencies, then generates operational runbooks for common failure modes into runbook.md.

Как установить скилл runbook-generator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл runbook-generator запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить runbook-generator с