supabase-index-creator

Create missing foreign key coverage indexes in Supabase via MCP.

Updated Oct 16, 2025
One-click install
npx skills add https://github.com/sanchezx1/v0-fullcolor-cotizador --skill supabase-index-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-index-creator
Source: https://github.com/sanchezx1/v0-fullcolor-cotizador/tree/main/.claude/skills/supabase-index-creator
Command: npx skills add https://github.com/sanchezx1/v0-fullcolor-cotizador --skill supabase-index-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Crea índices de cobertura para foreign keys sin índice, mejorando el rendimiento de consultas y joins en Supabase.

Core Features & Use Cases

  • Index discovery: Verifica la ausencia de índices de cobertura para FK mediante MCP Supabase.
  • Migration generation: Crea una migración en database/migrations/YYYYMMDD_add_<tabla>_<columna>_index.sql.
  • Verification: Aplica migración y verifica con el advisor de Supabase.

Quick Start

Verifica el warning de FK sin índice y genera una migración como 20250101_add_<tabla>_<columna>_index.sql para aplicar con MCP Supabase. Confirma que el advisor ya no emite warnings.

Frequently Asked Questions about supabase-index-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify missing foreign key indexes in Supabase?

Missing foreign key indexes appear as warnings in the Supabase advisor and degrade JOIN performance. Use MCP Supabase to verify which FK columns lack coverage indexes, then generate migrations to add them.

Why do foreign keys need indexes in PostgreSQL?

Foreign key indexes improve JOIN and query performance by enabling the database to quickly locate related rows. Without them, Supabase queries involving joins execute slower and consume more resources.

How do I create and apply a migration for missing FK indexes?

Generate a migration file named database/migrations/YYYYMMDD_add_<table>_<column>_index.sql with the CREATE INDEX statement, then apply it via MCP Supabase and verify with the Supabase advisor that warnings clear.

Can I automate FK index creation across multiple tables in Supabase?

Yes. Scan all foreign keys with MCP Supabase to find uncovered ones, generate individual migrations for each, apply them in sequence, and verify performance improvements through the Supabase advisor.

What's the best way to verify FK indexes improved query performance?

After applying index migrations, re-run the Supabase advisor to confirm FK warnings are gone and monitor actual query execution times on affected JOINs to measure performance gains.