Install any skill in seconds. Free to start, no credit card required.
Get Started Free →onewave-ai/database-schema-designer
Design optimized database schemas for SQL and NoSQL databases including tables, relationships, indexes, and constraints. Creates ERD diagrams, migration scripts, and data modeling best practices.
Passed 6 of 22 test cases with the skill, and 17 of 22 without it.
1 fixed15 passed either way3 still failing3 broke
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
A test case the skill fixed. Same model, same prompt, with and without the skill.
We are designing a high-volume MySQL InnoDB database for invoicing. To prevent primary key fragmentation while maintaining unique identity, should we use sequential auto-increment BIGINT primary keys or standard random UUID v4 strings as clustered primary keys? Provide the DDL and migration scripts.
| Checked | Without skill | With skill |
|---|---|---|
| The MySQL primary key definition uses BIGINT AUTO_INCREMENT. | Passed | Passed |
| The down migration script contains DROP TABLE commands. | Missed | Passed |
The instructions your model reads when the skill loads.
Design a schema that enforces the data's rules in the database and makes the app's real queries fast.
Collect requirements. Get from the conversation or codebase, and ask only for what blocks the design:
docker-compose.yml, ORM config, or Supabase project if present)Model entities and relationships. List entities, attributes, and cardinality (1:1, 1:N, N:M). Normalize to 3NF by default; denormalize only for a named query that needs it, and say which.
Choose keys and types using references/postgres.md (or references/other-engines.md for MySQL, SQLite, MongoDB). Defaults for Postgres: bigint generated always as identity or uuid DEFAULT uuidv7() primary keys, text over varchar(n), timestamptz for every timestamp, numeric for money.
Encode the rules as constraints. 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.
Derive indexes from the queries in step 1, not from a checklist. For each query, name the index that serves it. Index every foreign key column you join or cascade on (Postgres does not do this automatically). Do not add an index a UNIQUE or primary key already provides.
Write the deliverable: DDL, ERD, index rationale, and migrations with rollback, using references/schema-templates.md and the layout in references/output-format.md. Match the user's migration tool if they have one.
Verify. If a database is available (local Postgres, Docker 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."
test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.