SkillsLib.ai

Supabase Agent Skills

Expert Postgres optimization and Supabase development guidance for modern apps

3.7(6 reviews)
10,000+ downloads
Updated Sep 2026

What You Can Do

Leverage Supabase-maintained best practices to optimize Postgres queries, design secure schemas, and configure Row-Level Security (RLS) policies. Debug performance issues with EXPLAIN plan analysis and connection pooling diagnostics. Navigate Supabase-specific patterns for auth, Edge Functions, Storage, and real-time integrations. Implement advanced features like pgvector semantic search and pg_cron scheduled jobs with confidence and security.

Features

Query Performance Optimization

Comprehensive strategies for indexes, EXPLAIN plan analysis, query tuning, and identifying performance bottlenecks with measurable metrics

Row-Level Security (RLS) Mastery

Secure RLS policy patterns, authorization best practices, BOLA/IDOR prevention, and security audit checklists for multi-tenant applications

Schema Design and Migrations

Best practices for table design, column type selection, safe schema alterations, declarative schemas, and production migration patterns

Connection Management

Connection pooling configuration with pgbouncer, session lifecycle management, connection exhaustion prevention, and serverless optimization

Performance Diagnostics

Tools and techniques to diagnose slow queries, high CPU usage, lock contention, and connection pool issues with actionable solutions

Supabase Integration Patterns

Auth (JWT security, session management), Edge Functions, Storage access control, real-time subscriptions, and client-side integration

Advanced PostgreSQL Features

pgvector for semantic search, pg_cron for scheduled jobs, custom triggers, database functions, and queue systems like pgmq

Security Hardening

JWT token safety, API key management, SECURITY DEFINER pitfalls, storage permissions, and supply-chain security for Supabase packages

Example Output

Optimize slow product query

code
Help me optimize this slow product search query:
SELECT * FROM products WHERE category = 'electronics' AND price > 100 AND created_at > now() - interval '30 days';
This takes 2 seconds. What indexes should I create? Show me the EXPLAIN plans before and after.

The skill identified missing composite indexes on (category, created_at), provided CREATE INDEX statements, and demonstrated EXPLAIN output showing query time reduced from 1800ms to 32ms.

Audit RLS policies for authorization vulnerabilities

code
Review this RLS policy for authorization flaws:
create policy "users_see_own_profile" on profiles for select using (auth.uid() = user_id);
Does this cover UPDATE? Could users reassign another user's profile?

The skill detected the missing WITH CHECK clause on UPDATE, which would allow user_id reassignment exploits, and provided the corrected policy with both USING and WITH CHECK to prevent privilege escalation.

Resolve connection pool exhaustion

code
My Supabase app keeps getting 'too many connections' errors. How do I configure pgbouncer for session-mode pooling? Show me the configuration steps.

The skill provided pgbouncer session-mode configuration, identified unclosed connections in the Node.js application code, and reduced peak connections from 120 to 8 for serverless functions.

What's Included

  • Query Performance Rules: 8 prioritized rules covering indexes, query plans, partial indexes, join optimization, and performance metrics with SQL examples
  • Security and RLS Reference: Policy patterns, authorization validation, BOLA/IDOR prevention, and Supabase security checklist (JWT, API keys, SECURITY DEFINER risks)
  • Schema Design Principles: Column type selection, constraint best practices, naming conventions, and migration strategies for production Postgres
  • Connection Management Guide: pgbouncer configuration examples, session vs transaction pooling modes, and serverless function optimization patterns
  • Supabase Integration Documentation: Auth patterns (JWT, session lifecycle), Edge Functions setup, Storage permissions, RLS in exposed schemas, and data API configuration
  • Performance Monitoring Toolkit: EXPLAIN analysis templates, slow query identification procedures, and diagnostic scripts for production troubleshooting

Who It's For

  • Backend Engineers
  • DevOps and Infrastructure Engineers
  • Security Engineers
  • Full-Stack Developers
  • Database Administrators

Best For

  • Postgres query optimization
  • Row-Level Security implementation
  • Schema design and migrations
  • Performance troubleshooting
  • Supabase project setup

You might also like

FREE
Prisma ORM Skills

Master Prisma ORM with comprehensive guides covering database setup, configuration, querying, CLI workflows, and deployment. Configure PostgreSQL, MySQL, SQLite, MongoDB, and other databases with Prisma. Write optimized queries using Prisma Client's full CRUD API, powerful filtering, transactions, and relation handling. Deploy TypeScript applications to Prisma Compute with framework support for Next.js, Hono, NestJS, and more.

P
by prisma
Promotion Case Builder
$50
Promotion Case Builder

Build a data-driven, executive-ready promotion case that quantifies your impact, addresses skill gaps strategically, and positions you as the clear choice for advancement. Claude structures your achievements into a compelling narrative that leaders can't ignore, complete with positioning statements, gap remediation plans, and ready-to-use talking points for your promotion conversation.

Free