supabase

supabase is a cursor rule for Cursor from bernierllc/agents-environment-config. It costs 0 tokens per session (937 once invoked), scanned A, original, MIT.

A set of rules for building applications with Supabase, a service that provides tools such as databases and backend features. It covers development guidance, commands, and database patterns.

In plain words
What is it for?
Use it when writing Supabase code, running related commands, designing database access, or applying the project's backend patterns.
Why use it?
It gives contributors consistent instructions for working with the project's Supabase setup and data layer.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when writing Supabase code, running related commands, designing database access, or applying the project's backend patterns.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bernierllc/agents-environment-config/supabase
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.

Clone the repo
git clone --depth 1 https://github.com/bernierllc/agents-environment-config

Made for: Cursor.

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/supabase/github.svg)](https://agentmods.dev/rules/bernierllc/agents-environment-config/supabase)
Your own site
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/supabase"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/supabase/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

Your own site · 80×15
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/supabase"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/supabase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00937
Opus 5.5 $0.00000 $0.00375
Sonnet 5.5 $0.00000 $0.00187
Haiku 4.5 $0.00000 $0.00094

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

Security

Grade A, and why

supabase scanned grade A with 1 finding 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 3mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Test API endpoints** using browser extensions or curl, not by starting servers
.cursor/rules/frameworks/database/supabase.mdc · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Supabase Development Rules

Command Usage

Workspace Commands

  • ALWAYS use pnpm supa instead of global supabase CLI
  • NEVER use supabase directly - always go through pnpm workspace

Common Supabase Commands

  • Start local Supabase: pnpm supa start
  • Stop local Supabase: pnpm supa stop
  • Generate types: pnpm supa:generate (local) or pnpm supa:generate:remote
  • Create migration: pnpm supa migration:new <name>
  • Apply migrations: pnpm supa migration:up
  • Reset database: pnpm supa reset
  • Check status: pnpm supa status
  • Open Studio: pnpm supa:studio (http://127.0.0.1:54323)
  • Open Mailpit: pnpm supa:mailpit (http://127.0.0.1:54324)

Development Workflow

  • ASSUME Supabase is running on http://localhost:54321 unless told otherwise
  • Check pnpm supa status before suggesting database operations
  • Use local types generation (pnpm supa:generate) for development
  • Test API endpoints using browser extensions or curl, not by starting servers

File Locations

  • Supabase config: supabase/config.toml
  • Migrations: supabase/migrations/
  • Types: supabase/types.ts
  • Seed data: supabase/seed.sql

Database Structure

Conventions

  • All tables use UUIDs for IDs (text-based UUIDs)
  • Timestamps use timestamptz
  • Junction tables follow naming pattern: table1_table2
  • All tables have created_at and updated_at fields

Schema Organization

supabase/
├── migrations/          # Database migrations
├── seed.sql            # Seed data
├── config.toml         # Supabase configuration
└── types.ts            # Generated TypeScript types

Row Level Security (RLS)

Core Principle: NEVER Bypass RLS

Row Level Security (RLS) is your primary security mechanism. The service role should respect RLS policies, not bypass them.

RLS Setup Pattern

-- Enable RLS
ALTER TABLE jobs ENABLE ROW LEVEL SECURITY;

-- Grant table access
GRANT SELECT ON jobs TO anon, authenticated;
GRANT ALL ON jobs TO service_role;

-- Create policies
CREATE POLICY jobs_public_read ON jobs
  FOR SELECT TO anon, authenticated
  USING (is_published = true);

Read the full file on GitHub · 125 lines

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. 3mo ago First seen · 125 lines · 0 tokens per session scan A 7e35ee095137

Subscribe to this mod's changes

supabase is a cursor rule published in the GitHub repository bernierllc/agents-environment-config (11 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 937 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

supabase compared with cursor rules from other repositories

supabase next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
supabasebernierllc/agents-environment-configCursor rule11yesterdayMITA0Cursor
supabase-rulesbeel-collab/presets.devCursor rule37d agoMITA0Cursor
adapter-featuresprest/prestCursor rule4.6k3d agoMITA773Cursor
postgresqlsanjeed5/awesome-cursor-rules-mdcCursor rule3.6k7d agoCC0-1.0A2,337Cursor
planning-and-delegationprest/prestCursor rule4.6k3d agoMITA912Cursor
integration-testsprest/prestCursor rule4.6k3d agoMITA0Cursor
netlify-database-migration-from-extensionnetlify/context-and-toolsCursor rule573d agoMITA16Cursor