/sota-skills:sota-databasesfrom SOTA Engineering Skills
Expert rules for database engineering: engine selection, schema modeling, migrations, queries, indexes, transactions, concurrency, reliability, security, and vector/AI workloads. Use when designing, implementing, or auditing data layers.
Ships in SOTA Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert-level rules for the full lifecycle of a data layer: choosing an engine, modeling data, evolving schemas safely, writing efficient queries, handling concurrency, operating reliably at scale, securing data, and supporting vector/AI workloads. Postgres is the reference engine; rules call out where other systems (MySQL, Redis, document/columnar/vector stores) differ.
This skill operates in two modes. Determine the mode from the user's intent,
then load the relevant rules/ files per the index below. Do not load all
files preemptively — pick by task.
Use when designing or implementing: new schemas, migrations, queries, ORM layers, caching, job queues, or database infrastructure.
rules/01-choosing-and-modeling.md before
writing any DDL. Default to Postgres unless a rule there says otherwise. On
SurrealDB, also read rules/08-surrealdb-multimodel.md before the first DEFINE.rules/02-schema-migrations.md
(expand/contract, lock-aware, reversible-or-documented).rules/03-queries-and-indexes.md.rules/04-transactions-concurrency.md).rules/05-reliability-and-scale.md, rules/06-security-and-compliance.md).Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.
Use when reviewing an existing schema, migration set, query workload, ORM usage, or database configuration.
Procedure:
Severity conventions:
Finding format (one per finding):
[SEVERITY] <short title>
Where: <file:line | table/column | migration id>
Rule: <rules file + rule heading>
Evidence: <the offending DDL/SQL/code, quoted>
Impact: <what breaks, when, under what load>
Fix: <concrete change — exact SQL/DDL/code where possible>
Order findings by severity. End with a summary table: count per severity, and the top 3 fixes by risk-reduction-per-effort.
| File | Read this when... |
|---|---|
rules/01-choosing-and-modeling.md | Picking an engine (SQL vs NoSQL/KV/columnar/time-series/vector); designing tables; deciding normalization, JSONB usage, primary keys, soft deletes, audit/history tables, ledgers and account balances, multi-tenancy, or how absence is encoded (NULL/omitted property vs an in-band sentinel). |
rules/02-schema-migrations.md | Writing or reviewing any migration; altering hot tables; planning zero-downtime schema changes; backfills; setting up migration tooling or testing. |
rules/03-queries-and-indexes.md | Writing/reviewing queries or ORM code; reading EXPLAIN ANALYZE; choosing index types or composite column order; pagination; N+1 suspicion; CTEs and window functions. |
rules/04-transactions-concurrency.md | Anything with concurrent writes: isolation levels, locking (FOR UPDATE, SKIP LOCKED, advisory), job queues, idempotency, deadlocks, long transactions, connection pooling. |
rules/05-reliability-and-scale.md | Backups/PITR, replication and read replicas, partitioning, vacuum/bloat, monitoring, capacity planning, sharding decisions, Redis caching patterns and distributed locks. |
rules/06-security-and-compliance.md | DB roles and grants, RLS, encryption at rest/in transit, SQL injection surface, security audit logging (pgaudit), PII columns, data retention and GDPR-style deletion. |
rules/07-vector-and-ai.md | Embeddings, semantic/hybrid search, pgvector vs dedicated vector DBs (incl. Qdrant exposure hardening), embedding model versioning and re-indexing. |
rules/08-surrealdb-multimodel.md | Building on or auditing SurrealDB: DEFINE ACCESS auth, system users and least privilege, parameterized SurrealQL, SCHEMAFULL + PERMISSIONS, capability flags, indexes, multi-model (embed/reference/graph edges), backups. |
Violations of these are at minimum HIGH severity in AUDIT mode and must not be introduced in BUILD mode.
bigint GENERATED ALWAYS AS IDENTITY internally, UUIDv7 when IDs are exposed or generated
client-side. Never email, SSN, slug, or composite business fields as PK.CREATE INDEX CONCURRENTLY, SET lock_timeout, batched backfills, NOT VALID + VALIDATE CONSTRAINT.
Never an unbounded ALTER TABLE rewrite or blocking index build on a
table with traffic.SELECT *, no N+1.transaction_timeout is a backstop far above that; it kills the
session.)rules/01-choosing-and-modeling.md (opens in a new tab)rules/02-schema-migrations.md (opens in a new tab)rules/03-queries-and-indexes.md (opens in a new tab)rules/04-transactions-concurrency.md (opens in a new tab)rules/05-reliability-and-scale.md (opens in a new tab)rules/06-security-and-compliance.md (opens in a new tab)rules/07-vector-and-ai.md (opens in a new tab)rules/08-surrealdb-multimodel.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
PostgreSQL, SQL, Redis, pgvector, Qdrant
2 plugins ship this exact skill · first indexed Oct 30, 2026
43 skills in this plugin
/sotaMaster router for the SOTA engineering skills library. Use this skill whenever the user asks to build, design, implement, refactor, harden, optimize, review, or audit an application, service, or codebase and the request spans more than one domain — or when you are unsure which specific sota-* skill applies. Also use when working on a codebase you do not own: reviewing a pull request or diff, responding to code review, evaluating someone else's patch, or preparing an upstream contribution — including mid-session, once you are already reading source, a diff, or CI config. It maps the task (build or audit mode) to the right domain and language skills (Rust, Go, C/C++, JVM, Python, JS/TS, .NET/C#, PHP, Ruby, Swift). Trigger keywords: SOTA, best practices, audit my code, security review, compliance, hardening, prod readiness, code quality, pull request, PR review, review comment, maintainer feedback, patch, diff, upstream, contribute, merge request./sota-api-designState-of-the-art API design and audit guidance (2026) covering REST/HTTP, GraphQL, gRPC, WebSockets/SSE/realtime, webhooks, versioning/evolution, and API security/operations. Use when designing or building any API surface (endpoints, schemas, protos, realtime channels, webhook senders/receivers) AND when auditing/reviewing existing APIs for correctness, evolvability, security, and operational robustness. Not for browser UI, rendering, or client-framework concerns — use sota-web-frameworks or sota-frontend-design. Trigger keywords: API, REST, GraphQL, gRPC, endpoint, websocket, SSE, realtime, WebRTC, webhook, versioning, OpenAPI, pagination, idempotency, rate limit, problem+json, protobuf, deprecation.npx claudepluginhub martinholovsky/sota-skills --plugin sota-skillsOther plugins' skills for the same job