Cursor Rules for Supabase

8 Supabase rules your agent actually follows: each one attaches only to the files it's about, states the version-specific behavior, and installs with one command.

Cursor Rules for Supabase cover

What it is

8 Cursor project rules (.mdc) for Supabase, scoped so each loads only when relevant, with an installer that detects your stack, an AGENTS.md exporter (Claude Code, Codex) and a rules linter. Written against current docs (checked Nov 2026; Supabase publishable/secret keys, @supabase/ssr).

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 8 tests OK on Python 3.13 and 3.10.

Real terminal output from Cursor Rules for Supabase: demo and passing tests

Install in 30 seconds

python3 tools/install_rules.py --detect /path/to/app          # what it finds
python3 tools/install_rules.py /path/to/app --auto            # install rules for detected stacks into .cursor/rules/
python3 tools/install_rules.py /path/to/app --all --agents-md # everything, plus AGENTS.md
python3 tools/lint_rules.py /path/to/app/.cursor/rules --project /path/to/app

Existing files are never overwritten unless you pass --force; --dry-run previews. ./tools/demo.sh runs it on examples/sample-app; ./run_tests.sh runs the tests. As a Cursor plugin, the manifest is .cursor-plugin/plugin.json.

The rules

RuleLoadsFirst instruction
supabase-overview.mdcalwaysKeys: the publishable key (sb_publishable_...) is for anything shipped to users and only reaches what Row Level...
supabase-rls-policies.mdcby file (supabase/migrations//*.sql, supabase//*.sql)alter table x enable row level security; in the same migration that creates the table
supabase-ssr-auth.mdcby file (utils/supabase/, lib/supabase/, src/lib/supabase/, proxy.ts, middleware.ts, app/auth/)Use @supabase/ssr (createBrowserClient, createServerClient)
supabase-migrations-cli.mdcby file (supabase/migrations//*.sql, supabase/config.toml, supabase/seed.sql)New change: supabase migration new add_notes and write SQL, or make the change locally and capture it with...
supabase-queries.mdcby file (/*.ts, /*.tsx)Type the client: createClient<Database>(...) with generated types
supabase-edge-functions.mdcby file (supabase/functions/)Functions live in supabase/functions/<name>/index.ts and use Deno.serve
supabase-storage.mdcAgent picks itBuckets are private unless the files are truly public
supabase-realtime.mdcAgent picks itpostgres_changes only streams tables added to the supabase_realtime publication, and it respects RLS for the...

Honest limits

  • Rules guide the model; they don't enforce anything. Check version-specific advice against the versions in your lockfile (each overview rule tells the agent to do this).
  • Detection is file-based (package.json, manage.py/requirements, Gemfile, supabase/); in monorepos run it per package or use --stack.

Format and license

Zip, 19 KB, v1.0, 25 files. You may use and modify this kit for your own work and for clients you serve, including paid client work. Not affiliated with or endorsed by Cursor (Anysphere) or Supabase.

FAQ

Only Next.js?
The RLS, migrations, Storage, Realtime and Edge Function rules work with any frontend; the SSR auth rule covers @supabase/ssr frameworks.
Will it overwrite my rules?
No, existing files are skipped unless you pass --force.
Claude Code or Codex?
Run the installer with --agents-md to write the same rules into AGENTS.md.
How do I get the files?
Right after payment, Stripe’s confirmation page shows your download link.
Refunds?
Email hello@youraitools.co within 14 days if it doesn’t work and we can’t fix it.
Can I pay with crypto?
Yes. Pay the same price in USDC or USDT on Base, Ethereum, Arbitrum, Optimism, Polygon or Solana from the "Pay with crypto" button, with no account or KYC. We check the payment on-chain and show your download links as soon as it confirms.

Get Cursor Rules for Supabase

8 Cursor rules for Supabase (Row Level Security policies and more), written against current docs. Installs in one command, exports AGENTS.md. $12 once.

Save with a bundle

Pairs well with

DownloadFree

Supabase Cursor Rules Starter (Free)

Free Supabase Cursor rules in .mdc format, checked against current Supabase docs, plus a linter that shows why a rule isn't applying.

View Supabase Cursor Rules Starter (Free)
Download$29

SEO Audit MCP Server

SEO MCP server for Claude Code, Cursor and Claude Desktop: page audits, redirect chains, robots.txt, sitemaps and site crawls. No API keys or credits. $29 once.

View SEO Audit MCP Server
Download$12

Cursor Rules for Laravel

8 Cursor rules for Laravel, written against current docs. Installs in one command, exports AGENTS.md for Claude Code and Codex. $12 once.

View Cursor Rules for Laravel

Related