supabase-postgres-best-practices_skill

This skill helps optimize Postgres queries, schemas, and configs with Supabase best practices to boost performance and security.
  • TypeScript
  • Official

723

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill supabase/agent-skills --skill supabase-postgres-best-practices

  • AGENTS.md43.9 KB
  • README.md3.1 KB
  • SKILL.md2.6 KB

Overview

This skill helps developers apply Supabase-backed Postgres performance optimizations and best practices when writing, reviewing, or tuning SQL, schemas, and database configs. It consolidates prioritized rules across query performance, connection management, security (RLS), schema design, and operational monitoring. Use it to surface high-impact fixes and guide automated or manual optimizations.

How this skill works

The skill inspects SQL, schema definitions, and configuration choices against a prioritized rule set maintained by Supabase. It identifies issues like missing indexes, inefficient joins, RLS misconfigurations, and connection pooling problems, then suggests concrete corrections and patterns. Each recommendation links to a focused explanation, example SQL, and Supabase-specific notes for real-world application.

When to use it

  • Writing or reviewing SQL queries to improve latency and resource use
  • Designing or refactoring schema and indexes for large tables
  • Diagnosing production performance problems or slow queries
  • Configuring connection pooling, scaling, or concurrency behavior
  • Implementing or auditing Row-Level Security rules

Best practices

  • Prioritize index and query plan fixes first—these are highest impact
  • Use connection pooling and tune max connections to avoid overload
  • Model schemas for common access patterns and prefer partial/indexed columns
  • Test RLS policies in staging and benchmark their performance
  • Monitor slow queries, locks, and resource metrics continuously

Example use cases

  • Detecting missing or unused indexes and proposing targeted CREATE INDEX statements
  • Rewriting multi-join queries into more efficient forms and showing EXPLAIN comparisons
  • Suggesting connection pool settings for serverless or high-concurrency workloads
  • Reviewing schema changes and recommending partial or covering indexes
  • Auditing RLS policies for correctness and performance impact

FAQ

No. It provides recommendations, example SQL, and notes. Apply changes manually after review and testing.

Does it cover Supabase-specific features?

Yes. Recommendations include Supabase notes where applicable, such as RLS guidance and platform-specific connection considerations.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
supabase-postgres-best-practices skill by supabase/agent-skills | VeilStrat