postgresql-patterns

Codify PostgreSQL schema, indexing, and JSONB design patterns.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/bipinks/ghost-office --skill postgresql-patterns-bipinks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-patterns
Source: https://github.com/bipinks/ghost-office/tree/main/.claude/skills/postgresql-patterns
Command: npx skills add https://github.com/bipinks/ghost-office --skill postgresql-patterns-bipinks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL pattern guidance for scalable schemas, efficient queries, and robust multi-tenant design, reducing trial-and-error in database modeling and optimization.

Core Features & Use Cases

  • Schema design best practices: naming conventions, data types, and table templates.
  • Indexing and performance tricks: composite indexes, partial indexes, GIN/FTS for JSONB, partitioning.
  • Query optimization and advanced features: CTEs, window functions, partitioning patterns, and JSONB operations for flexible schemas.
  • Use case: architecting a multi-tenant SaaS database with isolation, fast dashboards, and predictable performance.

Quick Start

Create a PostgreSQL schema for a multi-tenant orders system with recommended indexing and JSONB usage.

Frequently Asked Questions about postgresql-patterns

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

FAQPage Schema
How do I design a PostgreSQL schema for a multi-tenant SaaS application?

PostgreSQL partitioning patterns split large tables into smaller, manageable pieces to improve query performance and maintenance. This approach provides practices for range and list partitioning, ensuring scalable data architecture and efficient queries for analytics dashboards.

What is the best way to use GIN indexes for PostgreSQL JSONB columns?

PostgreSQL query optimization uses CTEs and window functions to structure complex queries and perform advanced analytics. This method provides advanced SQL techniques for partitioning patterns and JSONB operations, ensuring efficient data processing and predictable performance.

When do I need partial indexes in PostgreSQL?

PostgreSQL naming conventions and data type guidance provide clear standards for database design and table templates. This approach ensures consistent schema structures, reducing trial-and-error in database modeling and establishing robust foundations for scalable applications.

Can I use PostgreSQL CTEs and window functions for analytics dashboards?

PostgreSQL CTEs and window functions can be used for analytics dashboards to structure complex aggregations and ranking queries. This approach provides advanced SQL techniques that ensure efficient data processing and predictable performance for reporting systems.