Проектирование PostgreSQL: схемы, индексы и миграции
★ 7.5 · general
postgres-database is a Claude Code skill that encodes best practices for PostgreSQL schema design, indexing strategies, and query patterns. It covers normalization to 3NF with soft deletes via `deleted_at`, indexing guidelines including composite, partial, and GIN indexes for full-text search, and Alembic migration templates with `upgrade`/`downgrade` examples. Query patterns include keyset pagination instead of OFFSET for large tables, upsert with `ON CONFLICT`, and JOIN-based N+1 elimination. The skill enforces rules such as never using `SELECT *` in production, always using parameterized queries to prevent SQL injection, and relying on connection pooling via PgBouncer or SQLAlchemy. Use it when designing schemas, writing migrations, or diagnosing slow queries.