Agent skill

Database Schema Designer

by borghei in borghei/Claude-Skills

Design relational schemas from requirements with normalization, migrations, ERDs, RLS policies, and indexes for PostgreSQL, MySQL, and SQLite.

MITAuto-check passedDatabases

Install Database Schema Designer

skills CLI
$ npx skills add borghei/Claude-Skills --skill database-schema-designer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borghei/Claude-Skills database-schema-designer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/database-schema-designer .claude/skills/database-schema-designer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database-schema-designer
GitHub stars
874
Token cost
~1.7k tokens
SKILL.md length
699 words
Files
7 (incl. scripts, references)
Skills in repo
364
Repo updated
First seen
Licence
MIT

At a glance

Design relational schemas from requirements with normalization, migrations, ERDs, RLS policies, and indexes for PostgreSQL, MySQL, and SQLite.

  • Designing new features
  • SKILL.md covers Keywords, Core Capabilities, When to Use and Clarify First, plus 4 more sections
  • Runs Python scripts from its folder; calls python
  • Reviewing schemas

What it does

Database Schema Designer is an agent skill from borghei/Claude-Skills. 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.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/best-practices-and-troubleshooting.md`, `references/indexes-and-migrations.md` and `references/schema-design-and-security.md`).

It sits in Databases, covering Database schema design and Multi-tenancy. It works with PostgreSQL, MySQL, SQLite and Prisma. The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Designing new features
  • Reviewing schemas
  • Adding multi-tenancy

Example prompts

  • “/database-schema-designer”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit c9a1487. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Schema Designer loads about 1.7k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 699 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from borghei/Claude-Skills at commit c9a1487, republished under its MIT licence (© borghei). 699 words, ~1,678 tokens.

Download SKILL.mdSave it as .claude/skills/database-schema-designer/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
database-schema-designer
description
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.
license
MIT + Commons Clause
metadata.version
1.1.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
data-architecture
metadata.tier
POWERFUL
metadata.updated
2026-06-17
metadata.frameworks
drizzle, prisma, alembic, typeorm

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. If any is unknown or vague, ASK — do not assume:

  • Requirements or existing DDL — the entities/relationships in natural language, or the schema to review (the source the design is derived from)
  • Engine & ORM — PostgreSQL/MySQL/SQLite and Drizzle/Prisma/TypeORM/Alembic (sets the migration and type-generation output format)
  • Cross-cutting needs — multi-tenancy/RLS, soft deletes, audit trails, or temporal data (determines which patterns and policies are generated)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Tools

ToolPurposeCommand
erd_generator.pyParse SQL DDL and generate a Mermaid ER diagrampython scripts/erd_generator.py schema.sql -o erd.mmd
migration_diffr.pyDiff two SQL schemas into migration ALTER statements (with rollback)python scripts/migration_diffr.py old.sql new.sql
schema_validator.pyValidate DDL for normalization violations, missing indexes, namingpython scripts/schema_validator.py schema.sql --strict

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

  • references/schema-design-and-security.md — the 4-step requirements-to-schema process, the full Drizzle ORM schema example, cross-cutting concerns, and PostgreSQL Row-Level Security policies. Read when designing a new schema or adding multi-tenancy.
  • references/indexes-and-migrations.md — the index-type decision framework, index anti-patterns, zero-downtime migration patterns (add NOT NULL column, rename column), and Mermaid ERD generation. Read when choosing indexes or planning a safe migration.
  • references/best-practices-and-troubleshooting.md — common pitfalls, best practices, the troubleshooting table, and the success-criteria bar. Read before shipping a schema or when diagnosing a problem.
Show full SKILL.md (264 more words)Show less

Scope & Limitations

This skill covers:

  • Relational schema design for PostgreSQL, MySQL, and SQLite including normalization through 3NF
  • Migration generation and zero-downtime migration planning for Drizzle, Prisma, TypeORM, and Alembic
  • Row-Level Security policies, index strategy, and type generation (TypeScript and Python)
  • Cross-cutting patterns: multi-tenancy, soft deletes, audit trails, optimistic locking, and temporal data

This skill does NOT cover:

  • NoSQL or document database design (MongoDB, DynamoDB, Cassandra) — see senior-data-engineer for broader data store guidance
  • Query optimization and execution plan analysis beyond index recommendations — see performance-profiler for runtime profiling
  • Database infrastructure provisioning, replication, or failover configuration — see senior-cloud-architect for cloud database setup
  • Application-layer ORM patterns, connection pooling, or caching strategies — see senior-backend for backend architecture decisions

Integration Points

SkillIntegrationData Flow
migration-architectHands off generated DDL and migration files for sequencing across servicesSchema Designer produces migrations, Migration Architect orchestrates cross-service rollout order
api-design-reviewerSchema entities map directly to API resource models and endpoint structureSchema entities and relationships feed into REST/GraphQL resource definitions and validation rules
senior-backendGenerated types and ORM schemas plug into repository and service layersTypeScript interfaces and Pydantic models from schema become the backend's data access contracts
performance-profilerIndex strategy recommendations are validated against real query execution plansSchema Designer proposes indexes, Performance Profiler confirms effectiveness with EXPLAIN ANALYZE data
senior-secopsRLS policies and column encryption align with security compliance requirementsSecurity requirements flow in, RLS policies and encryption specifications flow out for audit verification
observability-designerAudit log schema provides the foundation for operational dashboards and alertingAudit log table structure feeds into observability pipelines for change tracking and anomaly detection

© borghei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in engineering/database-schema-designer of borghei/Claude-Skills.

  • SKILL.md
  • references/best-practices-and-troubleshooting.md
  • references/indexes-and-migrations.md
  • references/schema-design-and-security.md
  • scripts/erd_generator.py
  • scripts/migration_diffr.py
  • scripts/schema_validator.py

Open the folder on GitHubat commit c9a1487

Compare with similar skills

Database Schema Designer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database Schema Designer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Schema Designer this skillborghei/Claude-Skills874—~1.7kAutomated safety check: PassMIT
Database Expertcin12211/orca-q223—~2.8kAutomated safety check: PassMIT
Safe Database Migration Patternsaffaan-m/ECC274k—~3.3kAutomated safety check: PassMIT
Database Schema DesignerOneWave-AI/claude-skills322—~1.6kAutomated safety check: PassMIT
Better Drizzlealmeidazs/better-drizzle347—~1.7kAutomated safety check: PassApache-2.0
Prisma Database Setupcurvenote/curvenote1693 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Database Expert

    cin12211/orca-q

    Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.

    223 GitHub stars~2.8k tokensUpdated 16 days ago
    DatabasesAuto-check passed
  • Rules and examples for safe, reversible schema changes in production: zero-downtime column and index changes, large data backfills and ORM migration workflows.

    274k GitHub stars~3.3k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Database Schema Designer

    OneWave-AI/claude-skills

    Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and…

    322 GitHub stars~1.6k tokensUpdated 5 days ago
    DatabasesAuto-check passed
  • Better Drizzle

    almeidazs/better-drizzle

    Write, review, and debug code that uses better-drizzle, the typed repository layer over Drizzle ORM 1.x (better(db), client.users.findMany, paginate, cursor, upsertMany, relation include/connect…

    347 GitHub stars~1.7k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Prisma Database Setup

    curvenote/curvenote

    Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.).

    169 GitHub starsUsed in 3 repos~1.4k tokens
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    240 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed

More from borghei/Claude-Skills

All 364 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    874 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    874 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    874 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    874 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Database Schema Designer

What does Database Schema Designer do?

Design relational schemas from requirements with normalization, migrations, ERDs, RLS policies, and indexes for PostgreSQL, MySQL, and SQLite. Database Schema Designer is an agent skill from borghei/Claude-Skills. Design relational schemas from requirements with normalization, migrations, ERDs, RLS policies, and indexes for PostgreSQL, MySQL, and SQLite.

When should I use Database Schema Designer?

Database Schema Designer fits situations like: designing new features; reviewing schemas; adding multi-tenancy.

How do I install Database Schema Designer in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill database-schema-designer -a claude-code`. Or copy the skill folder (engineering/database-schema-designer in borghei/Claude-Skills) into .claude/skills/database-schema-designer in your project. Claude Code loads it when a task matches its description.

How do I install Database Schema Designer in Codex?

Run `npx skills add borghei/Claude-Skills --skill database-schema-designer -a codex`. Or copy the skill folder (engineering/database-schema-designer in borghei/Claude-Skills) into .agents/skills/database-schema-designer in your project. Codex loads it when a task matches its description.

Can I use Database Schema Designer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borghei/Claude-Skills --skill database-schema-designer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-schema-designer, .gemini/skills/database-schema-designer, .github/skills/database-schema-designer and .opencode/skills/database-schema-designer in your project.

What does Database Schema Designer need to run?

Going by SKILL.md and its folder, Database Schema Designer needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Database Schema Designer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Database Schema Designer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Database Schema Designer use?

Database Schema Designer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Schema Designer use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4k tokens, read only when the agent opens those files.

What are the alternatives to Database Schema Designer?

Skills that share tags, products or a category with Database Schema Designer: Database Expert (cin12211/orca-q, 223 stars), Safe Database Migration Patterns (affaan-m/ECC, 274k stars), Database Schema Designer (OneWave-AI/claude-skills, 322 stars) and Better Drizzle (almeidazs/better-drizzle, 347 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Schema Designer?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 874 GitHub stars. The repository holds 364 skills in this directory. The repository was last updated on October 7, 2026.

Source: borghei/Claude-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.