Use when writing, generating, or optimizing SQL for CockroachDB, designing CockroachDB schemas, or when the user asks about CockroachDB-specific SQL patterns, type mappings, and distributed database best practices. Also use when encountering CockroachDB anti-patterns like missing primary keys, sequential ID hotspots, or incorrect type usage.
81
76%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/query-and-schema-design/cockroachdb-sql/SKILL.mdConverts natural language questions into CockroachDB-compliant SQL queries, following CockroachDB best practices. Use it for schema design, writing queries and optimizing query.
Activate this skill when:
Connection Detection — already performed on skill invocation; reuse active connection.
Parse Natural Language Intent
Context Gathering
SHOW TABLES; to see existing tablesSHOW CREATE TABLE table_name; for existing structureApply CockroachDB Rules
references/cockroachdb-rules/00-fundamental-principles.md - Always apply these first01-schema-design.md - Table creation and structure02-dml-operations.md - Data modification03-query-patterns.md - Query construction04-optimization.md - Performance, Optimization and anti-patterns05-operational.md - Admin and maintenanceValidate against DB(MANDATORY)
When skill is invoked, ALWAYS:
Immediately detect connection before any other action or response:
cockroach sql --url "<provided-url>" -e "SQL" to run queries. Do not use psql.echo $COCKROACH_URL).
cockroach sql --url $COCKROACH_URL -e "SQL" to run queries. Do not use psql.Focus exclusively on CockroachDB
Emphasize "natural language to CockroachDB SQL" not "database conversion"
Keep user-facing content CockroachDB-specific regardless of internal PostgreSQL rules.
references/cockroachdb-rules/ - CockroachDB SQL rulesreferences/EXAMPLES.md - SQL examples and patterns84bc1e4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.