supabase-postgres-best-practices

Review tenant dashboard queries for missing indexes and inefficient Postgres execution plans.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/Leandelosantos/huevos-point-maestro --skill supabase-postgres-best-practices-leandelosantos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/Leandelosantos/huevos-point-maestro/tree/main/.claude/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/Leandelosantos/huevos-point-maestro --skill supabase-postgres-best-practices-leandelosantos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill ensures Huevos Point's Dashboard Maestro queries and schema adjustments leverage the right indexes, configurations, and access rules so that Supabase Neon serverless analytics remain fast and secure for every tenant.

Core Features & Use Cases

  • Index health checks highlight whether tenant_id filters, joins, or aggregations use the existing sales_tenant_date_idx and expenses_tenant_date_idx rather than triggering unwanted sequential scans.
  • Query and aggregation reviews confirm that daily metrics and cross-tenant calculations rely on composite, covering, and partial indexes while aligning with schema guidance on data types and primary keys.
  • Operational guardrails cover connection pooling limits, idle timeouts, prepared statement strategies, and RLS tuning so the Neon dashboard handles concurrency without exposing data.

Quick Start

Review today's tenant-level dashboard queries for proper use of sales and expenses indexes.

Frequently Asked Questions about supabase-postgres-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Supabase Postgres dashboard queries to avoid sequential scans?

To optimize Supabase Postgres dashboard queries, review execution plans to ensure tenant_id filters and aggregations use existing indexes like sales_tenant_date_idx instead of triggering sequential scans. This skill reviews queries for missing composite and covering indexes to improve dashboard performance.

How do I configure connection pooling in Supabase Neon serverless to handle concurrent tenant dashboards?

Configure connection pooling in Supabase Neon serverless by tuning connection limits, idle timeouts, and prepared statement strategies. This skill provides operational guardrails to ensure multi-tenant dashboards handle high concurrency without exhausting database connections.

What is the best way to structure RLS policies for secure multi-tenant access in Supabase?

Row Level Security policies for secure multi-tenant access in Supabase require tuning to isolate tenant data without degrading query speed. This skill evaluates RLS policies alongside execution plans to maintain secure and fast multi-tenant analytics.

When do I need composite or partial indexes for daily metric aggregations in Postgres?

You need composite or partial indexes for daily metric aggregations in Postgres when queries filter by tenant_id and join or aggregate large datasets. This skill identifies missing composite and covering indexes to align with schema design guidance for efficient daily metrics.

Does this approach work for reviewing cross-tenant calculations in Supabase Neon?

Yes, this approach works for cross-tenant calculations in Supabase Neon by verifying that queries rely on appropriate indexes and schema configurations. The skill reviews cross-tenant aggregation queries to prevent inefficient execution plans and maintain fast analytics.