personal-database-conventions
Installation
SKILL.md
Database Conventions
Engine-specific routing
- PostgreSQL -
supabase-postgres-best-practicesfor query patterns, indexing, partitioning. Ignore its RLS / Supabase-tenancy rules unless the project actually uses DB-enforced tenancy. - SQL Server / T-SQL -
query-optimization(rewrites, SARGability, plan reading),index-strategies(clustered / nonclustered / filtered / columnstore),tsql-functions(function catalog). - SQLite - no dedicated skill; treat as Postgres-lite: WAL mode by default, single-writer per file, pragmas at connection open,
INTEGER PRIMARY KEYfor autoincrement, no concurrent writers across processes. - MongoDB / document stores - no dedicated skill; apply document-modeling care: embed vs reference per access pattern, index every queried field path, bound array growth, no unbounded
$lookup.
Query safety
- Never write raw SQL strings in application code. Use parameterized queries or ORM. Concatenation is forbidden even for "safe" inputs.
- Never log query text containing parameter values that may carry PII / secrets.
- Default reads to read-only intent (transaction isolation
READ COMMITTEDminimum;SNAPSHOT/REPEATABLE READonly when needed and justified). - Bound every result set:
LIMIT/TOPon any query that could grow unboundedly. NoSELECT *.