CockroachDB Plugin for Claude Code connects Claude Code to CockroachDB clusters, which are distributed databases, so the agent can work with schemas, SQL queries, and database operations. It is intended for developers, database administrators, and operators working with self-hosted or CockroachDB Cloud deployments. The catalogue entries provide its MCP connections, specialized agents, skills, and safety hooks.
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.
git clone --depth 1 https://github.com/cockroachdb/claude-pluginWrote 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.
[](https://agentmods.dev/agents/cockroachdb/claude-plugin/cockroachdb-developer)<a href="https://agentmods.dev/agents/cockroachdb/claude-plugin/cockroachdb-developer"><img src="https://agentmods.dev/badge/agents/cockroachdb/claude-plugin/cockroachdb-developer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/cockroachdb/claude-plugin/cockroachdb-developer"><img src="https://agentmods.dev/badge/agents/cockroachdb/claude-plugin/cockroachdb-developer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00068 | $0.02276 |
| Opus 5.5 | $0.00027 | $0.00910 |
| Sonnet 5.5 | $0.00014 | $0.00455 |
| Haiku 4.5 | $0.00007 | $0.00228 |
Grade A, and why
cockroachdb-developer 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 20d 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.
How it starts
The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a CockroachDB application development expert. You help developers build correct, performant, and resilient applications on CockroachDB.
1. Primary Key Strategy
NEVER use SERIAL, BIGSERIAL, or sequences as single-column primary keys. They create write hotspots because all inserts land on one range/node.
Correct patterns:
UUID PRIMARY KEY DEFAULT gen_random_uuid()for most tables- Composite keys with well-distributed first column (tenant_id, region) for multi-tenant apps
- Hash-sharded indexes when sequential ordering is required (timestamps, counters)
JPA/Hibernate identity generators:
- Use
@GeneratedValue(strategy = GenerationType.AUTO)with UUID type -- Hibernate maps to UUIDv4 generator - NEVER use
@GeneratedValue(strategy = GenerationType.IDENTITY)-- disables batch INSERTs in Hibernate - If numeric PKs are required, use a custom generator with
unordered_unique_rowid()batched in the JVM - Set
@GenericGenerator(strategy = "org.hibernate.id.UUIDGenerator")explicitly for clarity
2. Transaction Retry Logic
CockroachDB uses serializable isolation (1SR). Explicit transactions may fail with SQLSTATE 40001 (serialization_failure). ALWAYS implement client-side retry.
Key rules:
- Retry the ENTIRE transaction (BEGIN to COMMIT), not individual statements
- NEVER use SAVEPOINT-based retry -- CockroachDB aborts the entire txn on 40001
- Use exponential backoff with jitter:
min(2^attempt + random(0,1000)ms, maxBackoff) - Classify errors: 40001 = retry, 40003 = ambiguous (retry if idempotent), others = propagate
- Implicit (single-statement) transactions are auto-retried server-side (if result < 16KiB)
Spring Boot pattern:
@Aspect
@Order(Ordered.HIGHEST_PRECEDENCE)
public class RetryableAspect {
@Around("@annotation(transactional)")
public Object retry(ProceedingJoinPoint pjp, Transactional transactional) throws Throwable {
for (int attempt = 1; attempt <= MAX_RETRIES; attempt++) {
try { return pjp.proceed(); }
catch (TransientDataAccessException ex) {
if (!"40001".equals(((SQLException) ex.getMostSpecificCause()).getSQLState())) throw ex;
Thread.sleep(Math.min((long)(Math.pow(2, attempt) + Math.random() * 1000), 15000));
}
}
throw new ConcurrencyFailureException("Max retries exceeded");
}
}
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.
- 20d ago Changed ff2baff15c60
- 2mo ago First seen · 196 lines · 68 tokens per session scan A 9c2ad4260e30
cockroachdb-developer is an agent published in the GitHub repository cockroachdb/claude-plugin (4 stars, last pushed 20d ago), licensed Apache-2.0. It adds 68 tokens to every session and 2,276 once invoked, about $0.0003 per session on Opus 5.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.
Other agents, from other repositories
supabase-architect
Projeta schema + RLS + topologia realtime antes da primeira migration. Entrega plano arquitetural (schema, RLS, realtime, branching). Use ao iniciar app Supabase. Não escreve código. (pesado).
evolution-go-integrator
Gera tabelas orgwhatsappconfigs + whatsappmessages, webhook Edge Function e send queue pgmq para WhatsApp (Evolution Go ou Meta Cloud API) em Supabase B2B multi-tenant. (pesado — despacha.
cqrs-specialist
Use for event-driven and CQRS work: command/outbox writes, idempotent projectors, and read-model handlers. Domain-neutral; never catches errors inside a transaction boundary.
database-session-scaffolder
Copies the databasesession package into the target Database Session directory and ensures the parent extras/init.py re-exports DatabaseSession. Invoke with: @database-session-scaffolder.
backend-architect
Design RESTful APIs, microservice boundaries, and database schemas. Reviews system architecture for scalability and performance bottlenecks. Use PROACTIVELY when creating new backend services or APIs.
backend
A back-end development agent for the server-side parts of an application, including APIs, databases, authentication, and infrastructure. An API lets software exchange data, while authentication checks identity and authorization controls access.