About this skill
Postgres Rules for Supabase Projects
Coding agents write SQL that works on ten rows and falls over on ten million: RLS policies that call auth.uid() once per row, foreign keys without indexes, migrations that lock a busy table, tables exposed to the API with no policy at all. This skill loads Supabase's own Postgres rule set into your agent before it touches the database, so schema changes, policies, indexes and queries follow 31 written rules with incorrect and correct SQL side by side.
How it works. Install it in a project that uses Supabase or any Postgres. The agent loads it on its own when you create or alter tables, write RLS policies, add indexes, write migrations or chase a slow query; you can also call it directly with /supabase-postgres-rules. It opens only the rule files the task needs (for an RLS audit: the RLS basics, RLS performance and privileges rules) and answers with the SQL to run, the rule it applied and, for indexes, the explain analyze to compare before and after.
What you get. SKILL.md with the rule index in eight categories ranked by impact (query performance, connections, security and RLS, schema design, locking, data access, monitoring, advanced features), 31 rule files under references/, and you-say.md, a short Risemi page with six example requests and which rules each one uses.
Based on supabase-postgres-best-practices by Supabase (MIT): https://github.com/supabase/agent-skills
What we changed
- Renamed the skill to
supabase-postgres-rulesand normalized the frontmatter to the SKILL.md spec (upstreamdescriptionkept word for word). - Added
you-say.mdwith six example requests (RLS audit, index for a slow query, schema design, migration review, N+1 rewrite, connection errors) and a pointer to it at the end ofSKILL.md. - Left out the contributor template and writing guide, the changelog and the separate general
supabaseskill from the same repository. - Removed one leftover authoring sentence from
references/_sections.mdthat read as an instruction to replace the section list. - Added attribution (
NOTICE.md,LICENSES/).
The 31 rule files are the upstream text, unchanged. Upstream has no rule file dedicated to migrations; migration reviews rely on the constraints, locking and foreign-key index rules. Full list of edits in NOTICE.md.
Checked against
The files follow the Agent Skills SKILL.md format: spec-only frontmatter, name matching the folder, description under 1024 characters. Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI and Antigravity read that format from a skills folder. We checked the files against the spec on 2026-11-07, and checked by script that every reference file named in SKILL.md and you-say.md exists. We have not recorded a test session in each agent. The example output on this page comes from a real run of the skill in Claude Code (Claude Opus) on 2026-11-07 with the request shown under "You say"; the migration was not applied to a database.
How to install
Copy the files/ folder of the download to .agents/skills/supabase-postgres-rules/ (Codex, Cursor, Copilot, Gemini CLI, Antigravity) and/or .claude/skills/supabase-postgres-rules/ (Claude Code), or download the zip from this page and unpack it there. Start a new agent session and type /supabase-postgres-rules followed by your request, for example /supabase-postgres-rules audit the RLS on public.orders.
Not affiliated with Supabase Inc.
