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 YuDefine/nuxt-supabase-starter --skill supabase-rlsgit clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starterWrote 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/yudefine/nuxt-supabase-starter/supabase-rls)<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.
<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>- NVIDIA SkillSpector pass
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.00063 | $0.00662 |
| Opus 5 | $0.00032 | $0.00331 |
| Sonnet 5 | $0.00013 | $0.00132 |
| Haiku 4.5 | $0.00006 | $0.00066 |
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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Supabase RLS 政策規範
service_role 繞過規則已定義在 CLAUDE.md。本 skill 提供完整 RLS 實作指引。
核心原則
使用 Helper 函式
建議建立 helper 函式取代直接查表:
-- ✅ 使用 helper
your_schema.current_user_role()
your_schema.current_user_id()
-- ❌ 直接查表(效能差)
SELECT role FROM your_schema.user_roles WHERE id = auth.uid()
RLS 開啟原則
ALTER TABLE your_schema.new_table ENABLE ROW LEVEL SECURITY;
ALTER TABLE your_schema.new_table FORCE ROW LEVEL SECURITY;
常見問題
| 症狀 | 原因 | 解法 |
|---|---|---|
| Toast 成功但資料沒變 | 缺少 service_role 繞過 |
加上 (SELECT auth.role()) = 'service_role' |
| 查詢回傳空陣列 | RLS 未開放讀取 | 檢查 SELECT policy |
| UPDATE 回傳 0 rows 無報錯 | UPDATE 需要搭配 SELECT policy | 補上對應的 SELECT policy(Postgres RLS 限制) |
| Storage upsert 靜默失敗 | 只有 INSERT policy,缺 SELECT/UPDATE | Storage upsert 需要 INSERT + SELECT + UPDATE 三個 policy |
RLS policy 用 user_metadata |
user_metadata 使用者可自行修改 |
改用 app_metadata(raw_app_meta_data) |
| 刪除 user 後仍能存取 | JWT 未失效 | 先 revoke sessions,縮短 JWT expiry |
參考資料
| 檔案 | 內容 |
|---|---|
| references/templates.md | Policy 模板 + 角色階層 |
檢查清單
- 包含
(SELECT auth.role()) = 'service_role'繞過 - 使用 helper 函式而非直接查表
- INSERT/UPDATE/DELETE 都有對應 policy
- 有 UPDATE policy 的表必須同時有 SELECT policy(否則 UPDATE 靜默失敗)
- Storage bucket 的 upsert 場景需 INSERT + SELECT + UPDATE 三個 policy
- Policy 中 NEVER 使用
user_metadata/raw_user_meta_data做授權判斷 -
pnpm db:lint無警告
What ships with it
1 file 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.
- 10d ago First seen · 62 lines · 63 tokens per session scan A 2588031fd99f
supabase-rls is a skill published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 662 once invoked, about $0.0003 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-08-30.
Other skills, from other repositories
explorer
Build and modify Studio Explorer surfaces, including notebooks, chats, SQL snippets, query cells, and their shared toolbar patterns.
azure-cosmos-db-py
Build Azure Cosmos DB NoSQL services with Python/FastAPI following production-grade patterns. Use when implementing database client setup with dual auth (DefaultAzureCredential + emulator), service layer classes with CRUD operations, partition key strategies, parameterized queries, or TDD patterns for Cosmos. Triggers…
dotcanvas
Author and edit a Grida .canvas board — a .canvas.json manifest plus document files (references, generated images, notes) placed on an infinite canvas. Use when working on a .canvas bundle or arranging visuals/design work spatially. For a linear deck/presentation, use the slides skill instead.
supabase
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…
svg
Author and edit .svg files in a Grida editor session — live-canvas binding, SVG output style, and parse-error recovery. Use when creating or modifying an SVG document.
gh-issue
Size-audit, write, and split BanyanDB issues that somebody else or an automated TDD workflow can implement. Use whenever the user asks to file or revise an issue, decide whether an issue is too large, make an issue TDD-ready, turn a design into tickets, or split an umbrella into executable leaves. Do not draft or file…