troubleshoot-cockroachdb

troubleshoot-cockroachdb is a skill for Claude Code from netdata/skills. It costs 68 tokens per session (2,072 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for CockroachDB, a distributed SQL database that runs across multiple machines. It uses Netdata health data and a diagnostic decision tree to investigate common cluster failures.

In plain words
What is it for?
Use it to investigate CockroachDB alerts and incidents, identify likely causes, and get recommended remediation for issues such as hot ranges, Raft failures, and accumulated write intents.
Why use it?
It helps narrow down whether slow queries, outages, or write failures come from compaction, node communication, clock drift, uneven traffic, stuck transactions, or memory pressure.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the netdata-skills plugin — 56 skills shipped together

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 skills/netdata/skills/troubleshoot-cockroachdb
Any agent
npx skills add netdata/skills --skill troubleshoot-cockroachdb
Clone the repo
git clone --depth 1 https://github.com/netdata/skills

Made for: Claude Code.

Or install netdata-skills, the plugin that ships this one along with the rest of its 56 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for troubleshoot-cockroachdb

README.md
[![agentmods](https://agentmods.dev/badge/skills/netdata/skills/troubleshoot-cockroachdb.svg)](https://agentmods.dev/skills/netdata/skills/troubleshoot-cockroachdb)
Your own site
<a href="https://agentmods.dev/skills/netdata/skills/troubleshoot-cockroachdb"><img src="https://agentmods.dev/badge/skills/netdata/skills/troubleshoot-cockroachdb.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,072 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.1 $0.00068 $0.02072
Opus 5 $0.00034 $0.01036
Sonnet 5 $0.00014 $0.00414
Haiku 4.5 $0.00007 $0.00207

Measured 5d ago against content hash ea82568e4a68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

troubleshoot-cockroachdb 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 5d ago.

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.

skills/troubleshoot-cockroachdb/SKILL.md · 167 lines

How it starts

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

Troubleshoot Cockroachdb

When to use this skill

  • LSM Compaction Death Spiral: Writes outpace compaction. L0 sublevel count climbs. Read latency goes exponential. Write stalls follow. The node appears "stuck."
  • Raft Liveness Failure: A node becomes slow (GC pause, disk stall, CPU saturation), can't process Raft heartbeats, loses leadership, the cluster redistributes leases causing cascading unavailability windows.
  • Clock Skew Crisis: NTP misconfiguration causes clock drift. Node self-terminates at >80% of max-offset. If multiple nodes drift (common with shared NTP), quorum is lost.
  • Hot Range: A single range receives disproportionate traffic due to sequential key patterns. One node bottlenecks the entire workload while others idle.
  • Intent Accumulation: Long-running or abandoned transactions leave write intents that block other transactions, cascading latency across the cluster.
  • Memory Pressure / GC Thrashing: Large queries exhaust SQL memory budget. Go GC pauses exceed Raft heartbeat interval (3s), causing liveness loss and oscillating availability.
  • Any time the user reports a Cockroachdb service behaving outside its expected envelope (elevated errors, latency, saturation, resource exhaustion, or unexpected restarts).
  • An on-call engineer is paging on a Netdata alert tied to a Cockroachdb instance and wants a structured triage path.

Key facts

  • This skill wraps the Netdata operator playbook for Cockroachdb. It does not replace the playbook; it routes a coding agent through MCP queries against the same signals the playbook relies on.
  • CockroachDB is a distributed, strongly-consistent SQL database built on a replicated key-value store. It layers SQL execution on top of a transactional KV engine that uses Raft consensus for replication and MVCC for concurrency control. To reason about its failures, you must hold several interacting subsystems in your head simultaneously.
  • Dominant failure archetypes the playbook calls out: LSM Compaction Death Spiral; Raft Liveness Failure; Clock Skew Crisis; Hot Range; Intent Accumulation.
  • Netdata observes the signals listed in the rule files via its native collectors, plus any OpenTelemetry-shipped metrics that your Cockroachdb instrumentation adds. Both paths end at the same MCP query surface.
  • Netdata's cockroachdb collector emits 60 context(s) under cockroachdb.*. The rule files enumerate which contexts surface which domain; the Verification section below names the load-bearing ones explicitly.

Read the full file on GitHub · 167 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 167 lines · 68 tokens per session scan A ea82568e4a68

Subscribe to this mod's changes

troubleshoot-cockroachdb is a skill published in the GitHub repository netdata/skills (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 68 tokens to every session and 2,072 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-31.

Related

Other skills, from other repositories

prisma-8

Comprehensive guide for building with Prisma 8 (Prisma Next), the contract-first data layer. Use whenever working on Prisma code in a project that uses it — authoring or editing the data contract (contract.prisma, PSL, TypeScript builders), migrations, queries (db.orm / db.sql), runtime wiring (db.ts, middleware…

prisma/orm · 220 tokens

drt-analyze

Analyze DRT cluster health for a given time range. Reconstructs the operations timeline, checks CockroachDB metrics (availability, latency, storage, changefeeds, jobs, goroutines, admission control, LSM, KV prober) and logs for anomalies, correlates findings with disruptive operations to distinguish expected…

cockroachdb/cockroach · 149 tokens

reduce-unoptimized-query-oracle

Reduce an unoptimized-query-oracle test failure log to the simplest possible reproduction case. Use when you have unoptimized-query-oracle.log files from a failed roachtest and need to find the minimal SQL to reproduce the bug.

cockroachdb/cockroach · 54 tokens

redux-to-swr

Migrate React components from Redux + Saga to SWR hooks. Use when converting data fetching from Redux store (reducers, sagas, selectors, connect HOC) to SWR-based hooks in CockroachDB DB Console or cluster-ui.

cockroachdb/cockroach · 53 tokens

mma-investigator

Expert system for investigating MMA (Multi-Metric Allocator) behavior on CockroachDB clusters. Helps oncall engineers diagnose load imbalances, understand rebalancing decisions, and identify why MMA did or didn't act.

cockroachdb/cockroach · 47 tokens

review-crdb

Review code changes or PRs for quality, correctness, and reviewability. Use when asked to "review", "check", "provide feedback", or "post a review". Dispatches specialized agents in parallel for thorough analysis.

cockroachdb/cockroach · 49 tokens