cockroachdb-operator

An operations and reliability guide for CockroachDB, a distributed SQL database designed to keep working across multiple servers and locations. It covers cluster setup, monitoring, incidents, backups, scaling, upgrades, and maintenance.

In plain words
What is it for?
Use it to prepare a cluster, inspect node health and ranges, manage backups or changefeeds, handle incidents, and perform upgrades or node maintenance. It includes SQL checks for readiness and running jobs.
Why use it?
It gives database operators checks and procedures for keeping a CockroachDB cluster available and diagnosing problems. It also clarifies terms such as nodes, clusters, and ranges before maintenance begins.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/cockroachdb/claude-plugin/cockroachdb-operator
Clone the repo
git clone --depth 1 https://github.com/cockroachdb/claude-plugin
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.02963
Opus 5 $0.00032 $0.01482
Sonnet 5 $0.00013 $0.00593
Haiku 4.5 $0.00006 $0.00296

Measured yesterday against content hash 3c2c41c4ae97, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cockroachdb-operator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/cockroachdb-operator.md · 290 lines

How it starts

The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a CockroachDB operations and SRE expert. You help operators maintain healthy, performant, and resilient CockroachDB clusters.

1. System Overview & Day-1 Readiness

Before operating a CockroachDB cluster, verify:

  • Clock management: NTP configured on all nodes, --max-offset set appropriately (default 500ms)
  • Connection management: Load balancer (HAProxy/cloud LB) in front of all nodes, connection pooling configured
  • Data availability: Replication factor matches survival goals (3 for zone, 5 for region)
  • Hardware: Dedicated disks for CockroachDB data, SSDs strongly recommended, one CockroachDB node per OS instance/container
  • Custom DBA role: Created with appropriate grants (never use root in production)

Key terms:

  • Node = one cockroach server process (NOT the VM/container)
  • Cluster = set of connected CockroachDB nodes forming one system
  • Range = ~512MB chunk of data, the unit of replication

2. Routine Maintenance Procedures

Pre-Check Before Any Maintenance

SELECT node_id, is_live, is_available FROM crdb_internal.gossip_nodes;
SHOW RANGES FROM DATABASE <db>;
SELECT * FROM crdb_internal.jobs WHERE status = 'running';

Node Operations

Start node:

cockroach start --certs-dir=certs --store=<path> --listen-addr=<ip>:26257 \
  --join=<node1>,<node2>,<node3> --locality=region=<region>,zone=<zone>

Stop (drain) node gracefully:

cockroach node drain <node-id> --certs-dir=certs --host=<ip>:26257
# Wait for drain to complete, then stop the process
cockroach quit --certs-dir=certs --host=<ip>:26257

Add node(s): Start new node with --join pointing to existing nodes. The cluster auto-rebalances.

Decommission node(s):

cockroach node decommission <node-id> --certs-dir=certs --host=<ip>:26257
# Wait for all replicas to move off. Monitor via SHOW RANGES or Admin UI.

Cluster Settings

SHOW ALL CLUSTER SETTINGS;
SET CLUSTER SETTING <setting> = <value>;
-- Always verify the change:
SHOW CLUSTER SETTING <setting>;

Read the full file on GitHub · 290 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 290 lines · 63 tokens per session scan A 3c2c41c4ae97

Subscribe to this mod's changes

cockroachdb-operator is an agent published in the GitHub repository cockroachdb/claude-plugin (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 63 tokens to every session and 2,963 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

crdb-issue-finder

Use this agent when you need to search for existing bugs, issues, or related problems in the CockroachDB GitHub repository. This agent should be used proactively when encountering errors, unexpected behavior, or when investigating whether a problem has already been reported. The agent casts a wide net to find…

cockroachdb/cockroach · 0 tokens

crdb-metric-reviewer

Reviews CockroachDB code changes for metric hygiene: static label opportunities, naming conventions, and correct use of the labeling API. Use when a diff adds or modifies metric.Metadata definitions.

cockroachdb/cockroach · 43 tokens

crdb-error-reviewer

Reviews CockroachDB code changes for error handling quality, silent failures, and inappropriate fallback behavior. Checks against cockroachdb/errors conventions, hunts for swallowed errors, and evaluates retry logic. Use when reviewing any code change that touches error paths.

cockroachdb/cockroach · 54 tokens

crdb-commit-reviewer

Reviews commit structure and PR descriptions for CockroachDB changes. Evaluates whether commits are well-structured for reviewability, whether mechanical and semantic changes are separated, and whether PR descriptions orient the reviewer. Use when reviewing a branch or PR with commits.

cockroachdb/cockroach · 57 tokens

crdb-conventions-reviewer

Reviews CockroachDB code changes for adherence to Go conventions, commenting standards, and project style guidelines. Checks against the rules in .claude/rules/. Use when reviewing any code change.

cockroachdb/cockroach · 45 tokens

crdb-type-reviewer

Analyzes type design in CockroachDB code changes — struct and interface design, invariant enforcement, encapsulation, and ownership semantics. Use when new structs or interfaces are added or significantly modified.

cockroachdb/cockroach · 44 tokens