postgres-patterns

Provide PostgreSQL patterns for query optimization, schema design, indexing, and security.

17|1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/jakezp/everything-opencode --skill postgres-patterns-jakezp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-patterns
Source: https://github.com/jakezp/everything-opencode/tree/main/skills/postgres-patterns
Command: npx skills add https://github.com/jakezp/everything-opencode --skill postgres-patterns-jakezp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

Core Features & Use Cases

  • Indexing strategies: B-tree, GIN, and BRIN for different workloads
  • Schema design guidance and data-type recommendations
  • Row Level Security and upsert/merge patterns
  • Anti-pattern detection and performance troubleshooting
  • Practical SQL examples and templates for real-world apps

Quick Start

Run a quick migration example to implement a common indexing pattern on a sample table.

Frequently Asked Questions about postgres-patterns

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

FAQPage Schema
How do I optimize slow PostgreSQL queries using B-tree, GIN, or BRIN indexes?

PostgreSQL query optimization uses B-tree, GIN, and BRIN indexing strategies tailored to specific workloads. Selecting the correct index type accelerates data retrieval and resolves performance bottlenecks using concrete SQL best-practice patterns.

What is the best way to design a PostgreSQL schema and choose the right data types?

PostgreSQL schema design provides guidance on data-type recommendations and table structuring. Following these patterns ensures efficient data storage and query execution based on established Supabase best practices.

How do I implement Row Level Security and upsert patterns in PostgreSQL?

PostgreSQL security patterns implement Row Level Security policies and upsert/merge operations using concrete SQL examples. These templates help developers enforce data access controls and manage data synchronization safely.

How do I detect PostgreSQL anti-patterns and troubleshoot database performance issues?

PostgreSQL anti-pattern detection identifies inefficient schema designs and poorly tuned queries. The Skill provides performance troubleshooting guidance to recognize and resolve common database bottlenecks during query tuning.

Does this PostgreSQL query optimization guidance align with Supabase recommendations?

Yes, the PostgreSQL patterns for indexing, schema design, and security are explicitly aligned with Supabase recommendations. Developers and DBAs can apply these best-practice templates directly within Supabase environments.