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.
npx skills add s977043/river-review --skill supabase-rls-policygit clone --depth 1 https://github.com/s977043/river-reviewWrote 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.
[](https://agentmods.dev/skills/s977043/river-review/supabase-rls-policy)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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_rolekey(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_rolekey と混同して誤検出しない。 - emulator / seed / test 用の SQL(ローカル専用)は別スコープのため指摘しない。
Rule / ルール
- public スキーマのテーブル作成は
ALTER TABLE ... ENABLE ROW LEVEL SECURITY;を必須とする(RLS 無効のまま公開しない)。 USING (true)/WITH CHECK (true)の全許可 policy は所有者条件(auth.uid() = user_id等)に置き換える。service_rolekey がフロントエンド/クライアントバンドルに含まれていないか確認する(サーバー専用に隔離する)。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 / 出典
- Supabase — Row Level Security: https://supabase.com/docs/guides/database/postgres/row-level-security
- Supabase — API Keys: https://supabase.com/docs/guides/api/api-keys
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.
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.
- 7d ago First seen · 75 lines · 47 tokens per session scan A 2fe9a09ee4aa
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.
Other skills, from other repositories
supabase-postgres
Postgres optimization — 70 rules (queries, indexes, RLS, concurrency). Use when writing SQL or reviewing schema.
supabase-skill
Core Supabase — DB, Auth, Realtime, Storage, RLS, Edge Functions. Triggers on ANY Supabase task.
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…
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.
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…
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…