supabase

Guides Supabase development tasks including schema changes, RLS policies, auth, and CLI workflows.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/WeWake1/BSOMS --skill supabase-wewake1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase
Source: https://github.com/WeWake1/BSOMS/tree/main/.agents/skills/supabase
Command: npx skills add https://github.com/WeWake1/BSOMS --skill supabase-wewake1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Supabase features, CLI commands, and API conventions change frequently, so relying on stale training data leads to broken implementations and silent security vulnerabilities like misconfigured RLS policies or exposed service keys. This Skill keeps Supabase work grounded in current documentation and enforces a security checklist for auth, RLS, views, and storage. ## Core Features & Use Cases - Security Checklist Enforcement: Catches Supabase-specific traps such as views bypassing RLS, SECURITY DEFINER functions exposed in public schemas, deprecated auth.role() usage, and BOLA/IDOR policy gaps. - Schema Change Workflow: Directs safe iteration with execute_sql or supabase db query, then commits changes via advisors, db pull, and migration verification. - CLI and MCP Troubleshooting: Provides version-aware CLI guidance, known gotchas, and step-by-step MCP server connection diagnostics. - Use Case: When adding a new orders table with row-level security in a Next.js app, the Skill ensures RLS is enabled, policies use TO authenticated with ownership predicates, and the migration is generated and verified correctly. ## Quick Start Ask the agent to create a new Supabase table with RLS policies and generate a verified migration for it.

Frequently Asked Questions about supabase

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

FAQPage Schema
How do I make schema changes in Supabase without breaking migrations?▼

Iterate using execute_sql via MCP or supabase db query via CLI, which run SQL directly without writing migration history. When ready, run supabase db advisors, then generate the migration with supabase db pull and verify with supabase migration list.

How do I write a secure RLS policy in Supabase?▼

Enable RLS on every table in exposed schemas, use TO authenticated instead of the deprecated auth.role(), and combine it with an ownership predicate like auth.uid() = user_id. UPDATE policies need both USING and WITH CHECK clauses.

Why is my Supabase table not accessible via the REST API?▼

Newly created tables may not be automatically exposed to the Data API depending on project settings. Check the Data API settings and explicitly GRANT access to the anon and authenticated roles, then enable RLS on the table.

Why is the Supabase MCP server not connecting?▼

First curl https://mcp.supabase.com/mcp and expect a 401, which confirms the server is reachable. Then verify a valid .mcp.json exists in the project root, and complete the OAuth 2.1 authentication flow in the browser.

Can I use SECURITY DEFINER to fix a Supabase permission error?▼

No. SECURITY DEFINER functions bypass RLS and run with creator privileges, silently removing access control. Prefer SECURITY INVOKER, and if SECURITY DEFINER is genuinely needed, keep the function in a non-exposed schema with an auth.uid() check.