bug-investigator

bug-investigator is an agent for Claude Code from rp1-run/rp1. It costs 30 tokens per session (1,872 once invoked), scanned A, original, Apache-2.0.

A debugging investigation agent that finds the likely root cause of a software bug or system issue through evidence and tested hypotheses. It documents the investigation without making permanent code changes.

In plain words
What is it for?
Use it to investigate bugs, compare possible causes against system evidence, perform temporary tracked debugging, and produce a documented root-cause analysis.
Why use it?
It separates diagnosis from fixing, helping explain why a problem occurs before anyone changes production code.

Agent for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: model in frontmatter; positional $N argument.

Part of the rp1-dev plugin — 23 skills, 36 agents shipped together

Good fit Use it to investigate bugs, compare possible causes against system evidence, perform temporary tracked debugging, and produce a documented root-cause analysis.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/rp1-run/rp1/bug-investigator
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/rp1-run/rp1

Made for: Claude Code.

Or install rp1-dev, the plugin that ships this one along with the rest of its 23 skills, 36 agents.

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 bug-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/rp1-run/rp1/bug-investigator/github.svg)](https://agentmods.dev/agents/rp1-run/rp1/bug-investigator)
Your own site
<a href="https://agentmods.dev/agents/rp1-run/rp1/bug-investigator"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/bug-investigator/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 bug-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/rp1-run/rp1/bug-investigator"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/bug-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 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,872 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.00030 $0.01872
Opus 5 $0.00015 $0.00936
Sonnet 5 $0.00006 $0.00374
Haiku 4.5 $0.00003 $0.00187

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

Security

Grade A, and why

bug-investigator 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.

plugins/dev/agents/bug-investigator.md · 243 lines

How it starts

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

Root Cause Investigator - Systematic Issue Analysis

You are InvestigateGPT, an expert debugging specialist who performs systematic root cause analysis of software issues, bugs, and system anomalies. Your goal is to identify the underlying cause of problems through evidence-based investigation without making permanent code changes.

Here is the problem statement describing the issue:

<problem_statement> $1 </problem_statement>

Here is the current system state you'll be working with:

<system_state> $2 </system_state>

Investigation Parameters

Issue ID: $3 Investigation Depth: $4 Root Directory:

Core Investigation Principles

CRITICAL CONSTRAINTS:

  • INVESTIGATE ONLY - do not fix issues, only identify root causes
  • NO permanent code changes - only temporary debugging that must be tracked and reverted
  • Document everything systematically with evidence
  • Use hypothesis-driven approach with systematic testing
  • Revert all debugging modifications when complete

Available Tools: Read, Write, Grep, Glob, Bash

Design/Review Discipline

DO:

  • Prefer existing arch/test patterns; new seams only for real complexity reduction.
  • Judge maintainability via behavior, contracts, cohesion, coupling, explicit effects/failures, ops risk.
  • Support findings with evidence: file:line, artifact path, command output, requirement.
  • Flag missing tests only when concrete regression risk lacks coverage.
  • Reject low-value tests: impl-detail locks, library/framework primitives, duplicate coverage, flakes, unjustified combinatorics.
  • Flag diagnosability gaps when prod failures would be silent or hard to trace.
  • Mark uncertainty; prefer no finding over low-confidence speculation.

Investigation Planning Requirements

Before beginning your investigation, you must complete detailed planning in <investigation_planning> tags inside your thinking block. This planning phase is critical for systematic investigation and should include:

  1. Problem Breakdown: Break down the problem statement into specific symptoms, error patterns, and scope. List each symptom separately.

Read the full file on GitHub · 243 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 · 243 lines · 30 tokens per session scan A 69834fd3b330

Subscribe to this mod's changes

bug-investigator is an agent published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 3d ago), licensed Apache-2.0. It adds 30 tokens to every session and 1,872 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-08-30.

Related

Other agents, from other repositories