supabase-policy-guardrails
Skill by jeremylongshore
Enforces governance rules for Supabase projects, including a shared RLS policy library, naming conventions, migration review checks, cost alerts and security audits. Built for teams setting Supabase standards and engineers auditing existing projects.
Install supabase-policy-guardrails
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/supabase-policy-guardrails ~/.claude/skills/supabase-policy-guardrailsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install supabase-policy-guardrails in Claude Code
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/supabase-policy-guardrails ~/.gemini/antigravity-cli/skills/supabase-policy-guardrailsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install supabase-policy-guardrails in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
Supabase Policy Guardrails is an agent skill that sets organizational governance rules for Supabase projects. It provides a shared RLS policy library with three reusable templates: owner-only, organization-scoped, and public read with authenticated write. It also defines naming conventions for tables, columns, foreign keys, booleans, timestamps, policies, functions, indexes and migrations, with a SQL function that checks existing objects against them.
The skill also covers a migration review process with CI checks, pre-commit hooks that block hardcoded secrets and tables without RLS, and cost monitoring with configurable thresholds and Slack alerts. Security audit scripts scan for missing RLS, permissive policies and missing indexes. The source says the CI, cost and security details are in a separate reference file. It is aimed at teams establishing Supabase standards and at engineers auditing existing projects for security and cost issues.
Written from the project's SKILL.md and checked against it.
What it can do
- Owner-only RLS templateEnables RLS and creates select, insert, update and delete policies based on a user column.
- Organization-scoped RLS templateRestricts access to members of an organization, with an optional admin-only delete policy.
- Public read, authenticated write templateAllows public select and authenticated inserts, with owner-only updates and deletes.
- Naming convention validationSQL function that flags table, column, foreign key and boolean names that break the conventions.
- Migration review CI checksGitHub Actions guardrails for RLS enforcement, naming checks and destructive operation blocks.
- Pre-commit hooksBlocks hardcoded secrets and tables without RLS before commit.
- Cost monitoring with Slack alertsMonitors usage against configurable thresholds and sends alerts to Slack.
- Security audit scriptsScans projects for missing RLS, permissive policies and missing indexes.
What you need
- Supabase CLI installed and linked to the project
- @supabase/supabase-js v2 or later
- CI/CD pipeline, GitHub Actions recommended
- psql or the Supabase SQL Editor
- Supabase Pro plan recommended for cost alerts and usage API
- SUPABASE_ACCESS_TOKEN for cost alerts
Try asking
- Apply the owner-only RLS template to my todos table
- Check my Supabase schema for naming convention issues
- Run a security audit on my Supabase project for missing RLS
Good to know
- Pro plan recommended for cost alerts and the usage API.
- Security audit may time out on projects with many tables.
- The plural table name check is a heuristic and can flag intentionally singular names.
- CI, cost and security details are in a separate reference file.
Security check
B- Allowed to use Write, Edit without limitsIn
SKILL.md
Checked automatically: skills/.curated/supabase-policy-guardrails/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadWriteEditBash(supabase:*)Bash(psql:*)Bash(npx:*)Grep
Alternatives to supabase-policy-guardrails
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
supabase-policy-guardrails: common questions
What RLS templates does the library include?
The library includes owner-only, organization-scoped, and public read with authenticated write templates. Each is a PL/pgSQL function that enables RLS and creates the matching policies on a table.
Does it check naming conventions?
Yes. The validate_naming_conventions function checks table names, column names, foreign key columns and boolean columns in the public schema.
What is needed for cost alerts?
The source recommends a Supabase Pro plan and a SUPABASE_ACCESS_TOKEN. The troubleshooting table says a missing token stops cost alerts from firing.
How do I install supabase-policy-guardrails?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is supabase-policy-guardrails free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is supabase-policy-guardrails safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.
What are alternatives to supabase-policy-guardrails?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
