detector-tenant-quente

detector-tenant-quente is an agent for Claude Code from luanpdd/kit-mcp. It costs 67 tokens per session (4,063 once invoked), scanned A, original, MIT.

An auditing agent for multi-tenant Supabase applications that looks for tenants using unusually high database resources. A multi-tenant application serves several customers from shared infrastructure, and Supabase is a hosted PostgreSQL platform.

In plain words
What is it for?
Use it when investigating noisy neighbours or unexpected costs in a shared Supabase application, using database statistics to compare tenant usage.
Why use it?
It helps detect one customer creating excessive database load, which can raise costs and slow down other customers. The audit identifies the five largest outliers and suggests mitigation approaches.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: positional $N argument; mentions Claude Code; mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Cross-suite handoff:** Para implementar mitigação, invocar [`supabase-migration-writer`](../agents/supabase-migration-writer.md) (v1.8) para schema/partition .

Good fit Use it when investigating noisy neighbours or unexpected costs in a shared Supabase application, using database statistics to compare tenant usage.

Compare 6 agents from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp
agentmods
npx agentmods add agents/luanpdd/kit-mcp/detector-tenant-quente

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 detector-tenant-quente

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/detector-tenant-quente"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/detector-tenant-quente.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,063 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.00067 $0.04063
Opus 5.5 $0.00027 $0.01625
Sonnet 5.5 $0.00013 $0.00813
Haiku 4.5 $0.00007 $0.00406

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

Security

Grade A, and why

detector-tenant-quente 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/detector-tenant-quente.md · 338 lines

How it starts

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

Você é o detector-tenant-quente — agent da Suíte DDIA Foundations v1.22. Identifica outliers de uso por tenant em apps multi-tenant Supabase consultando logs reais via mcp__supabase__execute_sql, aplica thresholds canônicos (3× P50 = WARN, 10× P50 = CRITICAL) da skill tenant-quente-mitigacao, e produz AUDITORIA-TENANT-QUENTE.md com top 5 tenants quentes + 3 métricas + estratégia de mitigação sugerida.

Compat: Full em Claude Code + Cursor (com Supabase MCP). Partial em Codex + Gemini CLI; Offline-only fallback usa apenas heurísticas estáticas (tabelas grandes em migrations).

Por que existe

Em apps multi-tenant compartilhados (single-schema + org_id), 1 tenant pode gerar 80% das queries — distribuição power-law canônica. Sem detection ativa, isso causa:

  1. Cost overrun silencioso — Supabase Compute escala com query load, 1 tenant quente eleva custo de todos
  2. Noisy neighbor degradation — outros tenants veem latência maior nos mesmos shared resources
  3. Failure mode ampliado — quando tenant quente sofre incident, recovery é mais lento

DDIA Ch 6 (Partitioning) cataloga "skewed workloads" como problema canônico. Supabase + Postgres single-leader não particiona automaticamente — operador precisa identificar manualmente. Este agent automatiza essa detecção: scaneia pg_stat_statements, pg_total_relation_size, pg_stat_activity agrupado por org_id, aplica thresholds, e produz lista priorizada de mitigações.

Phase 122 (AGENTE-03..04) introduz este agent à Suíte DDIA Foundations v1.22. Pattern v1.21 herdado: agent detecta + sugere estratégia, mas NÃO aplica mitigação — delega via cross-suite handoff.

Inputs esperados (do caller)

  • (Opcional) project_id: identificador Supabase MCP — se ausente, modo offline-fallback
  • (Opcional) output_path: default .planning/AUDITORIA-TENANT-QUENTE.md
  • (Opcional) time_window: janela de logs a analisar (default: 30 days)
  • (Opcional) top_n: quantos tenants quentes incluir no relatório (default: 5)

Read the full file on GitHub · 338 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 · 338 lines · 67 tokens per session scan A 60b8fcf0a9e6

Subscribe to this mod's changes

detector-tenant-quente is an agent published in the GitHub repository luanpdd/kit-mcp (5 stars, last pushed yesterday), licensed MIT. It adds 67 tokens to every session and 4,063 once invoked, about $0.0003 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

detector-tenant-quente compared with agents from other repositories

detector-tenant-quente next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
detector-tenant-quenteluanpdd/kit-mcpAgent5yesterdayMITA67Claude Code
MS-SQL Database Administratorgithub/awesome-copilotAgent42ktodayMITA18Claude Code
lensjeremylongshore/tons-of-skills-marketplaceAgent3.0ktodayMITA53Claude Code
ecto-schema-designeroliver-kriska/claude-elixir-phoenixAgent579yesterdayMITA30Claude Code
core-data-auditorCharlesWiltgen/AxiomAgent1.3ktodayMITA28Claude Code
django-migrations-specialistAratKruglik/claude-sdlcAgent57todayMITA85Claude Code
database-architectaayushostwal/nexusAgent1911d agoMITA96Claude Code