supabase

Guides Supabase development, schema migrations, security audits, and debugging workflows.

Updated Aug 21, 2025
One-click install
npx skills add https://github.com/Adithiya-S/AI-Study-Companion --skill supabase-adithiya-s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase
Source: https://github.com/Adithiya-S/AI-Study-Companion/tree/main/.agents/skills/supabase
Command: npx skills add https://github.com/Adithiya-S/AI-Study-Companion --skill supabase-adithiya-s

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with Supabase involves frequent API changes, subtle security traps like RLS misconfigurations and SECURITY DEFINER pitfalls, and hard-to-diagnose errors across Auth, Realtime, Storage, and Edge Functions. This Skill provides up-to-date operational guidance so AI agents implement Supabase features correctly and securely instead of relying on stale training data. ## Core Features & Use Cases - Security Checklist Enforcement: Covers Supabase-specific vulnerabilities including user_metadata JWT misuse, views bypassing RLS, BOLA/IDOR in policies, SECURITY DEFINER exposure, and Storage upsert permission requirements. - Schema Migration Workflows: Distinguishes declarative schema projects from imperative migrations, with correct CLI and MCP commands for iterating, running advisors, and committing migrations. - Debugging & Troubleshooting: Directs agents to fetch current monitoring and debugging documentation before diagnosing REST API errors, RLS blocks, Postgres errors, or service failures. - Use Case: When a user reports that a newly created table returns permission denied through the REST API, the Skill guides checking Data API exposure settings, granting roles access, and enabling RLS with proper ownership policies. ## Quick Start Ask the agent to help you set up a Supabase table with row level security policies and verify it works through the Data API.

Frequently Asked Questions about supabase

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

FAQPage Schema
How do I create a Supabase migration for schema changes?

For imperative projects, iterate with execute_sql via MCP or supabase db query, then run supabase db advisors and generate the migration with supabase db pull. For declarative projects, edit files in supabase/schemas/ and generate the migration from there.

How do I write a secure RLS policy in Supabase?

Enable RLS on every table in exposed schemas, use TO authenticated with an ownership predicate like auth.uid() = user_id, and add WITH CHECK on UPDATE policies. Avoid the deprecated auth.role() function and never use user_metadata claims for authorization.

Why is my new Supabase table not accessible through the REST API?

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

Can I use SECURITY DEFINER functions to fix Supabase permission errors?

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 it in a non-exposed schema with an auth.uid() check.

How do I troubleshoot Supabase MCP server connection issues?

First curl https://mcp.supabase.com/mcp and expect a 401 response confirming the server is up. Then verify .mcp.json points to the correct URL, and finally complete the OAuth 2.1 authentication flow in your agent and reload the session.