supabase

Guides Supabase development tasks including schema changes, RLS security, CLI usage, and MCP server setup.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/Domush/ai-agent-web-development-skills --skill supabase-domush
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase
Source: https://github.com/Domush/ai-agent-web-development-skills/tree/main/skills/supabase
Command: npx skills add https://github.com/Domush/ai-agent-web-development-skills --skill supabase-domush

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 RLS bypasses and exposed service keys. This Skill provides current best practices, security checklists, and verification workflows for any Supabase task. ## Core Features & Use Cases - Security Checklist: Covers Supabase-specific traps such as user_metadata in JWT authorization, views bypassing RLS, UPDATE requiring SELECT policies, and storage upsert permissions. - Schema Change Workflow: Guides iterating with execute_sql or supabase db query, running advisors, and committing clean migrations via supabase db pull. - CLI and MCP Guidance: Explains discovering commands via --help, version-specific gotchas, and troubleshooting the Supabase MCP server connection and OAuth authentication. - Use Case: When adding a new table with row-level security in a Next.js app, use this Skill to write correct RLS policies, avoid security definer pitfalls, and generate a verified migration. ## Quick Start Ask the agent to help you implement a Supabase task such as creating an RLS policy or running a migration, and it will verify against current docs before writing any SQL.

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?▼

Iterate on schema changes using execute_sql via MCP or supabase db query via CLI, which avoid writing migration history. When ready, run advisors, then generate the migration with supabase db pull <name> --local --yes and verify with supabase migration list --local.

How do I write secure RLS policies in Supabase?▼

Enable RLS on every table in exposed schemas like public, and never use user_metadata claims for authorization since they are user-editable. Store authorization data in app_metadata instead, and remember UPDATE statements also require a SELECT policy to work.

Why is my Supabase MCP server not connecting?▼

First check reachability with curl to https://mcp.supabase.com/mcp, where a 401 response means the server is up. Then verify your .mcp.json configuration, and if tools are still missing, complete the OAuth 2.1 authentication flow in your browser and reload the session.

Why do Supabase views bypass my RLS policies?▼

Views bypass RLS by default because they run with the view owner's permissions. In Postgres 15 and above, create views with security_invoker = true; on older versions, revoke access from anon and authenticated roles or move views to an unexposed schema.

Can I use the Supabase service_role key in my Next.js frontend?▼

No, never expose the service_role or secret key in public clients, since any NEXT_PUBLIC_ environment variable is sent to the browser. Use publishable keys for frontend code, with legacy anon keys only for compatibility.