sota-databases — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sota-databases (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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 beforewriting any DDL. Default to Postgres unless a rule there says otherwise.
ad hoc; produce migration files following rules/02-schema-migrations.md (expand/contract, lock-aware, reversible-or-documented).
will run in production, state which index serves it. Follow rules/03-queries-and-indexes.md.
level, locking strategy, retry behavior (rules/04-transactions-concurrency.md).
monitoring hooks, and retention are not "later" items (rules/05-reliability-and-scale.md, rules/06-security-and-compliance.md).
not a feature.
Use when reviewing an existing schema, migration set, query workload, ORM usage, or database configuration.
Procedure:
migration tooling, ORM, pooling setup, backup/replication config.
actual schema/queries — never report a finding you have not confirmed in the code or DDL.
Severity conventions:
possible: untested/missing backups, SQL injection, unconstrained deletes, missing FK causing orphaned money/auth rows, RLS bypass, plaintext secrets.
hot table, table rewrite migration without expand/contract, missing unique constraint under concurrent writes, unbounded long transactions, no lock_timeout in migrations, offset pagination on large tables in hot paths.
composite index for a known query, soft delete without partial indexes, natural primary keys, missing updated_at/audit trail where required.
columns, redundant indexes, suboptimal types (e.g., varchar(255) cargo cult).
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, or multi-tenancy. |
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, 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.
reason that Postgres (with JSONB, partitioning, pgvector, LISTEN/NOTIFY) cannot meet — not a vibe.
AS IDENTITY` internally, UUIDv7 when IDs are exposed or generated client-side. Never email, SSN, slug, or composite business fields as PK.
application version. Add → migrate code → backfill → contract, as separate deploys.
CREATE INDEX CONCURRENTLY, `SETlock_timeout, batched backfills, NOT VALID + VALIDATE CONSTRAINT. Never an unbounded ALTER TABLE` rewrite or blocking index build on a table with traffic.
keys, NOT NULL, and CHECK live in the schema. Application-level "validation only" uniqueness is a race condition, not a constraint.
a query uses (or justify a seq scan), the query is not done. Keyset pagination, no SELECT *, no N+1.
idempotency keys — any write that a client, queue, or webhook may retry must be safe to execute twice.
restores rehearsed, RPO/RTO stated. Replication is not backup.
DROP, and cannot read tables it does not use. Migrations run as a separate role. No superuser connection strings in app config.
loops inside a transaction. Long transactions cause bloat, lock queues, and replication lag — treat any transaction over ~1s as a design bug.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.