capturar-payloads

capturar-payloads is a command for Claude Code from luanpdd/kit-mcp. It costs 48 tokens per session (2,196 once invoked), scanned A, original, MIT.

A command that temporarily instruments a Supabase Edge Function to capture real production request payloads, removes personal information, and turns the results into test fixtures.

In plain words
What is it for?
Use it to instrument an Edge Function, collect payloads for a chosen number of days, drain the captured data, and feed the fixtures into tests.
Why use it?
Synthetic test inputs may miss the cases that occur in production. Sanitized real payloads provide more representative inputs for characterization tests.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to instrument an Edge Function, collect payloads for a chosen number of days, drain the captured data, and feed the fixtures into tests.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/luanpdd/kit-mcp/capturar-payloads
Install

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.

Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

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 capturar-payloads

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/luanpdd/kit-mcp/capturar-payloads"><img src="https://agentmods.dev/badge/commands/luanpdd/kit-mcp/capturar-payloads.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,196 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.00048 $0.02196
Opus 5.5 $0.00019 $0.00878
Sonnet 5.5 $0.00010 $0.00439
Haiku 4.5 $0.00005 $0.00220

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

Security

Grade A, and why

capturar-payloads 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.

kit/commands/capturar-payloads.md · 194 lines

How it starts

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

Cria/Atualiza:

  • Patch na Edge Function adicionando log dedicado controlado por env CAPTURE_PAYLOADS=true
  • supabase/functions/_shared/payload-capture.ts — sanitização canônica
  • tests/characterization/<edge-fn>/fixtures/payload-NN.json — fixtures sanitizados após drenagem

Após: o user tem fixtures BASEADOS EM DISTRIBUIÇÃO REAL de produção, não em sintéticos. Cobertura comportamental cresce significativamente.

Workflow esperado:

Dia 0:  /capturar-payloads <fn> --mode=instrument
Dia 0:  Você faz deploy + setar CAPTURE_PAYLOADS=true em env
Dia 1-7: produção captura naturalmente
Dia 7:  /capturar-payloads <fn> --mode=drain
Dia 7:  Fixtures criados em tests/characterization/<fn>/fixtures/
Dia 7:  /caracterizar <fn> --fixtures-dir tests/characterization/<fn>/fixtures

Exemplos:

/capturar-payloads supabase/functions/webhook-stripe/index.ts                  # full mode 7 dias
/capturar-payloads supabase/functions/process-orders/index.ts --days 14        # janela maior
/capturar-payloads supabase/functions/process-orders/index.ts --mode=instrument  # só patch
/capturar-payloads supabase/functions/process-orders/index.ts --mode=drain      # só drenagem

Pré-requisitos:

  • Edge Function deployada em Supabase (modo drain depende de logs em prod)
  • MCP Supabase conectado para drenagem automatizada (alternativa: supabase functions logs CLI)
  • Tier full em IDEs com MCP; tier partial degrada para instrumentação only

Quando preferir este comando vs /caracterizar direto:

  • Edge Function tem alto traffic (≥ 100 req/dia) — distribuição real cobre edge cases que sintético não pega
  • Edge Function tem contrato externo crítico (webhook de Stripe/GitHub) — fidelidade absoluta requer payloads reais
  • Equipe quer baseline empírico antes de refactor — payloads reais > inputs sintéticos

1. Parsear argumentos

EDGE_FN_PATH=$(echo "$ARGUMENTS" | awk '{print $1}')
CAPTURE_DAYS=$(echo "$ARGUMENTS" | grep -oE -- '--days [0-9]+' | awk '{print $2}')
MAX_PAYLOADS=$(echo "$ARGUMENTS" | grep -oE -- '--max-payloads [0-9]+' | awk '{print $2}')
MODE=$(echo "$ARGUMENTS" | grep -oE -- '--mode[= ][^ ]+' | sed 's/--mode[= ]//')
SANITIZE_KEYS=$(echo "$ARGUMENTS" | grep -oE -- '--sanitize-keys [^ ]+' | awk '{print $2}')

[ -z "$CAPTURE_DAYS" ]  && CAPTURE_DAYS=7
[ -z "$MAX_PAYLOADS" ]  && MAX_PAYLOADS=100
[ -z "$MODE" ]          && MODE="full"

if [ -z "$EDGE_FN_PATH" ]; then
  echo "ERROR: edge_function_path obrigatório"
  echo "Uso: /capturar-payloads <path> [opções]"
  exit 1
fi

if [ ! -f "$EDGE_FN_PATH" ]; then
  echo "ERROR: arquivo não encontrado: $EDGE_FN_PATH"
  exit 1
fi

Read the full file on GitHub · 194 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. 2mo ago First seen · 194 lines · 48 tokens per session scan A e6b83b45d8a3

Subscribe to this mod's changes

capturar-payloads is a command published in the GitHub repository luanpdd/kit-mcp (5 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 2,196 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.

Related

capturar-payloads compared with commands from other repositories

capturar-payloads next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
capturar-payloadsluanpdd/kit-mcpCommand5yesterdayMITA48Claude Code
initfcakyon/claude-codex-settingsCommand1.2ktodayApache-2.0A0Claude Code
http-serviceMadAppGang/magusCommand16todayMITA27Claude Code
api-contract-reviewMozurok/fhorja.devCommand101mo agoMITA64Claude Code
buildAzure/ai-gatewayCommand51mo agoMITA0Claude Code
start-10-1minicoohei/ai-agent-campCommand3461mo agononeA2Claude Code
fastapimfmezger/ai_agent_dotfilesCommand74mo agoMITA84Claude Code, Gemini CLI