What problem does it solve? Writing or changing anything in a Postgres database without established rules leads to slow queries, missing indexes, connection exhaustion, deadlocks, and insecure Row-Level Security policies. This Skill gives AI agents and developers a prioritized, example-driven rule set so schema changes, migrations, and SQL queries follow proven Postgres best practices from the start. ## Core Features & Use Cases - Prioritized Rule Categories: Eight categories ranked by impact, from critical query performance and connection management to advanced features like full-text search and JSONB indexing. - Incorrect vs. Correct SQL Examples: Every rule shows the anti-pattern first, then the optimized rewrite, with quantified impact such as 10-100x faster queries or 50% smaller indexes. - Security & RLS Guidance: Covers Row-Level Security policy design, RLS performance optimization, SECURITY DEFINER pitfalls, and least-privilege role management. - Use Case: When asked to add a new column, write a migration, design a multi-tenant table, or diagnose a slow query, the agent loads the relevant reference file (e.g., references/query-missing-indexes.md) and applies the correct pattern with proper indexes and constraints. ## Quick Start Ask the agent to review your Postgres schema or SQL query using the Supabase Postgres best practices before writing any migration or database change.