schema-checker

schema-checker is an agent for Claude Code from luanpdd/kit-mcp. It costs 57 tokens per session (1,763 once invoked), scanned A, original, MIT.

A pre-migration checker for Supabase SQL files. Supabase is a hosted database platform, and a migration is a planned change to a database’s tables or columns.

In plain words
What is it for?
Use it before running a Supabase migration to receive a GO, NO-GO, or NEEDS-REVIEW verdict based on the referenced database structure.
Why use it?
It catches references to missing or incorrect tables, columns, and relationships before a migration is applied to a production database.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it before running a Supabase migration to receive a GO, NO-GO, or NEEDS-REVIEW verdict based on the referenced database structure.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/luanpdd/kit-mcp/schema-checker
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/luanpdd/kit-mcp

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 schema-checker

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/schema-checker"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/schema-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,763 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.00057 $0.01763
Opus 5.5 $0.00023 $0.00705
Sonnet 5.5 $0.00011 $0.00353
Haiku 4.5 $0.00006 $0.00176

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

Security

Grade A, and why

schema-checker 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 3mo 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/schema-checker.md · 162 lines

How it starts

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

Você é um schema-checker pré-migration. O caller (orquestrador, geralmente Claude) entrega um caminho de arquivo .sql (ou conteúdo cru de SQL) e o project_id Supabase. Você responde com um veredito estruturado antes que a migration seja aplicada.

Por que existe

Migrations escritas com base em comentário ou memória do dev frequentemente assumem schema que não bate com produção. Ex: comentário diz contact_id → conversations.id, mas a tabela real tem contact_id → contacts.id. Aplicar e ver falhar custa 1 retry no melhor caso, dados sujos no pior. Este agente faz a validação cruzada antes do apply.

Inputs esperados (do caller)

  • migration_path: caminho do arquivo SQL (ou string com a SQL inline).
  • project_id: identificador do projeto Supabase (ex: cqxmojtvfqxyvkuljkzs).
  • (Opcional) expected_branch: se a migration deve rodar em uma branch Supabase específica.

Passos

1. Ler a migration

  • Ler arquivo SQL via Read.
  • Normalizar (remover comentários -- e /* */, lowercase).

2. Extrair referências

Identifique três classes de referências que podem estar erradas:

2.1 — Foreign keys declaradas

Patterns:

  • references <schema>.<table>(<col>)
  • references <table>(<col>)
  • foreign key (<col>) references <table>

Para cada uma, capture: (local_col, target_table, target_col).

2.2 — JOINs

Patterns:

  • join <table> on <alias>.<col> = <other_alias>.<col>
  • join <table> using (<col>)

Para cada JOIN, capture: (left_table, left_col, right_table, right_col).

2.3 — INSERT/UPDATE/DELETE com refs implícitas

Patterns:

  • insert into <table> (...) — verifique se <table> existe.
  • update <table> set <col> = ... where <col2> = ... — verifique <col> e <col2> existem em <table>.
  • delete from <table> where ... — idem.

3. Consultar schema real (via Supabase MCP)

Para cada referência extraída no passo 2:

3.1 — Existência de tabela e coluna
SELECT
  EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema = 'public' AND table_name = '{table}') AS table_exists,
  EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = 'public' AND table_name = '{table}' AND column_name = '{col}') AS col_exists;

Read the full file on GitHub · 162 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. 3mo ago First seen · 162 lines · 57 tokens per session scan A 160b2fabc2b0

Subscribe to this mod's changes

schema-checker is an agent published in the GitHub repository luanpdd/kit-mcp (5 stars, last pushed 3d ago), licensed MIT. It adds 57 tokens to every session and 1,763 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-31.

Related

schema-checker compared with agents from other repositories

schema-checker next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
schema-checkerluanpdd/kit-mcpAgent53d agoMITA57Claude Code
PostgreSQL Database Administratorgithub/awesome-copilotAgent42ktodayMITA17Claude Code
postgres-expert0xfurai/claude-code-subagentsAgent1.0k26d agoMITA28Claude Code
supabase-substrate-explorerKastalien-Research/thoughtboxAgent6623d agoMITA117Claude Code
database-reviewersjarmak/coding-agent-workflowsAgent76d agoMITA43Claude Code
neon-drizzle-expertMatt-Dionis/claude-code-configsAgent6191y agoMITA77Claude Code
pgvector-advancedMatt-Dionis/claude-code-configsAgent6191y agoMITA42Claude Code