mk:database — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mk:database (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.
Provides reference-backed guidance for database design tasks. PostgreSQL is the primary target; most patterns apply to MySQL and SQLite with minor syntax differences.
Phase: 1 (Plan) for schema design and migration planning Phase: 3 (Build) for implementation and query writing Handoff: Developer implements, reviewer validates per references/migration-patterns.md safety checklist
Determine which task is being requested:
| Task | Load Reference |
|---|---|
| Schema design (new tables, relationships) | references/schema-design.md |
| Migration (up/down, rollback, zero-downtime) | references/migration-patterns.md |
| Query writing or optimization | references/query-optimization.md |
| Multiple tasks | Load all relevant references |
Check the project for database markers:
| Marker | Database |
|---|---|
postgres:// or postgresql:// in env/config | PostgreSQL |
mysql:// or mysql2 package | MySQL |
sqlite3 package or .sqlite file | SQLite |
mongodb:// or mongoose | MongoDB |
If PostgreSQL or unknown → use PostgreSQL syntax (most complete). If MySQL/SQLite → note any syntax differences in the response. MongoDB → schema-design and query-optimization references apply conceptually; migrations differ.
Load the relevant reference file(s) and apply the patterns to the specific task.
Always validate the output against these checks:
Schema checklist:
created_at and updated_at timestamps presentMigration checklist:
Query checklist:
SELECT * in production queriesLIMIT present on unbounded queriesReturn:
NEVER write SQL with string interpolation or template literals — parameterized queries only. See security-rules.md — SQL injection is a blocked pattern.
-- BLOCKED: string interpolation
WHERE id = ${userId}
-- CORRECT: parameterized
WHERE id = $1 -- PostgreSQL
WHERE id = ? -- MySQL/SQLitereferences/schema-design.md — naming, normalization, common patterns, anti-patternsreferences/migration-patterns.md — safe migrations, zero-downtime, rollbackreferences/query-optimization.md — indexing, N+1, EXPLAIN, paginationALTER TABLE users ADD COLUMN verified BOOLEAN NOT NULL acquires an exclusive lock for the full backfill; add the column as nullable first, backfill in batches, then add the NOT NULL constraint with ALTER TABLE ... SET NOT NULL (uses constraint scan, not rewrite, on PG 12+).ShareLock; on a table with high write throughput this causes queue buildup in pg_stat_activity; always use CREATE INDEX CONCURRENTLY in production, noting it cannot run inside a transaction block.ON DELETE CASCADE before batch-deleting seed or test data in production.EXPLAIN ANALYZE DELETE FROM ... will delete rows; always wrap in a transaction and rollback, or use EXPLAIN (ANALYZE, BUFFERS) only on SELECT queries unless you understand the side effect.pool_timeout fires; the symptom looks like a slow query but pg_stat_activity shows dozens of idle in transaction connections from callers that forgot to release; always release connections in a finally block.REPEATABLE READ or SERIALIZABLE for financial or inventory operations where consistency across reads matters.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.