database-designer

Installation
SKILL.md

Database Designer

The agent analyses an existing relational schema for normalization, constraint, naming and type problems, recommends indexes for the queries that actually run, and generates forward and rollback migrations between two schema versions. To design a new schema from product requirements (ERDs, RLS, ORM models), use engineering/database-schema-designer instead.

When to Use

  • Reviewing a schema (DDL or JSON) before or after a change.
  • Choosing or pruning indexes for a known set of queries.
  • Turning a schema diff into a migration with rollback and validation queries, optionally zero-downtime (expand-contract).
  • Choosing between database engines for a workload (reference only).

Clarify First

Before designing or migrating, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Task: schema analysis/ERD, index optimization, or migration generation (selects schema_analyzer.py vs index_optimizer.py vs migration_generator.py).
  • Engine: PostgreSQL or MySQL (drives the DDL dialect; for choosing an engine, see the selection reference).
  • Schema input & query patterns: the DDL/JSON schema and the queries to optimize for (the input the tools analyze; index recommendations depend on the query patterns).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Installs
176
GitHub Stars
1.2K
First Seen
Feb 28, 2026