Supabase Backend Security
Wires up Supabase auth, row level security, storage and realtime so your data stays private and queries stay fast.
Claude's review
8/10 Current, security-focused Supabase guide (getClaims, key types, RLS performance, Data API exposure change) with clear fixes.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Use when building on Supabase as a backend over managed Postgres — wiring the supabase-js or SSR client, writing or debugging Row Level Security, cookie-based Auth, Storage buckets, Realtime, and Edge Functions, including local versus server JWT verification and the service-role key. NOT raw Postgres tuning (that is `postgresdb`).
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: supabase
description: "Use when building on Supabase as a backend over managed Postgres — wiring the supabase-js or SSR client, writing or debugging Row Level Security, cookie-based Auth, Storage buckets, Realtime, and Edge Functions, including local versus server JWT verification and the service-role key. NOT raw Postgres tuning (that is `postgresdb`)."
tags: [supabase, postgres, rls, auth, edge-functions, realtime, storage, baas]
recommends: [postgresdb, nextjs, db-migrations, security-audit, drizzle-orm]
origin: risco
---
# Supabase — Postgres with RLS as the auth layer
Supabase is a managed Postgres database wrapped in thin SDKs, a PostgREST data API, Auth, Storage,
Realtime, and Deno Edge Functions. The one sentence that explains every footgun below:
> **Your authorization lives in the database (Row Level Security), not in your app code.**
The browser holds a key that can hit your database directly. That is safe *only* because RLS gates
every row. Get that wrong and you either leak everything or see nothing. Everything in this skill is
downstream of that fact. You can write SQL already — what you need is Supabase's specific abstractions
and where the trust boundary sits.
Use the current packages: **`@supabase/supabase-js` v2** (v1 is security-fixes only) and
**`@supabase/ssr`** for server frameworks (it replaced the deprecated `auth-helpers`).
---
## The two keys (the trust boundary)
Every Supabase project ships two classes of key. Confusing them is the one unrecoverable mistake.
| Key | Where it lives | RLS | If it leaks |
|-----|----------------|-----|-------------|
| **anon** / **publishable** (`sb_publishable_...`) | Browser, public env (`NEXT_PUBLIC_*`) | **Enforced** — safe in client only because RLS gates rows | Low: attacker still bound by your policies |
| **service_role** / **secret** (`sb_secret_...`) | Server only — Edge Functions, server env, never bundled | **Bypassed entirely** | Catastrophic: full read/write of all data |
The new `sb_publishable_` / `sb_secret_` format is rolling out alongside the legacy anon/service_role
JWTs; treat them by the same rules. **Why this matters:** the service_role key is a master key with
RLS turned off. One import into a client component is a full data breach.
```ts
// Bad — service_role key reachable from the browser bundle
...From ericrisco's repository, MIT licence.
Related skills
-
Checked
PostgreSQL schema explorer
Explores an unfamiliar PostgreSQL database read only before writing SQL, so answers about your data are right.
7/101 credit -
Checked
HTTP API design review
Designs or reviews HTTP endpoints, auth, pagination and versioning, so API changes do not break your clients.
7/101 credit -
Checked
Firebase Data Connect
Builds and deploys Firebase Data Connect backends on PostgreSQL with secure queries and type safe SDKs.
7/101 credit -
Checked
App performance tuning
Measures first, then fixes slow pages, Core Web Vitals and N+1 database queries across your whole app.
7/101 credit -
Checked
Safe Postgres migrations
Plans and tests PostgreSQL schema changes with lock levels in mind, so live tables change without downtime.
8/101 credit -
Checked
Supabase auth and database
Builds with Supabase auth, database, storage and edge functions while avoiding common security traps.
8/101 credit