Generates Supabase database migrations, writes RLS policies with auth.uid(), configures auth integration, and generates TypeScript types. Use when creating tables, writing migrations, configuring RLS, or implementing Supabase auth.
74
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Project schema, roles, migration history, auth flow, and key files: supabase-config.md. Docs: https://supabase.com/docs
ENABLE ROW LEVEL SECURITY with no policy denies everything. Enabling and adding policies must land in the same migration.FOR SELECT USING (...) does not cover writes; INSERT needs WITH CHECK, not USING.auth.uid() is the owner check (auth.uid() = id). It is NULL for the anon role, so any policy relying on it silently blocks anonymous access.anon, user, admin. A policy that works as your own user tells you nothing about anon.auth.users(id) with ON DELETE CASCADE on profile-style tables, or deleted users leave orphans.Confirm RLS coverage before shipping:
SELECT tablename, rowsecurity FROM pg_tables WHERE schemaname = 'public';YYYYMMDD_add_profiles.sql; comment intent and rollback considerations inline.Regenerate types after every schema change (CI step):
supabase gen types typescript --project-id <project-id> > src/types/supabase.tsAssert at steps 2 and 4 that the migration completes, per-role RLS queries still pass, and tests on changed paths pass. On failure: revert, adjust, re-run.
fa0c341
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.