Skip to main content
rule CX Codex

supabase-typed-mutations — Claude Code rule for Supabase typing

The supabase-typed-mutations Claude Code rule adds Database types to Supabase insert, update, and upsert calls. It applies while an agent works with these mutations.

AGPL-3.0 ★ 1,120 updated 2026-11-16

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/supabase-typed-mutations.mdc
Open on GitHub

What supabase-typed-mutations does

The rule requires Supabase mutation calls to use types that match their table. It uses the Insert and Update types under Database['public']['Tables'].

Import Database from @/app/api/database.types. For a projects update, the rule points to Database['public']['Tables']['projects']['Update']; inserts use the matching Insert type. The referenced types file must exist at that import path.

What it helps with

  • type Supabase inserts for a table
  • use the matching type for table updates
  • add table types to upsert calls

Example prompts for the agent

  • Add the Database type to the Supabase insert call for projects.
  • Check that the projects update uses its Update type from Database.
  • Type this Supabase upsert call using the table’s Database type.

How to install supabase-typed-mutations

Manually: put the files in place

.cursor/rules/supabase-typed-mutations.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about supabase-typed-mutations

How do I install supabase-typed-mutations in Claude Code?

Add the rule file at .claude/rules/supabase-typed-mutations.md.

What does supabase-typed-mutations do?

It requires Supabase insert, update, and upsert calls to use matching types from Database.

What does supabase-typed-mutations need to work?

The project needs the Database type file at @/app/api/database.types.

Similar IDE rules

All IDE rules for Data and databases →
supabase-migration-assistant davila7 supabase-migration-assistant is a Claude Code command that generates and validates Supabase database migrations. It builds SQL scripts, updates TypeScript definitions, and prepares rollback steps. CX Codex +1 982installs supabase-type-generator davila7 supabase-type-generator — a slash command that turns your Supabase schema into TypeScript types and keeps them in sync. Useful when the database moves ahead of the types in your project. CX Codex +1 948installs supabase-audit-tables-list yoanbernabeu supabase-audit-tables-list — a skill for Claude Code and other agents that enumerates tables exposed through the Supabase PostgREST API and ranks them by risk level. Runs before RLS policy testing or public-schema inventory. CX Codex +1 524installs supabase-agent-skills akillness A skill pack that gives AI coding agents direct access to Supabase and PostgreSQL tooling. Install once, and agents handle schema introspection, query review, and migrations automatically. CX Codex +1 252installs supabase-admin curiositech supabase-admin — a skill for Supabase database work: schema design, Row Level Security policies, migrations, and query debugging. It helps when an agent modifies the database structure or figures out why a query returns nothing. CX Codex +1 200installs supabase membrane This skill lets an agent discover and run Supabase actions through the Membrane CLI. Use it to work with connected data or send API requests through Membrane’s proxy. CX Codex +1 159installs

From the same set25

The whole set →
no-icons-in-buttons no-icons-in-buttons — a Claude Code rule that keeps button content text-only by default. The agent adds an icon only when the user explicitly asks for one. CX Codex +1 ★ 1,120repo stars english-only The english-only Claude Code rule sets English as the language for interface copy and labels. It applies across project files. CX Codex +1 ★ 1,120repo stars server-actions This Claude Code rule guides the choice between Server Actions and API routes for reading or changing data. It applies when an agent writes server-side application logic. CX Codex +1 ★ 1,120repo stars input-label The input-label Claude Code rule sets how fields get their captions through the Input component. It applies to *.tsx files and disallows a separate caption above the field. CX Codex +1 ★ 1,120repo stars use-shadcn This rule for Claude Code, Codex, and Cursor guides agents to reuse shadcn/ui components. When building UI, it directs them to look for existing project components first. CX Codex +1 ★ 1,120repo stars one-component-per-file The one-component-per-file Claude Code rule keeps each React component in its own file. It applies to *.tsx files. CX Codex +1 ★ 1,120repo stars realtime This Claude Code rule sets the pattern for Supabase Realtime subscriptions. It directs component code to useRealtimeSubscription instead of calling supabase.channel() directly. CX Codex +1 ★ 1,120repo stars dialog-trigger-pattern The dialog-trigger-pattern Claude Code rule defines how dialog components receive their trigger. It applies to .tsx files. CX Codex +1 ★ 1,120repo stars

Project sponsors

Companies that keep this analytics open