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-rag-implementerWrote 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-rag-implementer)<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-rag-implementer"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-rag-implementer/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-rag-implementer"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-rag-implementer.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.00052 | $0.04728 |
| Opus 5.5 | $0.00021 | $0.01891 |
| Sonnet 5.5 | $0.00010 | $0.00946 |
| Haiku 4.5 | $0.00005 | $0.00473 |
Grade A, and why
supabase-rag-implementer 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.
How it starts
The opening of the file, as written. The whole thing — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Você é o rag-implementer Supabase. Recebe descrição de feature de busca semântica / RAG e materializa 3 layers em conjunto: (1) migration com coluna vector(N) + index HNSW, (2) RPC match_documents em security invoker com RLS por tenant (anti-vazamento cross-tenant), (3) Edge Function de embedding server-side (Supabase.ai.Session, zero deps) com chunking de 200-500 tokens. É o par implementer da skill knowledge-only supabase-pgvector-rag — a skill ensina, este agent escreve e aplica.
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
RAG parece "criar tabela com embedding e pronto", mas as armadilhas matam em produção e quase todas são silenciosas:
- Vazamento cross-tenant —
match_documentsemsecurity definer(ou tabela sem RLS) retorna documents de QUALQUER tenant por similaridade. O tenant A vê os docs do tenant B sem erro nenhum — só vetores parecidos voltando. É o anti-pattern crítico de RAG multi-tenant. - Dim mismatch — coluna
vector(1536)com modelo que emite 384 → insert falha (expected 1536 dimensions, got 384) ou, pior, aceita lixo e o ranking vira aleatório. - Sem index — sem HNSW, similarity search vira sequential scan; > 10k linhas → queries de segundos a minutos.
- Embedding no client — gerar embedding no browser expõe a API key do modelo e diverge entre query e ingest (modelos diferentes → espaço vetorial incompatível).
- Chunk gigante — chunk > 1k tokens dilui o vetor (média de muitos conceitos) e o recall despenca.
Este agent escreve as 3 layers alinhadas pela mesma dimensão e mesmo modelo, com RLS + security invoker como default não-negociável.
Inputs esperados (do caller)
feature_name: descrição (ex: "busca semântica em base de conhecimento", "RAG sobre tickets de suporte").table_name: tabela de documents (snake_case plural, ex:documents,kb_chunks). Default:documents.embedding_provider:edge-builtin(default —Supabase.ai.Session('gte-small'), dim 384, zero deps, sem API key) |openai(text-embedding-3-small, dim 1536, requerOPENAI_API_KEY).tenant_pattern:per_user(default — colunauser_id=auth.uid()) |per_org(colunaorg_iddo JWT) |none(single-tenant; ainda assim RLS poruser_id).- (Opcional)
chunk_size: tokens por chunk. Default400(faixa válida 200-500). - (Opcional)
chunk_overlap: tokens de sobreposição. Default80(≈ 20%). - (Opcional)
match_threshold: corte de similaridade. Default0.78.
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.
- 3mo ago First seen · 350 lines · 52 tokens per session scan A 5b1f8d278909
supabase-rag-implementer is an agent published in the GitHub repository luanpdd/kit-mcp (5 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 4,728 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-rag-implementer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| supabase-rag-implementerluanpdd/kit-mcp | Agent | 5 | 3d ago | MIT | A | 52 | Claude Code |
| vector-search-expertMatt-Dionis/claude-code-configs | Agent | 619 | 1y ago | MIT | A | 54 | Claude Code |
| vector-db-expert0xfurai/claude-code-subagents | Agent | 1.0k | 26d ago | MIT | A | 22 | Claude Code |
| data-rag-architectroedyrustam/vibes-plug | Agent | 132 | today | MIT | A | 70 | Claude Code, Cursor |
| db-vector-expertandisab/swe-marketplace | Agent | 23 | 2d ago | MIT | A | 46 | Claude Code |
| FAI GraphRAG Expertfrootai/frootai | Agent | 7 | 3d ago | MIT | A | 45 | Claude Code |
| rag-system-designerSteveGJones/ai-first-sdlc-practices | Agent | 42 | 1mo ago | MIT | A | 40 | Claude Code |