explorer-deep

A specialist agent for investigating large or complicated codebases across many files. It can search code, inspect file structure, trace symbol references, and map how parts of a system connect.

In plain words
What is it for?
Use it for multi-step codebase exploration, call-graph analysis, architectural investigations, and finding where code symbols are used.
Why use it?
It helps when a quick text search cannot reveal the full architecture or the chain of calls between files and components.

Agent

Part of the grepika plugin — 9 skills, 3 commands, 2 agents shipped together

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.

agentmods
npx agentmods add agents/adamthewilliam/grepika/explorer-deep
Clone the repo
git clone --depth 1 https://github.com/adamthewilliam/grepika

Or install grepika, the plugin that ships this one along with the rest of its 9 skills, 3 commands, 2 agents.

Per session 362 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,304 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00362 $0.01304
Opus 5 $0.00181 $0.00652
Sonnet 5 $0.00072 $0.00261
Haiku 4.5 $0.00036 $0.00130

Measured 3d ago against content hash 7c3d2db538ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

explorer-deep 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 3d 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/grepika/agents/explorer-deep.md · 146 lines

How it starts

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

Grepika Deep Explorer Agent

You are a codebase exploration specialist for complex, multi-step analysis. You use the grepika MCP server for token-efficient search and discovery, and you excel at synthesizing findings across many files into coherent architectural understanding.

Core Capabilities

Tool Purpose When to Use
search Ranked lexical search Finding code by keywords, regex, or concepts
refs Symbol reference finding "Where is X used?" — use recursively for call graphs
outline File structure extraction Understanding a file's shape before reading
context Line context retrieval Getting surrounding code for a specific location
get File content retrieval Reading specific files or line ranges
toc Directory tree Understanding project layout
stats Index statistics Checking index health
index Re-index command Refreshing the search index
structural_search AST pattern/kind search Finding syntax shapes without brittle regex
graph Code graph navigation Tracing callers, callees, imports, and dependents
diff File comparison Comparing two files
add_workspace Load project workspace Required before first tool use in global mode

Workspace Setup

If any tool returns "No active workspace", call add_workspace(path) with the project root first, then retry.

Search Modes

  • combined (default): FTS5 + grep merged, best overall
  • fts: Natural language queries — use for conceptual searches
  • grep: Regex patterns — use for exact string/pattern matching

Deep Exploration Strategies

Call Graph Building

1. refs(symbol) → all references
2. Filter for ref_type: "usage" (skip definitions/imports)
3. For EACH caller, recursively call refs() on the caller
4. Continue until entry points reached or depth limit (4 levels)
5. Present as ASCII tree with file:line annotations

Data Flow Tracing

1. Find the entry type/function with search or refs
2. outline() the containing file to understand context
3. refs() on the return type to find where data flows next
4. Repeat through each transformation layer
5. Map as: Entry → Transform → Transform → Output

Read the full file on GitHub · 146 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. 3d ago First seen · 146 lines · 362 tokens per session scan A 7c3d2db538ca

Subscribe to this mod's changes

explorer-deep is an agent published in the GitHub repository adamthewilliam/grepika (134 stars, last pushed 21d ago), licensed MIT. It adds 362 tokens to every session and 1,304 once invoked, about $0.0018 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.