postgres-patterns

Provides PostgreSQL/Supabase best practices for optimizing queries, schemas, indexes, and Row Level Security.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/AndyHsuTW/everything-llm-workspace --skill postgres-patterns-andyhsutw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-patterns
Source: https://github.com/AndyHsuTW/everything-llm-workspace/tree/main/.agents/skills/postgres-patterns
Command: npx skills add https://github.com/AndyHsuTW/everything-llm-workspace --skill postgres-patterns-andyhsutw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides quick reference and best practices for optimizing PostgreSQL database performance, schema design, indexing, and security.

Core Features & Use Cases

  • Query Optimization: Learn optimal indexing strategies and common SQL patterns for faster queries.
  • Schema Design: Understand correct data types and best practices for table structures.
  • Security: Implement Row Level Security (RLS) policies effectively.
  • Use Case: When writing a complex SQL query that is performing slowly, consult this Skill for index recommendations or alternative query structures.

Quick Start

Use the postgres-patterns skill to find recommendations for optimizing a slow SQL query.

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?

To optimize slow PostgreSQL queries, apply optimal indexing strategies and alternative SQL patterns. This Skill provides recommendations for resolving performance bottlenecks and restructuring queries for faster database operations.

What are the best practices for PostgreSQL schema design and data type selection?

PostgreSQL schema design best practices involve selecting correct data types and applying proper table structures. Following Supabase guidelines ensures efficient data storage and query performance for your database operations.

How do I implement Row Level Security in PostgreSQL?

Implement Row Level Security (RLS) in PostgreSQL by applying effective policy patterns. This Skill provides reference practices to secure your database operations and control data access at the row level.

When should I add indexes to a PostgreSQL database?

Add indexes to a PostgreSQL database when resolving SQL performance bottlenecks. This Skill helps identify optimal indexing strategies to accelerate slow queries without compromising schema design.

Does this PostgreSQL optimization approach work with Supabase?

Yes, this PostgreSQL optimization approach works with Supabase. The query optimization, schema design, indexing, and security patterns are based directly on Supabase best practices for efficient database operations.