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
Tested on PostgreSQL 18. Adapt names and types to the domain; for PostgreSQL 17 or earlier, replace uuidv7() with gen_random_uuid() or an app-generated UUIDv7.
-- Shared trigger function: keep updated_at current on every UPDATE
CREATE OR REPLACE FUNCTION set_updated_at() RETURNS trigger
LANGUAGE plpgsql AS $$
BEGIN
NEW.updated_at := now();
RETURN NEW;
END;
$$;
CREATE TABLE orgs (
id uuid PRIMARY KEY DEFAULT uuidv7(),
name text NOT NULL CHECK (char_length(name) BETWEEN 1 AND 200),
slug text NOT NULL UNIQUE,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now()
);
CREATE TABLE users (
id uuid PRIMARY KEY DEFAULT uuidv7(),
email text NOT NULL,
full_name text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now()
);
-- Case-insensitive uniqueness; also serves lookups by lower(email)
CREATE UNIQUE INDEX users_email_lower_key ON users (lower(email));
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.