Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/designing-database-schemas
Process use when you need to work with database schema design. This skill provides schema design and migrations with comprehensive guidance and automation. Trigger with phrases like "design schema", "create migration", or "model database".
Passed 19 of 22 test cases with the skill, and 16 of 22 without it.
and 1 more in the full report
3 fixed16 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
When delivering a completed database schema design that includes reference tables for ISO country codes and system user roles, what type of SQL script must be included alongside the CREATE TABLE DDL?
| Checked | Without skill | With skill |
|---|---|---|
| Includes seed INSERT statements for reference lookup data tables | Missed | Passed |
The instructions your model reads when the skill loads.
Design normalized relational database schemas from business requirements, entity-relationship diagrams, or existing application code. This skill produces PostgreSQL or MySQL DDL with proper data types, constraints, indexes, and relationships following normalization principles (3NF by default) with strategic denormalization where performance requires it.
psql or mysql CLI for testing schema DDLIdentify all entities (nouns) from the business requirements. Each entity becomes a table. List every attribute (property) of each entity and classify as required or optional.
Define primary keys for each table. Prefer BIGSERIAL (PostgreSQL) or BIGINT AUTO_INCREMENT (MySQL) for surrogate keys. Use UUID (via gen_random_uuid()) for distributed systems or when IDs are exposed in URLs. Natural keys are acceptable when truly immutable and unique (ISO country codes, IATA airport codes).
Normalize the schema to Third Normal Form (3NF):
Define relationships between tables:
orders.customer_id REFERENCES customers(id).product_categories(product_id, category_id) with a composite primary key.Choose appropriate data types with precision:
NUMERIC(12,2) or INTEGER storing cents (never FLOAT/DOUBLE)TIMESTAMPTZ (PostgreSQL) with time zone for events; DATE for calendar datesVARCHAR(20) with CHECK constraint, or create an ENUM typeCITEXT (PostgreSQL) or VARCHAR(254) with CHECK constraint for format validationJSONB (PostgreSQL) for flexible schema attributes; avoid for core relational dataAdd standard columns to every table:
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() (with trigger for auto-update)test cases passed, vs 16 / 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.