Supabase RLS Policy Review

Supabase RLS Policy Review is a skill for Claude Code from s977043/river-review. It costs 47 tokens per session (1,033 once invoked), scanned A, original, MIT.

A Supabase security review for Row Level Security (RLS), the rules that control which users can access which database rows, and for exposed service keys.

In plain words
What is it for?
Use it when changing Supabase tables, policies, RLS settings, or client-side database code.
Why use it?
It catches public tables without row-level protection, policies that allow everyone to access or change data, and service keys placed in frontend code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the river-review plugin — 138 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit Use it when changing Supabase tables, policies, RLS settings, or client-side database code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/supabase-rls-policy
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 s977043/river-review --skill supabase-rls-policy
Clone the repo
git clone --depth 1 https://github.com/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 138 skills, 18 commands, 5 agents, 3 hooks.

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 RLS Policy Review

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/supabase-rls-policy/github.svg)](https://agentmods.dev/skills/s977043/river-review/supabase-rls-policy)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/supabase-rls-policy"><img src="https://agentmods.dev/badge/skills/s977043/river-review/supabase-rls-policy/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 RLS Policy Review

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/supabase-rls-policy"><img src="https://agentmods.dev/badge/skills/s977043/river-review/supabase-rls-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,033 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.00047 $0.01033
Opus 5 $0.00023 $0.00517
Sonnet 5 $0.00009 $0.00207
Haiku 4.5 $0.00005 $0.00103

Measured 7d ago against content hash 2fe9a09ee4aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

Supabase RLS Policy Review 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 7d 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.

skills/midstream/supabase-rls-policy/SKILL.md · 75 lines

What it actually says

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: Supabase RLS の未有効化・過剰 policy・service_role 露出をチェックリスト型で検査する

Goal / 目的

  • ENABLE ROW LEVEL SECURITY 無しで public スキーマにテーブルを公開する RLS 未有効化を検出する。
  • USING (true) / WITH CHECK (true) で全行アクセスを許可し所有者条件(auth.uid() = user_id)を欠く過剰 policy を検出する。
  • service_role key(anon key と区別)がフロントエンドコードにハードコードされる露出を検出する。

Non-goals / 扱わないこと

  • インデックス・クエリ性能設計。
  • migration の冪等性・ロールバック設計。
  • policy の粒度(テーブル分割方針)の良し悪し(要件依存のため一律指摘しない)。

Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限りNO_REVIEWを返す。

  • 差分に CREATE TABLE / CREATE POLICY / RLS 設定を含む SQL、または supabase/** のクライアントコード変更が含まれている
  • diff コンテキストが利用可能である

ゲート不成立時の出力: NO_REVIEW: supabase-rls-policy — RLS / policy / key の変更なし

False-positive guards / 抑制条件

  • 公開参照テーブル(マスタデータ等)で USING (true)SELECT policy が要件上正当であり、その旨のコメントが明記されている場合は指摘しない(INSERT / UPDATE / DELETE の true は別途指摘する)。
  • anon key のクライアント使用は公式仕様で正当。service_role key と混同して誤検出しない。
  • emulator / seed / test 用の SQL(ローカル専用)は別スコープのため指摘しない。

Rule / ルール

  • public スキーマのテーブル作成は ALTER TABLE ... ENABLE ROW LEVEL SECURITY; を必須とする(RLS 無効のまま公開しない)。
  • USING (true) / WITH CHECK (true) の全許可 policy は所有者条件(auth.uid() = user_id 等)に置き換える。
  • service_role key がフロントエンド/クライアントバンドルに含まれていないか確認する(サーバー専用に隔離する)。anon key の使用は許容する。

Evidence / 根拠の取り方

  • 指摘は <file>:<line> で差分に紐づけ、公式規約(row-level-security / api-keys)を 1 行で添える。
  • RLS 有効化が同一 migration の別行にある可能性がある場合は断定せず慎重に扱う。

Output / 出力(短文版の推奨)

コメントは日本語で返す。

  • Finding: RLS 未有効 / 過剰 policy / service_role 露出のどれか(1文)
  • Impact: 全行アクセス / なりすまし / 鍵漏洩
  • Fix: ENABLE ROW LEVEL SECURITY / 所有者条件付き policy / key のサーバー隔離の最小案

Sources / 出典

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 75 lines · 47 tokens per session scan A 2fe9a09ee4aa

Subscribe to this mod's changes

Supabase RLS Policy Review is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 1,033 once invoked, about $0.0002 per session on Opus 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-03.

Related

Other skills, from other repositories

supabase-postgres

Postgres optimization — 70 rules (queries, indexes, RLS, concurrency). Use when writing SQL or reviewing schema.

martineserios/thebrana · 30 tokens

supabase-skill

Core Supabase — DB, Auth, Realtime, Storage, RLS, Edge Functions. Triggers on ANY Supabase task.

martineserios/thebrana · 32 tokens

migration-ready-schema

Data-model rules that make a schema importable from day one, so the migration-import-engineer is never blocked on missing columns. Every SMB Product-Builder product must let a customer bring their data from an incumbent (ServiceTitan/Toast/Mindbody/Shopify) — that requires provenance (sourceref) and rollback…

avelikiy/great_cto · 133 tokens

postgresql

PostgreSQL schema design, query optimization, indexing, and administration. Use when writing schemas, queries, migrations, or mentions PostgreSQL, Postgres, JSONB, partitioning, RLS, CTEs, window functions, EXPLAIN ANALYZE, or connection pooling.

iliaal/whetstone · 61 tokens

supabase

Use this skill when working with Supabase platform — PostgreSQL schema, Row Level Security, Realtime subscriptions, Auth, Storage, Edge Functions, pgvector. This skill enforces: RLS policies on every table, proper PostgreSQL schema design, real-time channel organization, storage bucket policies, edge function cold…

j4flmao/agent-skills · 100 tokens

logic-health

Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…

hyhmrright/logic-lens · 180 tokens