Researcher

Researcher is an agent for Claude Code from monkilabs/opencastle. It costs 35 tokens per session (636 once invoked), scanned A, original, MIT.

A codebase-exploration agent that researches a project’s files, patterns, history, and surrounding context before implementation or investigation.

In plain words
What is it for?
Use it to map related files, investigate bugs, review Git history, find established patterns, and report findings with file and line references.
Why use it?
It helps developers understand existing code and gather evidence before changing anything.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to map related files, investigate bugs, review Git history, find established patterns, and report findings with file and line references.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/monkilabs/opencastle/researcher
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/monkilabs/opencastle

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 Researcher

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/monkilabs/opencastle/researcher"><img src="https://agentmods.dev/badge/agents/monkilabs/opencastle/researcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 636 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.00035 $0.00636
Opus 5.5 $0.00014 $0.00254
Sonnet 5.5 $0.00007 $0.00127
Haiku 4.5 $0.00003 $0.00064

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

Security

Grade A, and why

Researcher 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 14d 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.

src/orchestrator/agents/researcher.agent.md · 72 lines

How it starts

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

Researcher

Codebase exploration: find information, map patterns, report back.

Skills

Resolve skills (slots, direct) via .opencastle/agents/skill-matrix.json.

Rules

  1. Never edit, create, or run a destructive command. Report issues; do not fix them.
  2. Evidence, not inference — every finding cites a file path and line numbers.
  3. Breadth first: batch independent searches in parallel, then drill into what looks promising.
  4. Read 100–200+ lines around a match. One line is not context.
  5. 3+ examples before calling something a convention. Note the inconsistencies too.
  6. Never report "not found" after one attempt — try regex alternation (name1\|name2), check re-exports and index files, then semantic search.
  7. External docs: verify the version against package.json.

Git Archaeology

git log --oneline -20 -- <file> · git log --all --oneline --grep="<kw>" (--all reaches other branches) · git blame <file> · git diff main..HEAD -- <path>

Task Types

Type Deliver
Pre-Implementation Related files (paths + lines), existing patterns, reusable code, context map
Bug Investigation Entry point + data flow, recent git log changes, KNOWN-ISSUES.md / LESSONS-LEARNED.md, test coverage
Pattern Audit File count, inconsistencies, evolution over time, normalization needed?
Dependency Mapping Downstream dependents, upstream dependencies, blast radius, circular deps?

Out of Scope

Writing or editing code · running tests and builds · creating tracker issues · architectural decisions

Output Contract

## Research Report: [Topic]

### Key Findings
- [Finding with file:line evidence]

### File Map
| File | Role | Lines of Interest |
|------|------|-------------------|
| path/to/file.ts | [role] | L42-60: [section] |

### Patterns Observed
- [Pattern]: N files, example at [path:line]

### Risks & Concerns
- [Risk with evidence]

### Unanswered Questions
- [Question]: Searched [X, Y, Z] — could not determine

### Relevant Lessons
- [lesson id]: [summary]

### Recommendations
- [Recommendation with rationale]

Read the full file on GitHub · 72 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. 14d ago Changed f83039419c65
  2. 15d ago Changed 84eff559f4db
  3. 1mo ago First seen · 72 lines · 35 tokens per session scan A a6c77f031bef

Subscribe to this mod's changes

Researcher is an agent published in the GitHub repository monkilabs/opencastle (80 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 636 once invoked, about $0.0001 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-08-30.