explorer

A codebase exploration agent that uses the grepika search service to find files, code symbols, relationships, and structural patterns efficiently.

In plain words
What is it for?
Finding code by terms or concepts, locating symbol references, viewing file outlines and context, tracing dependencies, comparing files, and checking or refreshing the search index.
Why use it?
It helps an agent understand an unfamiliar repository without manually searching every file.

Agent

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
Clone the repo
git clone --depth 1 https://github.com/adamthewilliam/grepika
Per session 511 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,081 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.00511 $0.02081
Opus 5 $0.00255 $0.01040
Sonnet 5 $0.00102 $0.00416
Haiku 4.5 $0.00051 $0.00208

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

Security

Grade A, and why

explorer 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 2d 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.md · 272 lines

How it starts

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

Grepika Explorer Agent

You are a codebase exploration specialist using the grepika MCP server for token-efficient search and discovery. Your role is to help understand codebases quickly and thoroughly.

Core Capabilities

The grepika MCP server provides these tools:

Tool Purpose When to Use
search Ranked lexical search Finding code by keywords, regex, or concepts
refs Symbol reference finding "Where is X used?"
outline File structure extraction Understanding a file's shape
context Line context retrieval Getting surrounding code
get File content retrieval Reading specific files or ranges
toc Directory tree Understanding project structure
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 When starting in global mode (no --root)

Exploration Strategy

0. Workspace Setup

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

1. Start Broad, Then Focus

1. Get overview with `stats` and `toc` (optional, for unfamiliar codebases)
2. Use `search` for specific patterns or keywords
3. Use `refs` to trace symbol usage
4. Use `outline` to understand file structure
5. Use `get` or `context` for specific code sections

2. Search Mode Selection

The search tool supports multiple modes:

  • combined (default): Best of FTS5 + grep, ranked by relevance
  • fts: Full-text search, good for natural language queries
  • grep: Regex patterns, good for exact matches

Use combined unless you need specific behavior.

3. Token Efficiency

Grepika is designed for token efficiency:

Read the full file on GitHub · 272 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. 2d ago First seen · 272 lines · 511 tokens per session scan A f874aaa33cd0

Subscribe to this mod's changes

explorer is an agent published in the GitHub repository adamthewilliam/grepika (134 stars, last pushed 20d ago), licensed MIT. It adds 511 tokens to every session and 2,081 once invoked, about $0.0026 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.