/agentic-awesome-skills:supabasefrom agentic-awesome-skills
Provides guidance for working with Supabase products including Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, and Queues. Covers client libraries, SSR integrations, RLS policies, and Data API configuration.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, session handling and access policies.
1. Supabase changes frequently — verify against changelog and current docs before implementing. Do not rely on training data for Supabase features. Function signatures, config.toml settings, and API conventions change between versions.
First, fetch https://supabase.com/changelog.md (a lightweight summary index — not a heavy pull), scan for breaking-change tags relevant to your task, and follow the linked page for any that apply. Then look up the relevant topic using the documentation access methods below.
2. Verify your work. Verify with the smallest relevant check in an authorized local/test environment; use role-specific positive and negative policy tests for access changes. A SQL query is not appropriate verification for every UI, auth or docs change. State any unavailable check rather than issuing production mutations for verification.
3. Recover from errors, don't loop. If an approach fails after 2-3 attempts, stop and reconsider. Try a different method, check documentation, inspect the error more carefully, and review relevant logs when available. Supabase issues are not always solved by retrying the same command, and the answer is not always in the logs, but logs are often worth checking before proceeding.
4. Exposing tables to the Data API: Depending on the user's Data API settings, newly created tables may not be automatically exposed via the Data (REST) API. If this is the case, anon and authenticated roles will need to be explicitly granted access.
Note that this is separate from RLS, which controls which rows are visible once a table is accessible, not whether the table is accessible at all.
When a user reports a SQL-created table is unexpectedly inaccessible, check their Data API settings and whether the roles have been granted access via explicit GRANT SQL. When granting public (anon/authenticated) access, always enable RLS too. See Exposing a Table to the Data API for the full setup workflow.
5. RLS in exposed schemas.
Enable RLS on every table in any exposed schema, which includes public by default. This is critical in Supabase because tables in exposed schemas can be reachable through the Data API when the anon/authenticated roles have access (see Exposing a Table to the Data API). For private schemas, prefer RLS as defense in depth. After enabling RLS, create policies that match the actual access model rather than defaulting every table to the same auth.uid() pattern.
6. Security checklist. When working on any Supabase task that touches auth, RLS, views, storage, or user data, run through this checklist. These are Supabase-specific security traps that silently create vulnerabilities:
Auth and session security
user_metadata claims in JWT-based authorization decisions. In Supabase, raw_user_meta_data is user-editable and can appear in auth.jwt(), so it is unsafe for RLS policies or any other authorization logic. Store authorization data in raw_app_meta_data / app_metadata instead.session_id against auth.sessions on sensitive operations.app_metadata or auth.jwt() for authorization, remember JWT claims are not always fresh until the user's token is refreshed.API key and client exposure
service_role or secret key in public clients. Prefer publishable keys for frontend code. Legacy anon keys are only for compatibility. In Next.js, any NEXT_PUBLIC_ env var is sent to the browser.RLS, views, and privileged database code
CREATE VIEW ... WITH (security_invoker = true). In older versions of Postgres, protect your views by revoking access from the anon and authenticated roles, or by putting them in an unexposed schema.auth.role() is deprecated — use the TO clause instead. Supabase has deprecated auth.role() in favour of specifying the target role directly on the policy with TO authenticated or TO anon. Beyond deprecation, auth.role() = 'authenticated' breaks silently when anonymous sign-ins are enabled, because anonymous sign-in users carry the authenticated Postgres role, including with TO authenticated. If guest accounts must be excluded, check the verified is_anonymous claim too; role targeting alone does not distinguish guest from permanent users.
-- Deprecated (do not use)
create policy "example" on table_name for select
using ( auth.role() = 'authenticated' );
TO authenticated alone is authentication without authorization (BOLA / IDOR). Using TO authenticated only checks the role — it does not restrict which rows a user can access. The correct pattern combines TO authenticated with an ownership predicate in USING:
create policy "example" on table_name for select
to authenticated
using ( (select auth.uid()) = user_id );
USING and WITH CHECK predicates for clarity. PostgreSQL reuses USING as WITH CHECK when the latter is omitted for UPDATE/ALL; omission alone does not allow ownership reassignment. Review all applicable permissive policies and column privileges, not just this example:
create policy "example" on table_name for update
to authenticated
using ( (select auth.uid()) = user_id )
with check ( (select auth.uid()) = user_id );
SECURITY DEFINER functions can bypass RLS depending on their owner’s privileges. They run as the function owner; table owners and BYPASSRLS roles have different behavior from an ordinary owner role, and FORCE ROW LEVEL SECURITY changes table-owner treatment. Never add SECURITY DEFINER to resolve a permission error; it silently removes access control without fixing the underlying cause. Prefer SECURITY INVOKER.EXECUTE to PUBLIC by default for every new function, so new functions can be executable by all roles unless privileges are revoked or default privileges changed. API exposure additionally depends on schema exposure and schema USAGE. When SECURITY DEFINER is genuinely needed (e.g., bypassing RLS on an internal lookup table), keep the function in a non-exposed schema, use a least-privileged owner, fixed safe search_path and explicit caller/operation authorization as appropriate, revoke EXECUTE from PUBLIC/anon/authenticated and grant only intended callers, and run supabase db advisors after making changes.Storage access control
Dependency and supply-chain security
supabase-js, @supabase/ssr, supabase-py, etc.). See the npm security guide for the full checklist.For any security concern not covered above, fetch the Supabase product security index: https://supabase.com/docs/guides/security/product-security.md
Always discover commands via --help — never guess. The CLI structure changes between versions.
supabase --help # All top-level commands
supabase <group> --help # Subcommands (e.g., supabase db --help)
supabase <group> <command> --help # Flags for a specific command
Supabase CLI Known gotchas:
supabase db query requires CLI v2.79.0+ → use MCP execute_sql or psql as fallbacksupabase db advisors requires CLI v2.81.3+ → use MCP get_advisors as fallbacksupabase migration new <name> first. Never invent a migration filename or rely on memory for the expected format.Version check and upgrade: Run supabase --version to check. For CLI changelogs and version-specific features, consult the CLI documentation or GitHub releases.
For setup instructions, server URL, and configuration, see the MCP setup guide.
Troubleshooting connection issues — follow these steps in order:
Check if the server is reachable:
curl -so /dev/null -w "%{http_code}" https://mcp.supabase.com/mcp
A 401 can show the endpoint is reachable; it does not establish client authentication or tool readiness. Timeout or "connection refused" means it may be down.
Check .mcp.json configuration:
Verify the project root has a valid .mcp.json with the correct server URL. If missing, prepare the configuration for the user’s actual client and authorized project scope; do not automatically add a connector or expose every project. Prefer read-only, project-scoped access where sufficient.
Authenticate the MCP server:
If the server is reachable and .mcp.json is correct but tools aren't visible, the user needs to authenticate. The Supabase MCP server uses OAuth 2.1 — tell the user to trigger the auth flow in their agent, complete it in the browser, and reload the session.
Before implementing any Supabase feature, find the relevant documentation. Use these methods in priority order:
search_docs tool (preferred — returns relevant snippets directly).md to the URL path.Work in an explicitly identified disposable local/test database. Prefer supabase migration new <name>, edit its SQL, then apply and test through the project’s migration workflow. Inspect installed command help; never infer a remote target from a fallback tool. Ad hoc SQL can be useful for local exploration, but direct remote DDL creates drift and does not become safe merely because it omits migration history.
To finalize:
--yes prompts.A concrete RLS check uses two synthetic users: user A can read/update A’s row, user B cannot read or update it, and neither can change its owner to another user. Also test anonymous/guest behavior required by the application. Do not use service-role bypass credentials as proof that client RLS works.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
supabase, database, authentication, realtime, storage, edge-functions
npx claudepluginhub krishnakanthb13/antigravity-awesome-skills --plugin agentic-awesome-skills3 plugins in 2 repositories ship this exact skill · first indexed Oct 23, 2026
2,799 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.Other plugins' skills for the same job