investigar-producao

investigar-producao is a command for Claude Code from luanpdd/kit-mcp. It costs 43 tokens per session (1,555 once invoked), scanned A, original, MIT.

A guided workflow for investigating a real production incident, meaning a problem affecting a live application, while recording tested and rejected explanations.

In plain words
What is it for?
Use it to investigate symptoms such as elevated error rates, search a selected time window, document the root cause, and save follow-up actions.
Why use it?
It preserves the investigation between sessions instead of relying on memory or losing the reasoning after a context reset.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

Good fit Use it to investigate symptoms such as elevated error rates, search a selected time window, document the root cause, and save follow-up actions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/luanpdd/kit-mcp/investigar-producao
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 investigar-producao

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/luanpdd/kit-mcp/investigar-producao"><img src="https://agentmods.dev/badge/commands/luanpdd/kit-mcp/investigar-producao.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,555 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.00043 $0.01555
Opus 5 $0.00022 $0.00777
Sonnet 5 $0.00009 $0.00311
Haiku 4.5 $0.00004 $0.00155

Measured 6d ago against content hash 25da1f5f95e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

investigar-producao 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 6d 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/investigar-producao.md · 163 lines

How it starts

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

Cria/Atualiza:

  • .planning/investigations/<investigation_id>.md — trilha de hipóteses validadas/refutadas

Após: root cause documentado + action items + estado salvo para próxima sessão.

Flags:

  • --id <investigation_id> — retoma investigação existente (pula criação de novo arquivo)
  • --time-window <Nh|Nd> — janela de busca (default: 1h)

Exemplos:

/investigar-producao "checkout SLO burn rate = 8 às 14:32"
/investigar-producao --id incident-2026-05-06-1432-checkout-burn  # retomar
/investigar-producao "tenant acme reportou erros 5xx" --time-window 6h

Pré-requisito (Full mode): projeto Supabase configurado, mcp__supabase__* disponível.

1. Parsear argumentos

INV_ID=$(echo "$ARGUMENTS" | grep -oE -- '--id [^ ]+' | awk '{print $2}')
TIME_WINDOW=$(echo "$ARGUMENTS" | grep -oE -- '--time-window [^ ]+' | awk '{print $2}')
SYMPTOM=$(echo "$ARGUMENTS" | sed -E 's/--(id|time-window) [^ ]+//g' | xargs)

[ -z "$TIME_WINDOW" ] && TIME_WINDOW="1h"

2. Validar pré-requisitos

mkdir -p .planning/investigations

# PT-BR: se --id fornecido, validar arquivo existe
if [ -n "$INV_ID" ]; then
  INV_FILE=".planning/investigations/${INV_ID}.md"
  if [ ! -f "$INV_FILE" ]; then
    echo "Investigation $INV_ID não existe. Liste com: ls .planning/investigations/"
    exit 1
  fi
  echo "Retomando investigação: $INV_ID"
fi

# PT-BR: se SYMPTOM vazio + sem --id → erro
if [ -z "$SYMPTOM" ] && [ -z "$INV_ID" ]; then
  echo "Erro: forneça sintoma OU --id <investigation_id>"
  echo "Exemplos:"
  echo "  /investigar-producao \"checkout SLO burn rate = 8\""
  echo "  /investigar-producao --id incident-2026-05-06-1432-foo"
  exit 1
fi

Read the full file on GitHub · 163 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. 6d ago First seen · 163 lines · 43 tokens per session scan A 25da1f5f95e1

Subscribe to this mod's changes

investigar-producao is a command published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed 3d ago), licensed MIT. It adds 43 tokens to every session and 1,555 once invoked, about $0.0002 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.