supabase · rerun-build — Claude Code rule: database access and setup
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.
AGPL-3.0 ★ 1,120 updated 2026-11-16
.cursor/rules/supabase.mdcWhat supabase 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.
What it helps with
- route Supabase queries through existing helpers
- replace direct
supabase.from().select()calls - keep
supabase-helpers.tsunchanged
Example prompts for the agent
- 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.
How to install supabase
Manually: put the files in place
.cursor/rules/supabase.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/supabase.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/supabase.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/supabase.mdManually: put the files in place
.clinerules/supabase.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about supabase
How do I install supabase in Claude Code?
Save the rule file at .claude/rules/supabase.md.
What does the supabase rule do?
It requires database access through @src/app/supabase/supabase-helpers.ts and blocks direct calls such as supabase.from().select(). The rule always applies.
Can I edit supabase-helpers.ts?
The rule says not to change that file without permission.
Similar IDE rules
All IDE rules for Data and databases →supabase by other authors comes first.