Agent skill · software engineering · borghei
database-schema-designer
Design relational schemas from requirements with normalization, migrations, ERDs, RLS policies, and indexes for PostgreSQL, MySQL, and SQLite. Use when designing new features, reviewing schemas, or adding multi-tenancy.
Why this skill is useful
Adds executable scripts for ERD generation, migration diffs, and schema validation that enhance database design capabilities.
What it needs
Requires python installed locally. About 3k tokens when loaded. Last updated 2026-07-21. 462 stars on the source repository.
What this skill does
Database Schema Designer Design normalized relational database schemas from requirements and generate migrations, TypeScript/Python types, seed data, Row-Level Security policies, index strategies, and ERD diagrams. Handles multi-tenancy, soft deletes, audit trails, optimistic locking, polymorphic associations, and temporal data patterns. Supports PostgreSQL, MySQL, and SQLite with Drizzle, Prisma, TypeORM, and Alembic. Keywords database schema, schema design, normalization, migration, ERD, row-level security, indexing, multi-tenancy, soft deletes, audit trail, Drizzle, Prisma, PostgreSQL Core Capabilities Schema design from requirements — extract entities/relationships from natural language, apply 1NF–3NF normalization, add timestamps/soft-delete/audit/versioning, generate complete DDL. Migration planning — forward and rollback migrations, zero-downtime patterns for large tables, column additions/type changes/backfills across Drizzle, Prisma, TypeORM, Alembic, and raw SQL. Index strategy — composite, partial, covering, and GIN/GiST indexes mapped to query patterns; bloat detection and maintenance. Type generation — TypeScript interfaces + Zod schemas and Python dataclasses + Pydantic models from the DB schema (enums as string unions). Security — Row-Level Security for multi-tenant isolation, column-level PII encryption, audit logging with before/after JSON snapshots. When to Use Designing tables for a new feature Reviewing an existing schema for normalization or performance issues Adding multi-tenancy to a single-tenant schema Planning a breaking schema migration Generating ERD documentation for a service Clarify First Before designing the schema, confirm these inputs. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills borghei/database-schema-designer