db-sculptor

Design PostgreSQL schemas, indexes, and zero-downtime migrations with Prisma or Drizzle.

110|14|Updated May 12, 2026
One-click install
npx skills add https://github.com/EliasOulkadi/shokunin --skill db-sculptor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-sculptor
Source: https://github.com/EliasOulkadi/shokunin/tree/main/.pack/skills/db-sculptor
Command: npx skills add https://github.com/EliasOulkadi/shokunin --skill db-sculptor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It helps you design and evolve relational database schemas without slow queries or unsafe migrations by selecting the right keys, indexes, and migration strategy for PostgreSQL with Prisma or Drizzle.

Core Features & Use Cases

  • Schema design from access patterns: prioritizes reads/writes, latency budgets, and query shapes to choose normalization vs selective denormalization.
  • Index and query optimization for PostgreSQL: recommends B-tree, composite, partial, covering (INCLUDE), GIN, GiST, BRIN, and Hash indexes using EXPLAIN ANALYZE-driven diagnosis.
  • Zero-downtime migration planning: produces expand/contract migration sequences (e.g., nullable-backfill-not-null, CREATE INDEX CONCURRENTLY) and guardrails to avoid locking and breaking changes.
  • Use case: You need to add a new search feature and your current queries are timing out; design the schema changes, add the proper GIN index (e.g., FTS with GIN), and produce an expand/contract migration plan that won’t block production traffic.

Quick Start

Ask the AI to design your PostgreSQL schema for the access patterns you describe, propose the minimum index set, and generate a safe Prisma/Drizzle migration plan to implement it with zero downtime.

Frequently Asked Questions about db-sculptor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow PostgreSQL queries using EXPLAIN ANALYZE?

To optimize slow PostgreSQL queries using EXPLAIN ANALYZE, you diagnose execution plans and apply targeted index strategies like B-tree, GIN, GiST, BRIN, or partial/covering indexes to reduce latency and eliminate timeouts.

What is an expand/contract zero-downtime migration in PostgreSQL?

An expand/contract zero-downtime migration is a sequence that safely evolves PostgreSQL schemas by adding nullable fields or using CREATE INDEX CONCURRENTLY, then backfilling data and cleaning up, avoiding blocking locks and breaking changes in production.

How do I design a PostgreSQL schema from access patterns with Prisma or Drizzle?

To design a PostgreSQL schema from access patterns with Prisma or Drizzle, you prioritize reads, writes, and latency budgets to choose between normalization and selective denormalization, generating the corresponding ORM definitions.

When do I need a GIN index instead of a B-tree index in PostgreSQL?

You need a GIN index instead of a B-tree index in PostgreSQL when implementing full-text search or querying array elements, as GIN indexes support these complex data types better than standard B-tree structures.

How do I add a full-text search feature to PostgreSQL without blocking production traffic?

To add a full-text search feature to PostgreSQL without blocking production traffic, you design schema changes, add a GIN index concurrently, and execute an expand/contract migration plan to avoid locking.

How do I avoid locking when creating indexes in PostgreSQL?

To avoid locking when creating indexes in PostgreSQL, you use CREATE INDEX CONCURRENTLY within an expand/contract migration sequence, ensuring concurrent query execution without blocking production traffic.