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.
npx agentmods add agents/luanpdd/kit-mcp/supabase-rag-implementergit clone --depth 1 https://github.com/luanpdd/kit-mcpWrote 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.svg" alt="Measured on agentmods" 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 | $0.00052 | $0.04728 |
| Opus 5 | $0.00026 | $0.02364 |
| Sonnet 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 yesterday.
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.
- yesterday 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 (1 stars, last pushed 4d ago), licensed MIT. It adds 52 tokens to every session and 4,728 once invoked, about $0.0003 per session on Opus 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.
Other agents, from other repositories
vector-search-expert
Expert in semantic search, vector embeddings, and pgvector v0.8.0 optimization for memory retrieval. Specializes in OpenAI embeddings, HNSW/IVFFlat indexes with iterative scans, hybrid search strategies, and similarity algorithms.
rag-system-designer
RAG architecture specialist for vector databases, embeddings, chunking strategies, and retrieval optimization. Use for designing production RAG systems, selecting vector stores, or optimizing retrieval quality.
schema-architect
Use this agent when you need to design an ingestion strategy for mapping external data sources to the AutoRAG-Research PostgreSQL schema. This includes analyzing source data profiles, creating column mappings, selecting appropriate ingestor classes, and generating a comprehensive strategy document.\n\nExamples:\n\n…
db-vector-expert
Expert in vector databases (pgvector, Pinecone, Weaviate, Qdrant, FAISS) with production-ready similarity search examples, embedding strategies, and performance optimization for AI/ML applications.
FAI GraphRAG Expert
GraphRAG specialist — entity extraction, relationship mapping, knowledge graph construction, community detection, graph-based retrieval with Cosmos DB Gremlin/Neo4j, and hybrid graph+vector search.
data-manager
Data manager. Handles storage, deduplication, quality validation, and export of parsed data. Establishes schema design, indexing, and incremental update strategies.