supabase

Guides Supabase development tasks including database migrations, auth, RLS policies, and CLI workflows.

Updated May 31, 2026
One-click install
npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill supabase-decoutkhanqindev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase
Source: https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat/tree/main/.claude/skills/supabase
Command: npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill supabase-decoutkhanqindev

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 (RLS bypasses, JWT misuse, exposed keys), and CLI version differences that cause silent failures. This Skill provides verified, security-first guidance for any Supabase task so implementations follow current documentation and avoid common vulnerabilities. ## Core Features & Use Cases - Security-first checklist: Covers Supabase-specific traps such as user_metadata in JWT claims, views bypassing RLS, UPDATE requiring SELECT policies, and storage upsert permission requirements. - CLI and MCP workflows: Guides correct usage of the Supabase CLI (migration creation, db diff, advisors) and the hosted MCP server, including version-specific gotchas and troubleshooting steps. - Schema change workflow: Enforces a safe iterate-then-commit pattern using execute_sql or db query, followed by advisors, db pull, and migration verification. - Use Case: When adding a new table with row-level security in a Next.js app, the Skill ensures RLS is enabled, policies match the real access model, and the change is committed as a clean migration file. ## Quick Start Ask the assistant 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 code.

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

Always create migration files with 'supabase migration new <name>' rather than inventing filenames. Iterate on schema changes using execute_sql or 'supabase db query', then commit with 'supabase db pull <name> --local --yes' and verify with 'supabase migration list --local'.

How do I set up RLS policies in Supabase?▼

Enable RLS on every table in exposed schemas like public, then write policies matching your actual access model. Remember that UPDATE requires a SELECT policy, and never use user_metadata claims in policies since they are user-editable.

Why is my Supabase UPDATE returning zero rows with RLS enabled?▼

In Postgres RLS, an UPDATE must first SELECT the row, so without a SELECT policy the update silently affects zero rows with no error. Add a SELECT policy that covers the rows you intend to update.

Does the Supabase MCP server require authentication?▼

Yes, the Supabase MCP server at mcp.supabase.com uses OAuth 2.1. After configuring .mcp.json with the server URL, trigger the auth flow in your agent, complete it in the browser, and reload the session.

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

No, never expose the service_role or secret key in public clients. Any NEXT_PUBLIC_ environment variable is sent to the browser, so use publishable keys for frontend code instead.