/ship-ready-skills:supabase-rls-reviewfrom ship-ready-skills
Review Supabase SQL migrations for row level security gaps and missing or blanket Data API grants (tables without RLS, using (true) write policies, anon write policies, security definer functions without search_path, public tables with no explicit GRANT (Supabase's changelog schedules a grants change for 30 Oct 2026), blanket grants to anon/authenticated). Use when the user asks to review RLS, Supabase policies, grants, a 42501 error, or database security before launch.
Ships in ship-ready-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read-only review. Don't edit files unless the user asks for the fixes afterwards.
Read every .sql file under supabase/migrations/ (and any other .sql files the user points to), in filename order, so later migrations can fix earlier ones. Policies created in the Supabase dashboard aren't in these files: say so in the report instead of guessing.
For each finding, give file:line, the check id, severity, and the fix.
| Id | Severity | Look for | Fix |
|---|---|---|---|
| R1 | critical | create table in public with no later alter table ... enable row level security | Enable RLS, then add policies scoped to auth.uid(). |
| R2 | critical | An insert/update/delete/all policy with using (true) or with check (true) | Scope it to the owner: using (auth.uid() = user_id) with check (auth.uid() = user_id). |
| R3 | high | A write policy that applies to anon (to anon, or to public with no auth check) | Write policies go to authenticated only, scoped to auth.uid(). |
| R4 | high | security definer function with no set search_path | Add set search_path = '' and schema-qualify names, or use security invoker. |
| R5 | medium | A public table with no explicit per-table grant to the roles that use it | Supabase's changelog schedules a change for 30 Oct 2026 after which new public tables on existing projects get no automatic grants to anon/authenticated/service_role, so a table with no explicit grant returns 42501 from the Data API (Supabase changelog). Explicit grants are good practice either way. In the migration that creates the table, grant only what each role needs, e.g. grant select on public.t to anon; grant select, insert, update, delete on public.t to authenticated, service_role;, next to enable row level security and the policies. |
| R6 | high | grant ... on all tables in schema public to anon/authenticated, or alter default privileges ... grant ... to anon/authenticated | Replace with per-table grants. A blanket grant also exposes every table where RLS is off or policies are loose. Don't "fix" R5 this way. |
Per the changelog, tables that already exist keep their grants; R5 matters most for new tables. R5 is order-aware: a table counts as granted if a per-table grant, or an earlier blanket grant or default privilege, covers it. Report R6 for the blanket grant itself.
These are heuristics: each finding is a prompt to review, not proof of a vulnerability, and a clean result isn't proof the database is secure.
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/launch-security-checkQuick pre-launch security check for Next.js + Supabase + Stripe apps. Finds public tables without row level security, service-role or secret keys reaching client code (NEXT_PUBLIC_ variables, 'use client' files), and Stripe webhook handlers without constructEvent signature verification. Use when the user asks for a launch, ship or go-live security check, or a quick security pass on a Supabase/Stripe app./stripe-webhook-reviewReview Next.js Stripe webhook route handlers for missing signature verification, JSON parsed before verification, missing or non-status-aware idempotency on event.id (pending/completed), unsafe reprocessing of pending events, and billing periods read from items.data[0]. Use when the user asks to review a Stripe webhook, idempotency, duplicate events, or payments before launch./npx claudepluginhub edtrackai/ship-ready-skills --plugin ship-ready-skillsOther plugins' skills for the same job