postgres-schema

Design PostgreSQL schemas with naming conventions, constraints, and migration patterns.

3|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/eco2-team/backend --skill postgres-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-schema
Source: https://github.com/eco2-team/backend/tree/main/.claude/skills/postgres-schema
Command: npx skills add https://github.com/eco2-team/backend --skill postgres-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a concise blueprint for designing scalable PostgreSQL schemas, covering naming conventions, data types, constraints, indexing, and migration patterns to help teams build maintainable databases.

Core Features & Use Cases

  • Schema design principles: TIMESTAMPTZ usage, data type strategy, and normalization guidelines to ensure consistency.
  • Naming conventions and standard templates for schemas, tables, columns, PK/FK constraints, and indexes.
  • Migration patterns: versioned migrations, soft delete patterns, and audit-friendly timestamps.
  • Use Case: When designing a new domain (e.g., chat, users, orders), apply the guide to create coherent schemas quickly.

Quick Start

Define a new schema using the standard template and create the primary tables with appropriate PKs, FKs, and indexes.

Frequently Asked Questions about postgres-schema

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

FAQPage Schema
What are the best practices for PostgreSQL schema design?

PostgreSQL schema design best practices include using TIMESTAMPTZ for timestamps, applying consistent naming conventions, and enforcing normalization guidelines to ensure database scalability and maintainability.

How do I create a scalable PostgreSQL schema for a new domain?

To create a scalable PostgreSQL schema, apply standard templates for tables, define primary and foreign key constraints, implement strategic data types, and add appropriate indexes to support your specific domain requirements.

What PostgreSQL data types and constraints should I use for maintainable databases?

For maintainable PostgreSQL databases, use TIMESTAMPTZ for dates, choose appropriate data types to ensure consistency, and enforce constraints like primary keys and foreign keys to maintain data integrity across your schemas.

How do I handle database migrations in PostgreSQL?

Handle PostgreSQL database migrations by using versioned migration patterns, implementing soft delete patterns, and applying audit-friendly timestamps to ensure changes are tracked and schemas remain maintainable across updates.

When do I need indexing in my PostgreSQL schema?

You need indexing in your PostgreSQL schema when optimizing query performance for specific access patterns, applying index templates alongside primary and foreign key constraints to ensure efficient data retrieval as your database grows.