117downloads

Supabase Postgres schema, SQL and performance skill

Review Postgres schema, queries, migrations and row level security with Supabase guidance. Diagnose slow queries, indexing issues and database resource usage.

When it runs

Your agent reads this description from SKILL.md to decide when to load the skill:

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

What SKILL.md covers

  • When to Apply
  • Rule Categories by Priority
  • How to Use
  • References

Files in the ZIP

Related skills