supabase-rls

supabase-rls is a skill for Claude Code from YuDefine/nuxt-supabase-starter. It costs 73 tokens per session (656 once invoked), scanned A, original, MIT.

A set of rules and templates for Supabase Row Level Security, which restricts database rows according to the signed-in user or role. Supabase is a hosted database and backend service based on PostgreSQL.

In plain words
What is it for?
Use it when creating or changing database access policies, enabling Row Level Security, handling user and service roles, securing file storage operations, or checking that insert, update, and delete rules are complete.
Why use it?
It helps prevent users from reading or changing data they should not access and addresses common cases where database operations quietly return no rows or fail.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when creating or changing database access policies, enabling Row Level Security, handling user and service roles, securing file storage operations, or checking that insert, update, and delete rules are complete.

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

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-rls

README.md
[![agentmods](https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/supabase-rls/github.svg)](https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/supabase-rls)
Your own site
<a href="https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/supabase-rls"><img src="https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/supabase-rls/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/supabase-rls"><img src="https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/supabase-rls.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 656 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00073 $0.00656
Opus 5.5 $0.00029 $0.00262
Sonnet 5.5 $0.00015 $0.00131
Haiku 4.5 $0.00007 $0.00066

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

Security

Grade A, and why

supabase-rls 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.

template/.claude/skills/supabase-rls/SKILL.md · 36 lines

What it actually says

Supabase RLS 政策規範

本 skill 只寫自家慣例。Supabase 官方 supabase skill(supabase/agent-skills@supabase) 已涵蓋的通用 RLS 陷阱不在此重複:UPDATE 需搭配 SELECT policy、Storage upsert 需 INSERT + SELECT + UPDATE 三個 policy、user_metadata 不可用於授權判斷、刪除 user 不會 使既有 access token 失效、view 預設繞過 RLS、SECURITY DEFINER 繞過 RLS、TO authenticated 只是認證不是授權。遇到上述主題 MUST 讀官方 skill,本檔不是它的替代品。

自家的 policy 撰寫規範(GRANT 先於 RLS、AS RESTRICTIVE 疊加、FORCE ROW LEVEL SECURITY、 JWT staleness、service_role isolation)在 rule db-schema/supabase/rls-policy.md,那是 paths-gated 規約,改 supabase/migrations/**/*.sql 時自動載入。

SOP

Phase 1 -- 界定 policy 需求與分工

  1. READ 讀取目標表、會讀寫它的角色、每個 operation(SELECT/INSERT/UPDATE/DELETE)的存取需求,以及這張表由 client 直讀還是只由 server 讀;需求碰到上方導言列的通用陷阱時,讀取官方 supabase skill 對應段落。
  2. READ 讀取 module rule db-schema/supabase/rls-policy.md(改 supabase/migrations/**/*.sql 時已自動載入就不重讀)。

Phase 2 -- 撰寫 policy

  1. READ 讀取 rules/Policy自家慣例判準.md。
  2. WRITE 讀取 templates/rls-policies.md 與 templates/rls-policies.example.md,在同一支 migration 中寫 ENABLE(FORCE 依 rls-policy.md 的條件)、GRANT 與每個 operation 的 policy。

Phase 3 -- 驗證

  1. DELEGATE 跑 pnpm db:lint,輸出非空就修正後重跑。
  2. READ 走一遍官方 supabase skill 的 Security checklist(views/SECURITY DEFINER/storage/JWT),再逐條對照已載入規則;不符就回 Phase 2 修正。
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. 1mo ago Changed · -34 lines a4b7495acf1d
  2. 1mo ago Changed · -1 lines 5d163bdacbad
  3. 2mo ago Changed · -6 lines 5357ba4c0beb
  4. 2mo ago Changed · +1 lines 94ede662220c
  5. 2mo ago Changed · +14 lines · +10 tokens per session de473d4c248d
  6. 3mo ago First seen · 62 lines · 63 tokens per session scan A 2588031fd99f

Subscribe to this mod's changes

supabase-rls is a skill published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed 2d ago), licensed MIT. It adds 73 tokens to every session and 656 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-08-30.

Related

supabase-rls compared with skills from other repositories

supabase-rls next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
supabase-rlsYuDefine/nuxt-supabase-starterSkill452d agoMITA73Claude Code
nw-query-optimizationnWave-ai/nWaveSkill63611d agoMITA32Claude Code
database-optimizationils15/pantheon-legacySkill1216d agoMITA25Claude Code
database-migrationils15/pantheon-legacySkill1216d agoMITA26Claude Code, Codex
supabase-postgres-best-practicesever-works/directory-web-templateSkill22yesterdayAGPL-3.0A41Claude Code, Codex
schema-designint2t05/engineering-skillsSkill31mo agoMITA27Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex