postgresql-patterns

Analyze PostgreSQL schemas, queries, and migration patterns for production databases.

7|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/Jonathan0823/opencode-config --skill postgresql-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-patterns
Source: https://github.com/Jonathan0823/opencode-config/tree/main/skills/postgresql-patterns
Command: npx skills add https://github.com/Jonathan0823/opencode-config --skill postgresql-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL pattern design, indexing, and migration best practices to ensure scalable, high-performance production databases. It guides you through schema design, indexing strategies, query patterns, JSONB usage, full-text search, and safe zero-downtime migrations.

Core Features & Use Cases

  • Schema design and data integrity patterns including appropriate data types, constraints, and relationships.
  • Efficient indexing and query patterns for production workloads: targeted indexes, partial/indexed scans, and JSONB indexing.
  • Migration and upgrade guidance including zero-downtime strategies, backfills, and transactional safety.
  • JSONB, full-text search, and advanced querying patterns for real-world apps.

Quick Start

Review current database design and apply the PostgreSQL patterns described in this guide. Start by auditing your index usage, identifying long-running queries, and implementing a partitioning strategy where appropriate.

Frequently Asked Questions about postgresql-patterns

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

FAQPage Schema
How do I optimize PostgreSQL query performance for production workloads?

PostgreSQL query optimization involves auditing index usage, targeting efficient indexed scans, and applying schema design patterns to reduce latency in production database workloads.

What's the best way to execute zero-downtime PostgreSQL migrations?

Zero-downtime PostgreSQL migrations require backfilling strategies, transactional safety boundaries, and incremental schema upgrades to ensure continuous availability during production deployments.

How does JSONB indexing work and when should I use it?

JSONB indexing accelerates document querying in PostgreSQL by enabling efficient indexed scans on nested data structures, making it ideal for flexible schema requirements in real-world apps.

Can I implement full-text search directly in PostgreSQL without external tools?

PostgreSQL full-text search supports built-in indexing and querying patterns for text retrieval, allowing complex search functionality without relying on external search engine dependencies.

What PostgreSQL partitioning strategy should I apply to large tables?

PostgreSQL partitioning strategies distribute large table data across multiple physical partitions based on specific keys, improving targeted query performance and maintenance for growing production databases.