Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs relational and document schemas: keys, constraints, query-driven indexes, ERDs, reversible migrations; defaults to PostgreSQL.
82% 73%−9 ptsof test cases passed
Passed 16 of 22 test cases with the skill, and 18 of 22 without it.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Current major version: PostgreSQL 18. Features marked (18) need 18 or later; say so when the user's version is older.
snake_case, plural table names (users, order_items), singular column names.<referenced_singular>_id (user_id, org_id).users_email_key, tasks_project_id_fkey, idx_tasks_project_due_open.user, order, group).| Choice | Use when | Notes |
|---|---|---|
bigint GENERATED ALWAYS AS IDENTITY | Internal IDs, single database | Smallest and fastest. Prefer identity over serial, which is legacy. |
uuid DEFAULT uuidv7() (18) | IDs exposed in URLs, generated across services, merged datasets | Time-ordered, so inserts stay local in the B-tree index, unlike random UUIDv4. On 17 or earlier, generate UUIDv7 in the app or use gen_random_uuid(). |
| Natural key | Stable codes such as ISO country codes | Rarely; natural keys change more than people expect. |
UUIDv7 embeds the creation time; do not use it where exposing that time is a problem.
| Data | Use | Avoid |
|---|---|---|
| Text | text, with a CHECK (char_length(x) <= n) if a limit matters | varchar(255) by habit; there is no performance gain |
| Timestamps | timestamptz | timestamp without time zone |
| Dates only | date | Strings |
| Money | numeric(12,2) or integer minor units (amount_cents bigint) | real, double precision, money |
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.