<< All versions

Skill v1.0.0

currentAutomated scan100/100
bedkillerspacex-boop/codex-skill-library/golang-ops-runbook
──Details
PublishedNovember 20, 2026 at 04:50 PM
Content Hashsha256:505d82ee0fa1bc5b...
Git SHAeed9fd055798
──Files
Files (1 file, 6.9 KB)
SKILL.md6.9 KBactive
SKILL.md · 174 lines · 6.9 KB

name: golang-ops-runbook description: > Author and maintain operations runbooks for Go services: deploy/rollback, health checks, on-call pages, dependency failures, and post-incident drills. Use when writing runbooks for Go microservices, kube services, or owned HTTP/gRPC workers (systemd, containers, or VMs). metadata: version: "1.0.0"


Golang Ops Runbook

Research grounding

Operational runbooks for Go services cover process model (main + goroutines), graceful shutdown, probe semantics, build/version identity, and common failure modes (DB pool exhaustion, context deadlines, dependency 5xx). Skill id: golang-ops-runbook.

Scope And Authorization

  • In scope: systems you own, labs, or engagements with written authorization.
  • Out of scope: changing production without change control; sharing unredacted incident data.
  • Prefer dry-runs and stage drills before production cutovers.
  • Redact secrets, tokens, PII, and customer identifiers from runbooks and tickets.
  • Pair code/config changes with code-quality-standards.

When To Use

  • Creating or refreshing an ops runbook for a Go service (HTTP, gRPC, worker, CLI daemon).
  • On-call cannot recover a Go service without tribal knowledge.
  • Need deploy, rollback, probe, and dependency-failure procedures with command evidence.
  • Preparing game-days / tabletop for Go service outages.

Do Not Use As Primary

NeedSkill instead
Dependency vulnerability scanninggolang-osv-scanner / go-govulncheck-workflow
Postmortem action trackinggolang-postmortem-hooks
Patch SLA designgolang-patch-sla
Implementation quality baselinecode-quality-standards
Org-wide SSDLC processsecure-sdlc-checklist
Secrets inventory/rotationsecrets-management-hygiene

Domain Focus (Go ops runbooks)

AreaGuidance
Identityversion/commit build flags, runtime.Version(), module path
Process modelsingle binary, signals (SIGTERM), drain HTTP/gRPC, stop workers
Probesliveness vs readiness; do not share one handler for both
DependenciesDB, cache, queues, upstream APIs — timeouts and circuit breakers
Observabilitystructured logs, RED/USE metrics, traces, alert → runbook link
Pitfallsmissing rollback; readiness that always returns 200; secret dump in logs

Workflow

1. Confirm scope and success criteria

  1. Record service name, owner, environments (dev/stage/prod), and on-call roster.
  2. Success: page-to-mitigation path is documented, drilled, and linked from alerts.
  3. Note blast radius (multi-tenant, payment path, data plane).

2. Inventory the Go service

  1. Entry point (main), config source (env/flags/file), and ports.
  2. Deploy path: container image tag, Helm/Kustomize, or binary + systemd unit.
  3. Critical dependencies and SLOs (latency, error rate, saturation).
  4. Existing alerts and whether each alert links a runbook section.

3. Baseline

  1. Capture current deploy version (/version or image digest).
  2. Snapshot healthy metric dashboards and recent incident tickets.
  3. List known exceptions (manual deploys, missing canary).

4. Author the runbook sections

Required sections for a Go service runbook:

  1. Overview — purpose, owners, RACI, links to repo and dashboard.
  2. Architecture — diagram: clients → load balancer → Go process → deps.
  3. Deploy — build, image push, rollout; canary/blue-green if used.
  4. Rollback — previous image/tag, traffic shift, DB migration caveats.
  5. Health — curl/probes, expected JSON, when readiness should fail.
  6. Common incidents — high latency, 5xx spike, goroutine growth, OOM, DB pool full.
  7. Dependency failure — degrade modes (fail closed vs cached responses).
  8. Break-glass — who can SSH/exec, how secrets rotate, audit requirements.
  9. Drill log — last successful game-day date and gaps found.

5. Verify with evidence

bash
# Build identity
go version
git rev-parse --short HEAD
# Local health (adjust path/port)
curl -sS http://127.0.0.1:8080/healthz
curl -sS http://127.0.0.1:8080/readyz
curl -sS http://127.0.0.1:8080/version
# Tests and static checks before deploy
go test ./...
go vet ./...
# Container / process signals (lab)
# kill -TERM <pid> # expect clean drain within ShutdownTimeout

Kubernetes notes:

bash
kubectl -n <ns> get deploy <svc> -o wide
kubectl -n <ns> rollout history deploy/<svc>
kubectl -n <ns> rollout undo deploy/<svc>
kubectl -n <ns> logs deploy/<svc> --tail=200

6. Observe and harden

  1. Every pageable alert must deep-link a runbook section ID.
  2. Track process_resident_memory, goroutine count, DB pool in-use, HTTP p99.
  3. Fail closed on auth/payment paths when deps fail; document intentional fail-open.
  4. Re-check: graceful shutdown timeout < k8s terminationGracePeriodSeconds.

7. Hand off

  1. Store runbook in the team wiki/repo; version it with the service.
  2. Schedule quarterly drill; record date on the runbook header.
  3. Apply code-quality-standards if probe/handler code changed.

Go-specific runbook snippets

ScenarioChecksMitigation sketch
Latency spikep99, upstream RTT, DB slow queriesscale, shed load, raise timeouts carefully
Error budget burn5xx by route, panic recover logsrollback last deploy; feature-flag off
Memory growthheap profile, goroutine dumprestart + fix leak; cap body size
Deploy stuckrollout status, image pull errorsfix registry/auth; undo rollout
Cert expiryTLS probe, days-to-expiry metricrenew via automated pipeline

Good / Bad

TopicGoodBad
AuthorizationOwned service + change windowAd-hoc prod kubectl without ticket
Runbook contentCommands with expected output“Restart the pod” only
ProbesReadiness reflects dep healthLiveness hits DB (flap-kill loops)
RollbackOne command + migration rulesHope forward-fix works
SecretsReferences to vault pathsPasswords pasted into runbook
DrillsDated game-day evidenceNever tested procedures

Output Checklist

  • [ ] Scope, owner, environment, authorization recorded
  • [ ] Service inventory (binary, ports, deps, deploy path) complete
  • [ ] Deploy + rollback procedures with commands
  • [ ] Health/readiness semantics documented
  • [ ] Top incident scenarios with mitigation steps
  • [ ] Alerts link to runbook sections
  • [ ] Graceful shutdown / probe timing consistent with orchestrator
  • [ ] Drill date and residual gaps recorded
  • [ ] Secrets redacted; code-quality-standards applied if code shipped
  • [ ] Next review date set

Rules

  • Authorized/owned systems only; evidence over guesses.
  • Prefer reversible changes and explicit owners.
  • Never paste live secrets into runbooks, commits, or chat.
  • Keep focus on Go service operations runbooks; route vuln scanning, PCI, or purple-team work to neighbor skills.
  • Do not weaken safety controls “temporarily” without expiry and ticket.
All versions