supabase-migration

supabase-migration is a skill for Claude Code from YuDefine/nuxt-supabase-starter. It costs 55 tokens per session (1,001 once invoked), scanned A, original, MIT.

A set of rules for changing a Supabase database through migration files. Supabase is a hosted PostgreSQL database service, and migrations are recorded database changes that can be deployed consistently.

In plain words
What is it for?
It guides schema changes, indexes, database functions, views, and migration deployment, including when remote SQL tools may be used.
Why use it?
It prevents database objects from being created with the wrong owner or with security settings that bypass row-level access rules.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Good fit It guides schema changes, indexes, database functions, views, and migration deployment, including when remote SQL tools may be used.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yudefine/nuxt-supabase-starter/supabase-migration
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.

Any agent
npx skills add YuDefine/nuxt-supabase-starter --skill supabase-migration
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

Made for: Claude Code.

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-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/supabase-migration/github.svg)](https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/supabase-migration)
Your own site
<a href="https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/supabase-migration"><img src="https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/supabase-migration/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-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/supabase-migration"><img src="https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/supabase-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,001 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00055 $0.01001
Opus 5.5 $0.00022 $0.00400
Sonnet 5.5 $0.00011 $0.00200
Haiku 4.5 $0.00006 $0.00100

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

Security

Grade A, and why

supabase-migration 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 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/postgrest-resilience/classify-migration.mjs, scripts/postgrest-resilience/ready-watch.mjs, scripts/postgrest-resilience/smoke-runner.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

template/.claude/skills/supabase-migration/SKILL.md · 52 lines

How it starts

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

Supabase Migration 規範

核心規則(supabase migration new、search_path、SECURITY DEFINER 不放 exposed schema、view security_invoker、不改已 apply 的 migration、timestamp 契約、MCP 禁 DDL、reset → lint → gen types → typecheck、advisors、pending migration 分類、expand-contract)在 rules/modules/db-schema/supabase/migration.md,本 skill 不複述,只補實作細節。

PR-isolated DB preview env / schema diff gate / production data sanitization 規約見 rules/core/db-preview-env.md(capability + safety contract)與 rules/modules/db-runtime/supabase-self-hosted/preview-env.md(self-host 實作層 + image trip-wires)。Cookbook 範本:vendor/snippets/db-preview-env/。

SOP

Phase 1 -- 建立 migration 檔

  1. READ 讀取 module rule rules/modules/db-schema/supabase/migration.md(或 runtime 已交付的同名規約;改 supabase/migrations/**/*.sql 時已自動載入就不重讀)。
  2. DELEGATE 執行 supabase migration new <topic> 產生檔名;一個 migration 只放一個主題。

Phase 2 -- 撰寫 DDL

  1. READ 讀取 rules/DDL撰寫慣例判準.md。
  2. WRITE 需要 SECURITY DEFINER 函式時,讀取 templates/security-definer-function.md 與 templates/security-definer-function.example.md 撰寫;要讓 PostgREST(Data API)呼叫時,再讀取 templates/public-thin-wrapper.md 與 templates/public-thin-wrapper.example.md 在 public 建 wrapper。
  3. WRITE 其餘 DDL 依已載入規則撰寫;RLS policy 的內容設計轉 supabase-rls skill。

Phase 3 -- 本機驗證

  1. DELEGATE 依 module rule 對每一個新增或修改的 migration 跑 reset → lint → gen types → typecheck,再跑 supabase db advisors 並逐條處置 security 類 finding。

  2. DELEGATE 檢查有沒有 migration 被改名:

    git diff --cached --diff-filter=R -- 'supabase/migrations/' | grep -q . && echo "BLOCK: migration renamed" || echo "OK"
    

    印 BLOCK 時 STOP,把檔名還原成 main 上的檔名,不 commit 新 timestamp(判準見 migration.md § Timestamp 不可變)。

Phase 4 -- Production 韌性分類與 gate(self-host production)

  1. DELEGATE 執行 node scripts/postgrest-resilience/classify-migration.mjs <migration.sql>(本 skill 目錄下的投影資源);找不到投影資源時 NEVER 改用其他 runtime 的路徑猜一個,回報標準未送達並保留 evidence 要求。
  2. THINK 讀取 rules/Production韌性分類判準.md,依分類器的 overall 決定 online、expand-contract 或 hard stop。
  3. DELEGATE online 路線部署時執行 node scripts/postgrest-resilience/ready-watch.mjs --url=<admin-ready-url> 與 node scripts/postgrest-resilience/smoke-runner.mjs --endpoint=<name=url>,保存 /ready、smoke summary 與 PostgREST logs 作為 evidence。

Read the full file on GitHub · 52 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. 1mo ago Changed · -57 lines 63f571541c0b
  2. 1mo ago Changed · -1 lines f92e72bdfc1a
  3. 2mo ago Changed · -52 lines 598996927084
  4. 2mo ago Changed · +1 lines 02207dc59982
  5. 2mo ago Changed · +47 lines · -1 tokens per session fbabd477c6a4
  6. 3mo ago First seen · 114 lines · 56 tokens per session scan A 0be5927a9933

Subscribe to this mod's changes

supabase-migration is a skill published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed 2d ago), licensed MIT. It adds 55 tokens to every session and 1,001 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

supabase-migration compared with skills from other repositories

supabase-migration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
supabase-migrationYuDefine/nuxt-supabase-starterSkill452d agoMITA55Claude Code
nw-query-optimizationnWave-ai/nWaveSkill63611d agoMITA32Claude Code
database-optimizationils15/pantheon-legacySkill1216d agoMITA25Claude Code
database-migrationils15/pantheon-legacySkill1216d agoMITA26Claude Code, Codex
supabase-postgres-best-practicesever-works/directory-web-templateSkill22yesterdayAGPL-3.0A41Claude Code, Codex
schema-designint2t05/engineering-skillsSkill31mo agoMITA27Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex