supabase-db-create-migrations

supabase-db-create-migrations is a cursor rule for Cursor from lacymorrow/paperclip-hub. It costs 0 tokens per session (546 once invoked), scanned A, a copy of guidelines-for-writing-postgres-migrations-with-supabase-cli, MIT.

A set of rules for creating PostgreSQL database migration files in Supabase. A migration is a tracked SQL change that creates or updates a database schema over time.

In plain words
What is it for?
Use it when adding tables, columns, constraints, indexes, or other schema changes in the `supabase/migrations` folder.
Why use it?
It helps keep database changes consistent, reviewable, and usable by the Supabase command-line tools. It also defines a required timestamped filename format and SQL practices.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it when adding tables, columns, constraints, indexes, or other schema changes in the supabase/migrations folder.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lacymorrow/paperclip-hub/supabase-db-create-migrations
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/lacymorrow/paperclip-hub

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-db-create-migrations

README.md
[![agentmods](https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/supabase-db-create-migrations/github.svg)](https://agentmods.dev/rules/lacymorrow/paperclip-hub/supabase-db-create-migrations)
Your own site
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/supabase-db-create-migrations"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/supabase-db-create-migrations/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-db-create-migrations

Your own site · 80×15
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/supabase-db-create-migrations"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/supabase-db-create-migrations.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 546 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod 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.00546
Opus 5.5 $0.00000 $0.00218
Sonnet 5.5 $0.00000 $0.00109
Haiku 4.5 $0.00000 $0.00055

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

Security

Grade A, and why

supabase-db-create-migrations scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to guidelines-for-writing-postgres-migrations-with-supabase-cli — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/supabase-db-create-migrations.mdc · 56 lines

How it starts

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


Specify the following for Cursor rules

description: Guidelines for writing Postgres migrations globs: "supabase/migrations/**/*.sql"

Database: Create migration

You are a Postgres Expert who loves creating secure database schemas.

This project uses the migrations provided by the Supabase CLI.

Creating a migration file

Given the context of the user's message, create a database migration file inside the folder supabase/migrations/.

The file MUST following this naming convention:

The file MUST be named in the format YYYYMMDDHHmmss_short_description.sql with proper casing for months, minutes, and seconds in UTC time:

  1. YYYY - Four digits for the year (e.g., 2024).
  2. MM - Two digits for the month (01 to 12).
  3. DD - Two digits for the day of the month (01 to 31).
  4. HH - Two digits for the hour in 24-hour format (00 to 23).
  5. mm - Two digits for the minute (00 to 59).
  6. ss - Two digits for the second (00 to 59).
  7. Add an appropriate description for the migration.

For example:

20240906123045_create_profiles.sql

SQL Guidelines

Write Postgres-compatible SQL code for Supabase migration files that:

  • Includes a header comment with metadata about the migration, such as the purpose, affected tables/columns, and any special considerations.
  • Includes thorough comments explaining the purpose and expected behavior of each migration step.
  • Write all SQL in lowercase.
  • Add copious comments for any destructive SQL commands, including truncating, dropping, or column alterations.
  • When creating a new table, you MUST enable Row Level Security (RLS) even if the table is intended for public access.
  • When creating RLS Policies
    • Ensure the policies cover all relevant access scenarios (e.g. select, insert, update, delete) based on the table's purpose and data sensitivity.
    • If the table is intended for public access the policy can simply return true.
    • RLS Policies should be granular: one policy for select, one for insert etc) and for each supabase role (anon and authenticated). DO NOT combine Policies even if the functionality is the same for both roles.
    • Include comments explaining the rationale and intended behavior of each security policy

Read the full file on GitHub · 56 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. yesterday First seen · 56 lines · 0 tokens per session scan A 3e8eb2be0ec6

Subscribe to this mod's changes

supabase-db-create-migrations is a cursor rule published in the GitHub repository lacymorrow/paperclip-hub (15 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 546 tokens. A static security scan graded it A with 0 findings. It is 97% identical to guidelines-for-writing-postgres-migrations-with-supabase-cli, differing in 5 lines, and is treated as a copy.

Related

supabase-db-create-migrations compared with cursor rules from other repositories

supabase-db-create-migrations next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
supabase-db-create-migrationslacymorrow/paperclip-hubCursor rule15yesterdayMITA0Cursor
supabase-db-rlsshipkit-io/bonesCursor rule21yesterdaynoneA0Cursor
database-interaction-best-practicesWebDevPeterGriffin/The-VibeCode-BibleCursor rule427d agononeA74Cursor
supabase-db-create-functionsshipkit-io/bonesCursor rule21yesterdaynoneA0Cursor
supabase-db-styleguideshipkit-io/bonesCursor rule21yesterdaynoneA0Cursor
supabase-db-create-migrationsshipkit-io/bonesCursor rule21yesterdaynoneA0Cursor
30-database-postgresaiagentwithdhruv/ai-dev-stackCursor rule114mo agoMITA0Cursor