
Supabase Postgres Best Practices
Developer Toolsby supabase
3/3 audits passMIT
Free · imported in one click after signup
View on GitHubPostgres 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…
Supabase Postgres Best Practices is Supabase's guide for Postgres running anywhere (publisher supabase, MIT licence). It groups rules into eight categories by priority: query performance, connection management and security with RLS (critical), schema design, concurrency and locking, data access patterns, monitoring and diagnostics, and advanced features. Each rule is its own reference file with an explanation, incorrect and correct SQL, and Supabase-specific notes where relevant. Examples include missing, composite, covering and partial indexes, connection pooling, limits and idle timeouts, RLS basics and RLS performance, primary keys, data types and foreign-key indexes, partitioning, advisory locks, deadlock prevention and SKIP LOCKED, N+1 queries, pagination, batch inserts and upserts, EXPLAIN ANALYZE, pg_stat_statements, vacuum, full-text search and JSONB indexing.
The skill asks to be loaded before any Postgres change, including one-column migrations, and when diagnosing slow queries, connection exhaustion, locking or rows visible to the wrong tenant. It is a rulebook, not a migration tool; it does not apply changes itself.
It is mainly for coding agents such as Claude Code. In BusinessMCP it can guide the analyst's read-only queries against a connected customer database.
What you can do with it
- Add the right index for a slow query using EXPLAIN ANALYZE
- Write RLS policies that stay fast at scale
- Fix connection exhaustion with pooling and timeouts
- Replace N+1 queries and offset pagination
Run it on your business data
Imported into BusinessMCP, Supabase Postgres Best Practices becomes a playbook your AI business analyst applies to your connected GitHub repositories.
Use Supabase Postgres Best Practices in BusinessMCPInstall it in a coding agent
One command adds Supabase Postgres Best Practices to your project.
npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practicesHow we vetted it
- Source
- supabase/agent-skills at 551274e
- Licence
- MIT
- Security audits (skills.sh)
- Gen Agent Trust Hub: Pass · Socket: Pass · Snyk: Pass
- Bundled scripts
- None, instructions only
Checked 2026-09-25 against its skills.sh listing. How we vet skills
Related skills
All skillsPostgreSQL Table Design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features
SQL Optimization Patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
Neon Postgres
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero, instant restore, read replicas, IP allow lists, logical…
Frequently asked questions
Is this skill only for Supabase projects?
No. It describes itself as Postgres best practices for Postgres running anywhere, with Supabase-specific notes where applicable.
Which categories are rated critical?
Query performance, connection management, and security and RLS.
How do I install Supabase Postgres Best Practices?
Run `npx skills add supabase/agent-skills --skill supabase-postgres-best-practices`, or import it from the BusinessMCP dashboard as a playbook.
Keep exploring
Run Supabase Postgres Best Practices against your whole business
Free plan, no credit card.
Use Supabase Postgres Best Practices in BusinessMCP