database-schema-designer · borghei — Claude Code skill for relational schemas
database-schema-designer — a Claude Code skill that turns product requirements into a normalized relational schema with tables, ORM models, RLS, indexes and migrations. Works across six platforms, including Codex, Cursor and Gemini CLI.
LicenseRef-MIT-Commons-Clause 183 installs ★ 1,183 updated 2026-11-08
npx skills add borghei/Claude-Skills --skill database-schema-designer -a claude-codeWhat database-schema-designer does
The skill targets PostgreSQL, MySQL and SQLite, and writes output as Drizzle, Prisma, TypeORM or Alembic. From a plain-language list of entities and relationships it builds tables, adds id, created_at, updated_at, and where needed deleted_at, organization_id and version. Primary keys use UUIDv7 or CUID2, which keeps B-tree inserts local.
Security gets its own pass. The skill generates Row-Level Security for tenant isolation, column-level PII encryption, and audit logging with before/after JSON snapshots. Migration planning covers rollback SQL and zero-downtime patterns for large tables.
Three Python scripts do the heavy lifting. schema_validator.py flags missing FK indexes and soft-delete tables without a partial index. migration_diffr.py produces forward and rollback SQL between two DDL versions. erd_generator.py renders a Mermaid ERD. You need Python 3 and a .sql file to run the first one.
What it helps with
- design tables from natural-language requirements
- add RLS and multi-tenancy to a single-tenant schema
- plan a migration with rollback for a large table
- catch missing foreign-key indexes
- render a Mermaid ERD
Example prompts for the agent
- Design tables for orders, products and customers, with soft deletes
- Run
schema_validator.pyonassets/schema.sqland show me the errors - Build a migration from
schema_v1.sqltoschema_v2.sql, with the rollback SQL
How to install database-schema-designer
1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-schema-designer -a claude-code2Manually: put the files in place
~/.claude/skills/database-schema-designer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/database-schema-designer/
1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-schema-designer -a codex2Manually: put the files in place
.agents/skills/database-schema-designer/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-schema-designer -a cursor2Manually: put the files in place
.cursor/skills/database-schema-designer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install borghei/Claude-Skills engineering/database-schema-designer/SKILL.md2Manually: put the files in place
.github/skills/database-schema-designer/SKILL.md1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-schema-designer -a gemini-cli2Platform CLI
gemini skills install https://github.com/borghei/Claude-Skills --path engineering/database-schema-designerManually: put the files in place
.devin/skills/database-schema-designer/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-schema-designer -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about database-schema-designer
How do I install database-schema-designer in Claude Code?
Run npx skills add borghei/Claude-Skills --skill database-schema-designer -a claude-code, then the skill lands in ~/.claude/skills/database-schema-designer/SKILL.md.
What does database-schema-designer do?
It turns product requirements into a normalized schema: tables, constraints, RLS, indexes, migrations, plus TypeScript or Python types. Supports PostgreSQL, MySQL and SQLite through Drizzle, Prisma, TypeORM or Alembic.
How is it different from engineering/database-designer?
This skill is for designing a new schema; database-designer is for deep analysis of an existing one and index tuning. The README draws that line explicitly.
Similar skills
All skills for Data and databases →database-schema-designer by other authors comes first.