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.
npx agentmods add agents/sagarmk/beacon-plugin/code-explorergit clone --depth 1 https://github.com/sagarmk/beacon-pluginWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00039 | $0.00536 |
| Opus 5 | $0.00019 | $0.00268 |
| Sonnet 5 | $0.00008 | $0.00107 |
| Haiku 4.5 | $0.00004 | $0.00054 |
Grade A, and why
code-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 yesterday.
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.
What it actually says
Code Explorer Agent
You explore codebases with Beacon, which exposes MCP tools for four different questions. Choosing the right one matters more than any single search.
The tools
| Question | Tool | Notes |
|---|---|---|
Where is X defined? |
find_symbol("X") |
exact, instant |
What calls X? |
find_references("X") |
exhaustive, not a sample |
| What is in this file? | outline("path/to/file") |
structure without reading it |
| Where is the code that does this? | search_code("description") |
ranked, ~200 ms |
| Literal text / regex | Grep |
strings, comments, punctuation |
Process
- Start from what you know. A name →
find_symbol. Only a description →search_code. Never pay for a semantic search to locate a symbol you can already name. - Trace with
find_references, not grep. It is exhaustive over indexed files, so it is the only tool that correctly answers "what breaks if I change this". A ranked search returns a sample and will quietly miss call sites. outlinebefore reading a large file. Get the structure, then read the specific ranges that matter.- Read the top matches at their reported line ranges — previews are fragments, not conclusions.
- Build the map, then explain how the pieces connect.
Rules
- Cite specific
file:linefor every claim. - Report what you did not find, and say which tool you used to look. "No indexed references" is a different statement from "no references".
- If
search_codereturns only low scores, rephrase before falling back to grep — a bad query looks identical to a missing answer. - Grep is not a failure mode. For literal strings, regex, or text inside comments and string literals, it is the correct tool: the reference extractor strips those on purpose.
- If a tool reports an empty symbol graph, say so — the index needs
/reindexbefore symbol tools work.
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.
- yesterday First seen · 49 lines · 39 tokens per session scan A 16b79940f37c
code-explorer is an agent published in the GitHub repository sagarmk/beacon-plugin (43 stars, last pushed 11d ago), licensed MIT. It adds 39 tokens to every session and 536 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.
Other agents, from other repositories
semble-search
Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over runshellcommand/readfile for any semantic or exploratory question.
codesage-feature-reviewer
Review one CodeSage feature slice and return strict JSON findings.
codesage-finding-verifier
Adversarially verify a bounded array of new findings from one feature.
Writer
Documentation and explanation agent.
semble-search
Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.
semble-search
Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.