supabase-security

supabase-security is a skill for Claude Code from wesselgrift/sveltekit-spa. It costs 86 tokens per session (3,553 once invoked), scanned A, original, MIT.

A security review guide for a browser-only SvelteKit app using Supabase Auth and Postgres Row Level Security. Row Level Security, or RLS, makes the database decide which rows each signed-in user may access.

In plain words
What is it for?
Use it when reviewing sign-in flows, database access rules, user input, environment variables, or feature changes for security issues.
Why use it?
It clarifies that browser checks improve the interface but cannot protect data from an attacker. This directs authorization decisions to Supabase, where they can be enforced.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when reviewing sign-in flows, database access rules, user input, environment variables, or feature changes for security issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wesselgrift/sveltekit-spa/supabase-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wesselgrift/sveltekit-spa --skill supabase-security
Clone the repo
git clone --depth 1 https://github.com/wesselgrift/sveltekit-spa

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for supabase-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/wesselgrift/sveltekit-spa/supabase-security/github.svg)](https://agentmods.dev/skills/wesselgrift/sveltekit-spa/supabase-security)
Your own site
<a href="https://agentmods.dev/skills/wesselgrift/sveltekit-spa/supabase-security"><img src="https://agentmods.dev/badge/skills/wesselgrift/sveltekit-spa/supabase-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for supabase-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/wesselgrift/sveltekit-spa/supabase-security"><img src="https://agentmods.dev/badge/skills/wesselgrift/sveltekit-spa/supabase-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,553 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00086 $0.03553
Opus 5.5 $0.00034 $0.01421
Sonnet 5.5 $0.00017 $0.00711
Haiku 4.5 $0.00009 $0.00355

Measured 1mo ago against content hash fcd553ada322, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

supabase-security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/supabase-security/SKILL.md · 413 lines

How it starts

The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Review — SvelteKit SPA + Supabase

This skill applies to a SvelteKit SPA (ssr = false) using Supabase Auth, Postgres with Row Level Security, and $env/dynamic/public for environment variables. All application code runs in the browser — there is no server middleware, no API routes, and no server-side rendering.

The trust boundary

The browser is untrusted. Supabase (Postgres RLS + Auth) is the only enforcement point. Every rule below follows from this.

UNTRUSTED                          TRUSTED
─────────────────────────────────  ──────────────────────────
Browser (SvelteKit SPA)            Supabase (Auth + Postgres)
 ├─ authState ($state)             ├─ JWT verification
 ├─ Zod validation (UX only)       ├─ RLS policies (auth.uid())
 ├─ Route guards (UX only)         ├─ DB constraints + CHECK
 └─ UI gating                      └─ Security definer RPCs

Client-side checks (auth guards, Zod schemas, route gating) improve UX but provide zero security. Assume an attacker can bypass every client-side check.


1. Row Level Security (RLS)

RLS is the authorization layer. Every table with user data MUST have RLS enabled.

Checklist for every new table

  • ALTER TABLE ... ENABLE ROW LEVEL SECURITY;
  • SELECT policy: using (auth.uid() = user_id_column)
  • INSERT policy: with check (auth.uid() = user_id_column)
  • UPDATE policy: using (auth.uid() = ...) with check (auth.uid() = ...)
  • DELETE policy: using (auth.uid() = user_id_column)
  • No policy grants access to anon role unless the data is intentionally public
  • Column defaults cannot be abused (e.g., role text default 'admin' is dangerous)
  • UPDATE policies restrict which columns can be changed when needed (use with check constraints)

Common mistakes

-- BAD: allows any authenticated user to read all rows
create policy "select_all" on items for select to authenticated using (true);

-- GOOD: scoped to the row owner
create policy "select_own" on items for select to authenticated
  using (auth.uid() = owner_id);

-- BAD: user can set arbitrary owner_id on insert
create policy "insert_any" on items for insert to authenticated
  with check (true);

-- GOOD: forces owner_id to match the authenticated user
create policy "insert_own" on items for insert to authenticated
  with check (auth.uid() = owner_id);

Read the full file on GitHub · 413 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 413 lines · 86 tokens per session scan A fcd553ada322

Subscribe to this mod's changes

supabase-security is a skill published in the GitHub repository wesselgrift/sveltekit-spa (37 stars, last pushed 1mo ago), licensed MIT. It adds 86 tokens to every session and 3,553 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.

Related

Other skills, from other repositories

supabase-postgres-best-practices

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the…

supabase/agent-skills · 182 tokens

shadcn-ui-flutter

A comprehensive Flutter UI library inspired by shadcn/ui. Provides high-quality, customizable, and accessible components including Buttons, Cards, Forms, and more. Use this skill when building Flutter UIs, implementing design systems, or needing specific component usage examples.

nank1ro/flutter-shadcn-ui · 58 tokens

verify

Build/launch/drive recipe for verifying apps/docs changes at runtime (demos, docs pages, llms.txt).

meursyphus/ssgoi · 26 tokens

styleseed

Build, improve, or inspect UI with StyleSeed. Preserves project design choices and routes setup, layout, tokens, review, rendered verification, and updates through one entry point.

bitjaru/styleseed · 39 tokens

testing

Skill "testing" from udecode/plate-playground-template, covering testing goal, core rules, seam selection, fixtures and assertions and quick reference.

udecode/plate-playground-template · 5 tokens

image-to-threejs

Turn a reference image into a rigged, procedural Three.js prop as TypeScript code (hinges, sockets, colliders) for props that must animate or come apart. Needs uv + Python 3.12.

kyh/vibedgames · 49 tokens