# supabase

This Claude Code rule sets how the agent accesses a Supabase database. It requires using @src/app/supabase/supabase-helpers.ts instead of querying tables directly.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 1120 repo stars
- Author: rerun-build
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rerun-build/rerun/tree/HEAD/apps/ui/.cursor/rules/supabase.mdc
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/rerun-build-supabase

## What it does

The rule routes database queries through `@src/app/supabase/supabase-helpers.ts`. It applies at all times, including when the agent reads data or prepares code changes. Direct calls such as `supabase.from().select()` are prohibited.

Do not edit `supabase-helpers.ts` without permission. For Claude Code, save the rule at `.claude/rules/supabase.md`; Cursor uses `.cursor/rules/supabase.mdc`.

## Requirements
- Works with: Supabase

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/supabase.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/supabase.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/supabase.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/supabase.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/supabase.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/rerun-build/rerun/tree/HEAD/apps/ui/.cursor/rules/supabase.mdc

## When to use it
- route Supabase queries through existing helpers
- replace direct `supabase.from().select()` calls
- keep `supabase-helpers.ts` unchanged

## Example prompts
- Read Supabase data through `@src/app/supabase/supabase-helpers.ts`.
- Replace the direct `supabase.from().select()` query with a helper call.
- Update the table access without editing `supabase-helpers.ts`.

## Similar
- [supabase-server](https://affpapa.org/en/nevibecode/skills/supabase-server.md) — skill · 11200 installs
- [nextjs-supabase-auth](https://affpapa.org/en/nevibecode/skills/sickn33-nextjs-supabase-auth.md) — skill · 6600 installs
- [supabase-schema-architect](https://affpapa.org/en/nevibecode/agents/supabase-schema-architect.md) — subagent · 3839 installs
- [supabase-schema-sync](https://affpapa.org/en/nevibecode/commands/supabase-schema-sync.md) — command · 1405 installs
- [supabase-audit-rls](https://affpapa.org/en/nevibecode/skills/supabase-audit-rls.md) — skill · 1300 installs
- [nextjs-typescript-tailwindcss-supabase](https://affpapa.org/en/nevibecode/skills/nextjs-typescript-tailwindcss-supabase.md) — skill · 1400 installs

## Other versions with the same name
- [supabase · sanjeed5](https://affpapa.org/en/nevibecode/rules/supabase.md) — ★ 3589 repo stars
- [supabase · przeprogramowani](https://affpapa.org/en/nevibecode/rules/przeprogramowani-supabase.md) — ★ 267 repo stars

From the same set: [rerun-build/rerun](https://affpapa.org/en/nevibecode/by/rerun-build/rerun.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
