This guide explains how to discover and use CockroachDB Skills with Claude Code.
CockroachDB Skills are automatically discovered by Claude Code when you start a session. Claude:
- Scans skill metadata - Reads the
nameanddescriptionfrom each SKILL.md file - Matches your requests - When you describe a task, Claude identifies relevant skills
- Loads skill content - Retrieves the full guidance only when needed
- Provides expert guidance - Uses skill instructions to give accurate, production-ready advice
Progressive Loading: Skills use minimal context initially (just metadata), loading detailed content only when invoked. This keeps Claude fast and efficient.
Ask Claude to show you what's available:
What CockroachDB skills are available?
or
List all skills for CockroachDB
Skills are organized into 10 operational domains. Ask about specific areas:
What skills help with performance tuning?
Show me skills for security and compliance
Which skills help with migrations?
Learn about a specific skill:
Tell me about the reviewing-cluster-health skill
What does the molt-fetch skill do?
Skills can be invoked automatically or explicitly.
Simply describe what you want to do. Claude will automatically select and use the relevant skill.
Examples:
I need to check if my CockroachDB cluster is healthy
→ Uses reviewing-cluster-health skill
Help me migrate data from PostgreSQL to CockroachDB
→ Uses molt-fetch skill
My queries are running slowly, how do I diagnose this?
→ Uses skills from performance-and-scaling domain
I need to set up SSO for my CockroachDB Cloud cluster
→ Uses configuring-sso-and-scim skill
How do I find long-running queries on my cluster right now?
→ Uses triaging-live-sql-activity skill
Mention the skill by name if you want to ensure it's used:
Use the reviewing-cluster-health skill to check my cluster
Apply the molt-verify skill to validate my migration
Skills are organized into 10 operational domains covering the full CockroachDB lifecycle:
Getting started with CockroachDB and moving workloads into the system.
Available skills:
molt-fetch- Migrate data from PostgreSQL, MySQL, Oracle, or MSSQLmolt-verify- Verify migration accuracymolt-replicator- Set up continuous replication during migration
Example use case: "I want to migrate from PostgreSQL to CockroachDB"
Designing schemas and writing queries that follow CockroachDB best practices.
Available skills:
cockroachdb-sql- Generate CockroachDB-compliant SQL
Example use case: "Help me design a schema for a multi-region e-commerce application"
Optimizing query performance and scaling CockroachDB clusters.
Available skills:
analyzing-range-distribution- Diagnose uneven data distributionanalyzing-schema-change-storage-risk- Estimate storage for schema changesauditing-table-statistics- Check optimizer statistics healthprofiling-statement-fingerprints- Analyze historical query performanceprofiling-transaction-fingerprints- Analyze transaction patterns
Example use case: "My application is experiencing high latency on reads"
Day-to-day cluster operations and version management.
Available skills:
managing-certificates-and-encryption- TLS certificate rotation and CMEKmanaging-cluster-capacity- Add/remove nodes, storage managementmanaging-cluster-settings- Configure cluster settings safelyperforming-cluster-maintenance- Drain nodes, rolling restartsprovisioning-cluster-for-production- Production deployment planningreviewing-cluster-health- Comprehensive health diagnosticsupgrading-cluster-version- Upgrade planning and execution
Example use case: "I need to upgrade my cluster to the latest version"
Monitoring, alerting, and diagnosing cluster health issues.
Available skills:
triaging-live-sql-activity- Find long-running queries and busy sessionsmonitoring-background-jobs- Check schema changes, backups, automatic jobs
Example use case: "Users are reporting the cluster is slow right now"
Access control, compliance, and data protection.
Available skills:
auditing-cloud-cluster-security- Security posture assessmentconfiguring-audit-logging- Set up SQL audit logsconfiguring-ip-allowlists- Restrict network accessconfiguring-log-export- Export logs to cloud storageconfiguring-private-connectivity- Set up AWS PrivateLink, GCP Private Service Connectconfiguring-sso-and-scim- Configure SSO and user provisioningenabling-cmek-encryption- Customer-managed encryption keysenforcing-password-policies- Password complexity requirementshardening-user-privileges- Implement least-privilege accessmanaging-tls-certificates- Certificate management for self-hosted clusterspreparing-compliance-documentation- Generate compliance reports
Example use case: "How do I configure SSO with Okta for my CockroachDB Cloud cluster?"
Connecting CockroachDB to external tools and platforms.
Example use case: "Set up a changefeed to Kafka"
Understanding and optimizing resource consumption.
Example use case: "How can I reduce storage costs?"
Ensuring high availability and preparing for failures.
Example use case: "Set up automated backups"
Building applications that use CockroachDB effectively.
Example use case: "How do I handle transaction retries in my application?"
Request:
Check the health of my CockroachDB cluster
What happens:
- Claude uses the
reviewing-cluster-healthskill - Provides diagnostic SQL queries to run
- Explains what to look for in the results
- Identifies potential issues based on your cluster's state
Output example:
- Queries to check node status, replication health, storage usage
- Guidance on interpreting metrics
- Warnings if issues detected
- Next steps for remediation
Request:
I want to migrate my PostgreSQL database to CockroachDB
What happens:
- Claude uses migration skills to assess your situation
- Recommends using
molt-fetchfor data migration - Explains schema compatibility considerations
- Provides step-by-step migration plan with safety checks
Output example:
- Pre-migration checklist
- Schema analysis and modifications needed
- Data migration command with recommended flags
- Verification steps using
molt-verify - Rollback plan if issues occur
Request:
My application queries are slow. How do I find which ones?
What happens:
- Claude uses
triaging-live-sql-activityfor immediate diagnostics - Then suggests
profiling-statement-fingerprintsfor historical analysis - Provides queries to identify slow statements
- Explains optimization strategies
Output example:
- SQL to find currently running slow queries
- Queries to analyze historical performance patterns
- Specific suggestions based on query types (scans, joins, etc.)
- Index recommendations
Skills provide guidance and queries, not automated execution. Here's what to expect:
Skills often provide SQL queries to run:
-- Check cluster health
SHOW CLUSTER STATEMENTS;
SHOW RANGES FROM DATABASE your_database;
SELECT * FROM crdb_internal.node_metrics;You run these queries yourself using your SQL client or DB Console.
Skills break down complex operations into clear steps:
1. Verify prerequisites (backups, permissions)
2. Run pre-flight checks
3. Execute the operation
4. Validate results
5. Monitor for issues
Skills include guardrails for risky operations:
⚠️ This operation will temporarily increase cluster load
- Run during off-peak hours
- Monitor cluster metrics
- Have a rollback plan ready
Skills reference CockroachDB docs for detailed information:
For more details, see:
- CockroachDB Docs: Multi-Region Overview
- CockroachDB Docs: Zone Configuration
Better:
Help me diagnose slow queries in the payments database
Less effective:
Database is slow
Mention your deployment type when relevant:
I'm using CockroachDB Cloud Serverless and need to configure SSO
My self-hosted cluster is running version 23.1
Skills include safety checks for good reason:
- Take backups before schema changes
- Test in non-production first
- Run maintenance during off-peak hours
- Monitor after changes
Skills link to authoritative documentation. Follow these links for:
- Latest syntax and features
- Detailed reference material
- Version-specific guidance
Skills provide guidance, not automation:
- You run the queries and commands yourself
- Some operations require manual confirmation
- Skills don't execute changes directly
Skills are read-only by default:
- Diagnostic queries don't modify data
- Write operations require your explicit action
- Safety checks must be manually verified
Skills may not cover all edge cases:
- Every cluster is unique
- Complex scenarios may need customization
- Contact CockroachDB support for critical issues
Ask Claude to clarify skill guidance:
What does this query from the health check skill do?
Why does the skill recommend this approach?
For questions beyond skill scope:
- CockroachDB Documentation - Official docs
- CockroachDB Forum - Community support
- CockroachDB Support - Enterprise support
Report problems or suggest improvements:
- GitHub Issues - Bug reports and feature requests
- Contributing Guide - Help improve skills
- Browse Skills - Explore all available skills by domain
- Contributing - Add your own CockroachDB expertise
- Agent Skills Specification - Learn about the skills framework