investigate

investigate is a command for Claude Code from evangelosmeklis/thufir. It costs 11 tokens per session (1,940 once invoked), scanned A, original, MIT.

An interactive command that guides a root-cause analysis, which is a structured investigation into why a production incident happened. It supports incidents discovered through Prometheus alerts, GitHub or GitLab issues, or manual reports.

In plain words
What is it for?
Use it to record the incident source, symptoms, timing, and current status, then continue with the appropriate investigation path.
Why use it?
It turns an open-ended incident investigation into a sequence of questions and routes issue-based cases to more specific analysis commands.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the thufir plugin — 4 skills, 4 commands, 3 MCP servers shipped together

Good fit Use it to record the incident source, symptoms, timing, and current status, then continue with the appropriate investigation path.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/evangelosmeklis/thufir/investigate
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/evangelosmeklis/thufir

Made for: Claude Code.

Or install thufir, the plugin that ships this one along with the rest of its 4 skills, 4 commands, 3 MCP servers.

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 investigate

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/evangelosmeklis/thufir/investigate"><img src="https://agentmods.dev/badge/commands/evangelosmeklis/thufir/investigate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 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,940 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.00011 $0.01940
Opus 5 $0.00005 $0.00970
Sonnet 5 $0.00002 $0.00388
Haiku 4.5 $0.00001 $0.00194

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

Security

Grade A, and why

investigate 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 10d 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.

commands/investigate.md · 312 lines

How it starts

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

Interactive RCA Investigation Command

Purpose

Guide users through a comprehensive root cause analysis investigation via an interactive wizard. This command is flexible and works for any type of production incident, whether from Prometheus, GitHub, GitLab, or manual investigation.

Instructions for Claude

When this command is invoked, guide the user through a systematic RCA investigation:

Step 1: Gather Initial Information

Use AskUserQuestion to collect incident details:

Question 1: Incident Source Ask: "How did you learn about this incident?" Options:

  • "Prometheus alert"
  • "GitHub issue"
  • "GitLab issue"
  • "Manual detection (user report, logs, etc.)"

Based on answer, branch:

  • If Prometheus: Delegate to /rca:analyze-prometheus command
  • If GitHub: Delegate to /rca:analyze-github command
  • If GitLab: Delegate to /rca:analyze-gitlab command
  • If Manual: Continue with questions below

Question 2: Basic Incident Info (for manual investigations) Ask user to provide:

  • "What is the problem? (Brief description)"
  • "When did it start? (Timestamp or approximate time)"
  • "Is it still occurring?"

Question 3: Symptoms Ask: "What symptoms are you seeing?" Allow multi-select or free text:

  • Error messages
  • Performance degradation
  • Service unavailability
  • Data inconsistency
  • Other (specify)

Question 4: Impact Ask: "How severe is the impact?" Options:

  • "Critical - Major user impact"
  • "High - Significant user impact"
  • "Medium - Some users affected"
  • "Low - Minor or no user impact"

Step 2: Collect Error Details

Ask user for specific error information:

Error Messages:

  • "Please paste any error messages, stack traces, or relevant logs"
  • Parse and extract:
    • Error names
    • Stack traces (file paths and line numbers)
    • Error codes
    • Timestamps

Affected Components:

  • "Which service, feature, or component is affected?"
  • "Which API endpoints or pages are failing?"

Scope:

  • "Is this affecting all users or specific segments?"
  • "Are specific geographic regions affected?"

Read the full file on GitHub · 312 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. 10d ago First seen · 312 lines · 11 tokens per session scan A 948d9164c796

Subscribe to this mod's changes

investigate is a command published in the GitHub repository evangelosmeklis/thufir (7 stars, last pushed 8mo ago), licensed MIT. It adds 11 tokens to every session and 1,940 once invoked, about $0.0001 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-08-31.