supabase-rls-auth

Automate Supabase Row Level Security policy design and getUser() authentication checks.

2|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/buchananwill/ue-claude-scaffold --skill supabase-rls-auth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase-rls-auth
Source: https://github.com/buchananwill/ue-claude-scaffold/tree/main/skills/supabase-rls-auth
Command: npx skills add https://github.com/buchananwill/ue-claude-scaffold --skill supabase-rls-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Supabase Row Level Security patterns and auth verification for Supabase projects. Framework-agnostic -- client initialization and token refresh are Environment concerns.

Core Features & Use Cases

  • RLS pattern design guidance for access control across tables.
  • getUser() vs getSession() comparison to ensure proper authorization checks.
  • Security defaults: revoking public schema access and proper key usage.

Quick Start

Set up RLS policies on user-facing tables and verify identity with getUser() in your app.

Frequently Asked Questions about supabase-rls-auth

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

FAQPage Schema
What is the difference between getUser() and getSession() for Supabase auth verification?▼

Supabase auth verification differs because getSession() reads client-side state which can be stale, whereas getUser() makes a server roundtrip to securely validate the user's identity token. Always use getUser() to enforce proper authorization checks.

How do I design Supabase Row Level Security policies for per-user access control?▼

Supabase Row Level Security policies for per-user access control are designed by defining table-specific rules that restrict data visibility. This approach ensures users only interact with rows they own, enforcing identity verification workflows across both client and server code.

What security defaults should I apply when setting up Supabase RLS?▼

Security defaults for Supabase RLS setup include revoking public schema access and ensuring proper key usage. Applying these secure defaults prevents unauthorized data exposure before you implement specific per-user access control policies.

Why does my Supabase RLS policy allow unauthorized access to user-facing tables?▼

Supabase RLS policies allow unauthorized access when relying on getSession() for authorization checks, as it uses potentially stale client data. Switch to getUser() to perform strict server-side identity verification and correct your policy implementation.

Does this Supabase RLS approach work with any frontend framework?▼

Yes, Supabase RLS patterns are framework-agnostic. Client initialization and token refresh are handled as environment concerns, allowing you to apply the same identity verification workflows and access control policies across any frontend stack.