supabase-postgres

Guide secure Supabase/Postgres implementation with RLS policies and query optimization.

1|Updated May 12, 2026
One-click install
npx skills add https://github.com/MoxyWolfLLC/moxywolf-plugins --skill supabase-postgres-moxywolfllc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres
Source: https://github.com/MoxyWolfLLC/moxywolf-plugins/tree/main/plugins/dev-infrastructure-skills/skills/supabase-postgres
Command: npx skills add https://github.com/MoxyWolfLLC/moxywolf-plugins --skill supabase-postgres-moxywolfllc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves slow, insecure, and hard-to-maintain Supabase/Postgres database behavior by guiding you to write efficient queries, design strong schemas, and implement correct Row Level Security (RLS).

Core Features & Use Cases

  • Performance-focused Postgres guidance: Index selection, avoiding N+1 query patterns, and using EXPLAIN ANALYZE to identify bottlenecks.
  • Secure access with RLS: Enabling RLS, writing policies for user- and organization-based access, and improving policy performance with security-definer checks.
  • Operational best practices for Supabase apps: Connection pooling guidance, schema conventions (UUID primary keys, timestamptz, soft deletes), migration structure, and realtime subscription filtering.

Quick Start

When you are building a SaaS app, ask the skill to recommend an index strategy and RLS policies for your tables based on your current access requirements and query patterns.

Frequently Asked Questions about supabase-postgres

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

FAQPage Schema
How do I write Supabase RLS policies for organization-based data access?

To write Supabase RLS policies for organization access, enable Row Level Security on the table, write policies filtering by user or organization ID, and optimize policy performance using security-definer checks to prevent slow query patterns.

What's the best way to fix slow Postgres queries in a SaaS application?

Fix slow Postgres queries in SaaS apps by using EXPLAIN ANALYZE to identify bottlenecks, selecting indexes aligned to query patterns, and avoiding N+1 query patterns through optimized schema design and connection pooling.

How do I structure Postgres migrations for maintainable Supabase schemas?

Structure maintainable Postgres migrations for Supabase by adopting schema conventions like UUID primary keys, timestamptz fields, and soft deletes, ensuring migration files follow safe, maintainable ordering practices.

How do I set up realtime subscriptions with filters in Supabase?

Set up Supabase realtime subscriptions with filters by configuring the database schema to support the filter criteria and applying realtime subscription filters directly on the table rows matching your query patterns.

Do I need connection pooling for Supabase Postgres?

You need connection pooling for Supabase Postgres to manage safe connection practices and prevent connection exhaustion, especially when building SaaS data models that require concurrent database access.