database-schema-designer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited database-schema-designer (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.
Design a schema that enforces the data's rules in the database and makes the app's real queries fast.
docker-compose.yml, ORM config, or Supabase project if present)bigint generated always as identity or uuid DEFAULT uuidv7() primary keys, text over varchar(n), timestamptz for every timestamp, numeric for money.NOT NULL wherever a value is required, UNIQUE for natural keys, CHECK for ranges and allowed values, foreign keys with a deliberate ON DELETE choice for each. Data rules that live only in app code get broken by the next script or admin fix.UNIQUE or primary key already provides.postgres:18, a Supabase branch), run the DDL, insert a few rows, and EXPLAIN the key queries to confirm the planned indexes are used. Otherwise, walk each query from step 1 against the schema by hand. Then check the list below.ON DELETE behavior and an index on the referencing column.varchar(255) by habit.updated_at actually updates: a DEFAULT now() only sets it on insert, so add a trigger or set it in the ORM.tenant_id (or org_id), include it in unique constraints and leading index columns, and have row-level security if the database is reachable from clients (always on Supabase).Request: "Multi-tenant project tracker: orgs, users who can belong to several orgs, projects per org, tasks per project. The main screen lists a project's open tasks by due date."
orgs, users, org_members (N:M between users and orgs with a role), projects (N:1 org), tasks (N:1 project, optional assignee).ON tasks (project_id, due_at) WHERE status <> 'done'.UNIQUE (org_id, user_id) on org_members; CHECK (role IN ('owner','admin','member')); status limited by CHECK; unique project name per org with UNIQUE (org_id, name).tasks.assignee_id to null instead of deleting tasks.tasks carries org_id so row-level security can check membership without a join through projects, and a composite foreign key (project_id, org_id) -> projects (id, org_id) keeps the two consistent.The full DDL for this example is in references/schema-templates.md.
ENUM types for values that will change. Adding a value is easy, but removing or renaming one is painful; a CHECK constraint or lookup table is easier to evolve.deleted_at) added everywhere by default. They leak into every query and unique constraint. Use them where there is a real restore or audit need, and pair them with partial unique indexes.commentable_type + commentable_id) that the database cannot enforce. Prefer separate nullable FKs with a CHECK that exactly one is set, or separate tables.jsonb. JSON is for sparse or truly variable attributes; anything you filter, join, or constrain on deserves a column.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.