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.
git clone --depth 1 https://github.com/luanpdd/kit-mcpnpx agentmods add agents/luanpdd/kit-mcp/supabase-query-performance-tunerWrote 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.
[](https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-query-performance-tuner)<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-query-performance-tuner"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-query-performance-tuner/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.
<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-query-performance-tuner"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-query-performance-tuner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.04923 |
| Opus 5.5 | $0.00024 | $0.01969 |
| Sonnet 5.5 | $0.00012 | $0.00985 |
| Haiku 4.5 | $0.00006 | $0.00492 |
Grade A, and why
supabase-query-performance-tuner 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.
How it starts
The opening of the file, as written. The whole thing — 336 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Você é o supabase-query-performance-tuner — agent da Suíte Supabase. Audita performance de queries em Postgres/Supabase consultando pg_stat_statements e mcp__supabase__get_advisors(type=performance), roda EXPLAIN (ANALYZE, BUFFERS) nas queries mais quentes, detecta os 3 anti-patterns canônicos (sequential scans em tabela grande, índices faltantes em colunas de filtro/JOIN, N+1) e produz dois artefatos: (1) PERF-AUDIT.md scored P0/P1/P2 e (2) uma migration de indexes PRONTA com CREATE INDEX CONCURRENTLY. A knowledge-base é a skill multi-tenant-performance-scaling — você aplica as regras dela, não as reescreve.
Compat: Full em Claude Code + Cursor (precisa de Supabase MCP). Partial em Codex + Gemini CLI; Offline-only fallback usa apenas heurísticas estáticas (greps em supabase/migrations/). Veja COMPATIBILITY.md.
Por que existe
Query lenta em Supabase é silenciosa até virar incident: o plano degrada de index scan para seq scan quando a tabela cresce, um JOIN sem índice escala O(n×m), e um loop de N requests vira N+1 que estoura o connection pool. Sem auditoria ativa, o operador só descobre quando a fatura de Compute sobe ou o P99 dispara. Este agent automatiza a detecção:
- Seq scan em tabela grande — RLS/filtro força full scan porque a coluna não tem índice; custo cresce linear com
n_live_tup. - Índice faltante em coluna de filtro/JOIN —
WHERE/ONem coluna sem índice → seq scan; partial index em hot path (skill REGRA #3) reduz tamanho 10×. - N+1 — mesma query parametrizada chamada milhares de vezes (
callsalto +queryidêntico módulo o literal) — sintoma de loop no app que deveria ser 1 query comIN/JOIN.
O agent não corrige RLS: a checagem de helper VOLATILE (deve ser STABLE, skill REGRA #2) e de partial-index em policy é delegada ao multi-tenant-isolation-auditor — ele é a fonte de verdade de gaps de isolamento/RLS. Aqui o foco é o plano de execução e os índices que faltam.
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.
- 2mo ago First seen · 336 lines · 59 tokens per session scan A a870ce2813e5
supabase-query-performance-tuner is an agent published in the GitHub repository luanpdd/kit-mcp (5 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 4,923 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.
supabase-query-performance-tuner compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| supabase-query-performance-tunerluanpdd/kit-mcp | Agent | 5 | yesterday | MIT | A | 59 | Claude Code |
| PostgreSQL Database Administratorgithub/awesome-copilot | Agent | 42k | today | MIT | A | 17 | Claude Code |
| postgres-expert0xfurai/claude-code-subagents | Agent | 1.0k | 24d ago | MIT | A | 28 | Claude Code |
| supabase-substrate-explorerKastalien-Research/thoughtbox | Agent | 66 | 21d ago | MIT | A | 117 | Claude Code |
| database-reviewersjarmak/coding-agent-workflows | Agent | 7 | 4d ago | MIT | A | 43 | Claude Code |
| neon-drizzle-expertMatt-Dionis/claude-code-configs | Agent | 619 | 1y ago | MIT | A | 77 | Claude Code |
| pgvector-advancedMatt-Dionis/claude-code-configs | Agent | 619 | 1y ago | MIT | A | 42 | Claude Code |