veta-supabase-rls

Guide Supabase client usage and RLS policies in code reviews.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/marcogonzalo/studio-manager --skill veta-supabase-rls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: veta-supabase-rls
Source: https://github.com/marcogonzalo/studio-manager/tree/main/.agents/skills/veta-supabase-rls
Command: npx skills add https://github.com/marcogonzalo/studio-manager --skill veta-supabase-rls

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents common Supabase integration mistakes by guiding how to use the correct client in the right runtime and by reinforcing robust Row Level Security (RLS) so unauthorized data access is blocked by design.

Core Features & Use Cases

  • Client vs server correctness: Use the browser client in client-side code and the server client for RSC/API/server actions to avoid runtime/auth bugs.
  • Typed database access: Keep database types centralized to reduce circular imports and improve maintainability when writing or reviewing Supabase queries.
  • RLS-first security discipline: Ensure RLS is enabled on every table, require policies for CRUD operations, and never rely on client-side checks or expose service-role credentials.
  • Reliable error handling: Require checking the returned error from Supabase calls and surfacing meaningful feedback to users.

Quick Start

Review the code for any Supabase call paths and update them to use the correct client (browser vs server), enforce RLS with policies, and handle error responses consistently.

Frequently Asked Questions about veta-supabase-rls

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

FAQPage Schema
How do I enforce Row Level Security in Supabase to block unauthorized data access?

Enforce Supabase Row Level Security (RLS) by enabling it on every database table and defining explicit CRUD policies. Never expose service-role keys to the client or rely on client-side checks for security.

Why does my Supabase client return runtime or authentication errors in server components?

Supabase client runtime errors occur when using the browser client in server-side code. You must use the server client for RSC, API routes, and server actions to ensure correct authentication and data access.

What is the best way to handle Supabase query errors for insert, update, and delete operations?

Handle Supabase query errors by checking the returned error object from every select, insert, update, and delete call, surfacing meaningful feedback to users instead of ignoring failures.

Can I use centralized TypeScript types for Supabase database access without causing circular imports?

Yes, you can use centralized typed database access for Supabase queries. Keeping database types centralized in shared interfaces reduces circular imports and improves maintainability across client and server code.

What are the limitations of using client-side checks for Supabase data access control?

Client-side checks for Supabase access control are insecure and easily bypassed. This approach fails to protect data unless RLS is enabled with proper policies, and exposing service-role credentials compromises the database.