db-sculptor

Solid

Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and sharding/partitioning. Use when user asks to design schema, create migrations, optimize slow queries, add indexes, choose between SQL/NoSQL, or set up Prisma/Drizzle. Do NOT use for data warehouse dimensional modeling, ETL pipeline design, or non-relational (MongoDB, DynamoDB) schema design.

API & Backend 96 stars 12 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
66
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# DB Sculptor Design performant database schemas. Model for access patterns first, normalize later. Based on PostgreSQL internals, Prisma/Drizzle best practices, and production patterns from PlanetScale, Neon, and pganalyze. ## Sub-Commands | Command | Description | |---------|-------------| | `design` | Design a schema from access patterns and data volume estimates | | `index` | Analyze queries and recommend/create optimal indexes | | `optimize` | Diagnose slow queries with EXPLAIN ANALYZE and fix them | | `migrate` | Create a safe, zero-downtime migration (expand/contract) | | `audit` | Audit existing schema against best practices and anti-patterns | ## Workflow ### Step 1: Model for access patterns | Question | Determine | |----------|-----------| | Read/write ratio? | How many indexes can the table support | | Data volume? | Current rows, growth rate/month | | Consistency requirements? | ACID vs eventual, read replicas OK? | | Latency budget? | p50 < 5ms, p95 < 50ms, p99 < 200ms | **Decision tree:** - High write volume, simple reads → Normalize (3NF). Minimum indexes. - High read volume, complex joins → Denormalize strategically. Add composite + covering indexes. - Time-series data → Partition by time (monthly). BRIN indexes on timestamp. - Full-text search needed → GIN index with `tsvector` + `tsquery`. - JSON queries → GIN index on JSONB column. ### Step 2: Primary key strategy | PK type | Pros | Cons | When | |---------|------|------|------| | UUIDv7 | Time-so...

Details

Author
EliasOulkadi
Repository
EliasOulkadi/shokunin
Created
1 months ago
Last Updated
yesterday
Language
HTML
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

dbdesign

Design and review production database schemas, data models, ERDs, migration plans, and storage patterns. Use for OLTP schema design, OLAP/star-schema modeling, fact/dimension tables, indexes, constraints, partitioning, multi-tenant data models, CSV/JSON-to-table design, schema review, migration risk review, and database design documents across PostgreSQL, MySQL, SQLite/D1, BigQuery, and MongoDB. Does not execute DDL by default.

0 Updated today
vanducng
API & Backend Listed

schema-architect

Design database schemas, indexes, and migration files. Covers Postgres, MySQL, SQLite, and MongoDB. Catches normalization mistakes, designs index strategy from the query patterns, writes reversible migrations with up/down halves, and flags the foreign-key + cascade choices people usually get wrong. Use when the user says "design the schema", "model this data", "create a migration", "what indexes do I need", "is this normalized", or pastes an ER sketch and asks for a real schema.

0 Updated 6 days ago
ak-ship
API & Backend Listed

schema-architect

Design database schemas, indexes, and migration files. Covers Postgres, MySQL, SQLite, and MongoDB. Catches normalization mistakes, designs index strategy from the query patterns, writes reversible migrations with up/down halves, and flags the foreign-key + cascade choices people usually get wrong. Use when the user says "design the schema", "model this data", "create a migration", "what indexes do I need", "is this normalized", or pastes an ER sketch and asks for a real schema.

0 Updated 6 days ago
ashishkumar14