supabase-migration-writer

supabase-migration-writer is an agent for Claude Code from luanpdd/kit-mcp. It costs 54 tokens per session (4,796 once invoked), scanned A, original, MIT.

An agent that writes Supabase database migration files, which are SQL files used to create or change database tables and permissions.

In plain words
What is it for?
Use it when creating or changing Supabase tables, access policies, grants, and related database structure.
Why use it?
It helps prevent migrations from missing row-level security (RLS), overly broad permissions, indexes, or the project's required file layout.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: names the AskUserQuestion tool; mentions Claude Code; mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Cross-ref canônico: [eliminating-toil](../skills/eliminating-toil/SKILL.md) (cap 5 do livro Google SRE — Eliminating Toil). Para auditoria sistemática de toil e.

Good fit Use it when creating or changing Supabase tables, access policies, grants, and related database structure.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp
agentmods
npx agentmods add agents/luanpdd/kit-mcp/supabase-migration-writer

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-migration-writer/github.svg)](https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-migration-writer)
Your own site
<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-migration-writer"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-migration-writer/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-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-migration-writer"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-migration-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,796 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 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.00054 $0.04796
Opus 5.5 $0.00022 $0.01918
Sonnet 5.5 $0.00011 $0.00959
Haiku 4.5 $0.00005 $0.00480

Measured 2mo ago against content hash 08bfb1613f6d, 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-writer 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 2mo ago.

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.

kit/agents/supabase-migration-writer.md · 388 lines

How it starts

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

Você é o migration-writer Supabase. Recebe descrição de mudança de schema (ou draft SQL via Task() upstream context — handoff cooperativo v1.23) e produz arquivo SQL no layout correto (supabase/migrations/<YYYYMMDDHHmmss>_<name>.sql ou supabase/schemas/<NN>_<name>.sql se projeto usa declarative). Sempre com GRANT + RLS habilitado, granular policies, indices, e style guide aplicado. Template v1.23 segue 5 blocos obrigatórios.

Princípio canônico v1.23: Agents externos pensam/planejam; você materializa preservando intent. Em CREATE TABLE, auto-chain cooperativo para supabase-rls-hardener antes do output final. Conflitos com intent upstream → nota de divergência explícita, nunca silenciosa.

Compat: Full em Claude Code + Cursor (com Supabase MCP); Partial em Codex + Gemini CLI; Offline-only em Windsurf/Antigravity/Copilot/Trae. Veja COMPATIBILITY.md.

Por que existe

Migrations escritas a mão facilmente esquecem RLS, usam for all em vez de granular, ou pulam o (select) wrapper em auth.uid(). Este agent garante consistência: estrutura padrão, anti-patterns prevenidos, layout canônico do CLI Supabase respeitado.

Inputs esperados (do caller)

  • change_description: descrição da mudança (ex: "criar tabela tasks", "adicionar coluna priority", "drop column legacy_field").
  • (Opcional) project_id: para validação de schema atual.
  • (Opcional) layout_hint: "declarative" / "imperative" — se omitido, detecta automaticamente.
  • (Opcional, v1.23 — handoff cooperativo) upstream_intent — quando invocado via Task() de outro agent (multi-tenant-rls-writer, audit-log-implementer, crm-pipeline-implementer, debugger, planner, etc.), recebe contexto upstream estruturado:
<upstream_intent>
Source agent: {caller_name}
Original goal: {1-2 sentence description}
Constraints / business rules: {qualquer regra de domínio relevante}
</upstream_intent>

<draft_sql>
{SQL draft do caller — pode ser parcial, pré-hardening}
</draft_sql>

<user_facing_caller>{true | false}</user_facing_caller>

Read the full file on GitHub · 388 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. 2mo ago First seen · 388 lines · 54 tokens per session scan A 08bfb1613f6d

Subscribe to this mod's changes

supabase-migration-writer is an agent published in the GitHub repository luanpdd/kit-mcp (5 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 4,796 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-09-03.

Related

supabase-migration-writer compared with agents from other repositories

supabase-migration-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
supabase-migration-writerluanpdd/kit-mcpAgent5yesterdayMITA54Claude Code
MS-SQL Database Administratorgithub/awesome-copilotAgent42ktodayMITA18Claude Code
lensjeremylongshore/tons-of-skills-marketplaceAgent3.0ktodayMITA53Claude Code
ecto-schema-designeroliver-kriska/claude-elixir-phoenixAgent579yesterdayMITA30Claude Code
core-data-auditorCharlesWiltgen/AxiomAgent1.3ktodayMITA28Claude Code
django-migrations-specialistAratKruglik/claude-sdlcAgent57todayMITA85Claude Code
database-architectaayushostwal/nexusAgent1911d agoMITA96Claude Code