chravel-supabase-rls

Audit and implement Supabase Row-Level Security policies with auth.uid().

2|1|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/MeechYourGoals/Chravel --skill chravel-supabase-rls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chravel-supabase-rls
Source: https://github.com/MeechYourGoals/Chravel/tree/main/.claude/skills/chravel-supabase-rls
Command: npx skills add https://github.com/MeechYourGoals/Chravel --skill chravel-supabase-rls

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures secure and correct data access in the Chravel application by auditing and implementing robust Supabase Row-Level Security (RLS) policies, managing edge functions, and integrating with Supabase authentication. It prevents unauthorized data access and ensures data integrity.

Core Features & Use Cases

  • RLS Policy Implementation: Define and enforce granular access controls for database tables based on user roles and trip memberships.
  • Edge Function Security: Secure server-side operations by validating authentication tokens and applying business logic.
  • Auth Integration: Ensure all data fetching respects Supabase's authentication model, using auth.uid() as the sole source of truth for user identity.
  • Use Case: When a new feature requires users to interact with trip-specific data, this Skill can be used to audit and implement the necessary RLS policies to ensure only authorized members can view, edit, or delete trip items.

Quick Start

Audit the RLS policies for the 'trip_items' table to ensure only trip members can select, insert, update, or delete records.

Frequently Asked Questions about chravel-supabase-rls

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

FAQPage Schema
How do I implement Supabase row-level security policies for application-specific data access?

Supabase row-level security policies are implemented by defining granular access controls on database tables using `auth.uid()` to verify user identity and restrict data access based on specific memberships or roles.

What is the best way to secure Supabase edge functions with authentication?

Securing Supabase edge functions requires validating authentication tokens within the server-side operation and applying business logic to ensure that data fetching respects the Supabase authentication model.

Why does my Supabase RLS policy allow unauthorized users to view or edit records?

An RLS policy may allow unauthorized access if it does not correctly use `auth.uid()` as the sole source of truth for user identity or lacks granular access controls mapping user roles to specific data memberships.

Can I use Supabase authentication to restrict database access to specific group members?

Yes, Supabase authentication enables you to restrict database access by enforcing row-level security policies that verify user identity via `auth.uid()` and check membership before allowing data interaction.

How do I audit existing database access control policies in Supabase?

Auditing database access control policies involves reviewing existing row-level security rules to ensure they correctly implement `auth.uid()` validation and prevent unauthorized data access across all application tables.