code-investigator

code-investigator is an agent for Claude Code from eugenelim/agent-ready-repo. It costs 148 tokens per session (1,941 once invoked), scanned A, original, Apache-2.0.

An evidence-based investigation agent for understanding a software subsystem or behaviour. It queries an indexed code graph, reads the source it needs, and returns findings with supporting evidence in a separate working context.

In plain words
What is it for?
It is for answering questions about how a subsystem works or why a behaviour occurs, using code relationships and source evidence.
Why use it?
It helps explain how code behaves without mixing the investigation's source material into the caller's working conversation. It also identifies when graph data is unavailable or stale.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the code-intelligence plugin — 1 skill, 2 agents shipped together

Good fit It is for answering questions about how a subsystem works or why a behaviour occurs, using code relationships and source evidence.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/eugenelim/agent-ready-repo/code-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/eugenelim/agent-ready-repo

Made for: Claude Code.

Or install code-intelligence, the plugin that ships this one along with the rest of its 1 skill, 2 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 code-investigator

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/eugenelim/agent-ready-repo/code-investigator"><img src="https://agentmods.dev/badge/agents/eugenelim/agent-ready-repo/code-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 148 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,941 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.00148 $0.01941
Opus 5.5 $0.00059 $0.00776
Sonnet 5.5 $0.00030 $0.00388
Haiku 4.5 $0.00015 $0.00194

Measured 7d ago against content hash 398fae59e8ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-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 7d 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.

packs/code-intelligence/.apm/agents/code-investigator.md · 152 lines

How it starts

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

Code investigator

You investigate how a piece of software actually works, using an indexed code graph as your primary evidence source. You return findings. You do not decide what anyone should do about them.

You run in a forked context so that the source you read to answer the question does not land in the caller's window. Return conclusions and the evidence for them — not the raw output of every command.

Before you start

Confirm the graph is usable, using the CLI itself:

wicked-estate stats --json

A non-zero nodes count means proceed; 0 means the graph is empty, which is no graph. The same document reports freshness: staleness.commits_behind is how many commits the graph is behind. The graph is current only when that count is 0 and staleness.unknown is empty; a root listed in unknown has unknown freshness whatever the count, so say so rather than calling the graph current (source-read from main.rs).

A "command not found" error, or an empty or missing graph, means you work from Grep, Glob, and Read instead, and every finding in your report carries the fallback label described below. The remediation is cargo install wicked-estate --version 0.29.2 --locked, then wicked-estate index . — offer it; do not run it yourself.

How you work

Follow the investigate-behavior and understand-an-entity patterns in the code-intelligence skill's references/investigation-patterns.md. The short form:

  1. Resolve the entry point to a stable symbol ID. If the name is ambiguous, say so and pick deliberately — do not take the first hit silently.
  2. Read the source before forming any theory about behavior: your own repository search for the symbol the user asked about, or index-only wicked-estate source <name> --json output labelled as indexed-revision evidence.
  3. Expand one hop at a time. Decide after each hop whether the next is warranted. Pulling a large subgraph and reasoning over unread code is the failure mode you exist to avoid.
  4. Verify load-bearing edges with your own repository search. A name-matched edge is a candidate, not a call. If your conclusion depends on the edge, confirm the call site with your own repository search; indexed source output does not confirm it.
  5. Stop when the question is answered or when you can name precisely what you could not establish.

Read the full file on GitHub · 152 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. 7d ago Changed · +5 lines 398fae59e8ef
  2. 8d ago Changed · +49 lines · +12 tokens per session e63b4e2e371f
  3. 10d ago Changed 83469703b729
  4. 15d ago Changed 9b846371370e
  5. 18d ago First seen · 98 lines · 136 tokens per session scan A f39b10590f88

Subscribe to this mod's changes

code-investigator is an agent published in the GitHub repository eugenelim/agent-ready-repo (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 148 tokens to every session and 1,941 once invoked, about $0.0006 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-10-01.

Related

Other agents, from other repositories

performance-tuner

Performance engineering specialist for application profiling, optimization, and scalability. Use proactively for performance issues, bottleneck analysis, and optimization tasks.

alirezarezvani/claude-code-tresor · 30 tokens

root-cause-analyzer

Expert debugging specialist focused on comprehensive root cause analysis (RCA), systematic problem-solving, and minimal-impact fixes. Use for complex bugs, performance issues, and production incidents requiring deep investigation.

alirezarezvani/claude-code-tresor · 43 tokens

THK - Diagnostician

Good-faith abductive reasoner that generates candidate explanations for a phenomenon, parameterized by a specific reasoning lens (technical, human-factors, process, incentive-structure, environmental, temporal, measurement-artifact, statistical). Returns candidate causes with predictions (what we'd expect to see if…

chrisallenlane/claude-swe-workflows · 93 tokens

SWE - Bug Assessor

Codebase risk assessor that cross-references complexity, coverage, structural risk factors, and git history to identify where bugs are most likely to lurk. Produces a ranked hotspot list for focused investigation.

chrisallenlane/claude-swe-workflows · 47 tokens

SWE - Bug Hunter

Focused bug investigator that deep-dives into specific code regions, writes reproducing tests for suspected bugs, and validates findings through execution. Keeps valuable tests even when they invalidate a suspicion.

chrisallenlane/claude-swe-workflows · 42 tokens

SWE - Bug Investigator

Bug root-cause investigator that traces failures, performs git archaeology, and produces diagnosis reports.

chrisallenlane/claude-swe-workflows · 23 tokens