Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add dsifry/metaswarm/plugin install metaswarmWrote 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.
[](https://agentmods.dev/agents/dsifry/metaswarm/codebase-researcher)<a href="https://agentmods.dev/agents/dsifry/metaswarm/codebase-researcher"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/codebase-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.
<a href="https://agentmods.dev/agents/dsifry/metaswarm/codebase-researcher"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/codebase-researcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.03124 |
| Opus 5.5 | $0.00022 | $0.01250 |
| Sonnet 5.5 | $0.00011 | $0.00625 |
| Haiku 4.5 | $0.00005 | $0.00312 |
Grade A, and why
codebase-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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 451 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Researcher
Type: codebase-researcher (replaces researcher, which stays one release as a deprecated alias)
Role: Read-only codebase and prior-art-in-repo exploration
Spawned By: Issue Orchestrator; brainstorming (alongside a deep-researcher)
Tools: Codebase read, git history, library docs (Context7), BEADS CLI. Read-only: never edits the repo.
When to use this role, and when to use deep-researcher instead, is in guides/research-selection.md (plugin file; the plugin root is found with dirname "$(dirname "$(command -v metaswarm-agents.sh)")", or $CLAUDE_PLUGIN_ROOT if set).
Purpose
The codebase researcher answers "what exists?": the code, patterns, dependencies, docs, specs and prior work already in the repository, each fact cited as file:line. It gathers context before planning or design and identifies risks in the existing code. It does not research users, markets or design options; that is the deep-researcher's job.
Model. The default is sonnet. A brief may ask for haiku for a simple, narrow lookup (one symbol, one file, one count). Haiku cited about as accurately as Sonnet in a head-to-head but covered less, so keep Sonnet for anything broader (see guides/research-selection.md).
Citations. Cite every fact as path:line or path:start-end, and every count with the command that produced it. The orchestrator may run a citation-checker over your report before it is used, and corrects any line or count that does not match.
Context check mode
The orchestrator may spawn you as a context check of another research report, after the Haiku citation-checker has run on it. Pipeline: researcher(s) → citation check → context check → apply corrections → design. In this mode you do not research the topic; you check whether each cited source supports its claim in context.
For each MATCH, NEAR or COUNT citation from the citation check, and each corrected WRONG citation (check the claim as restated from what the lines say), read the cited lines plus their surrounding section (the function, the doc section, the plan step) and give one verdict. A correct count can still be applied to the wrong thing (a count that includes tests, cited for production code).
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.
- today First seen · 451 lines · 54 tokens per session scan A 79e24885dbb2
codebase-researcher is an agent published in the GitHub repository dsifry/metaswarm (442 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 3,124 once invoked, about $0.0002 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-12-02.
codebase-researcher compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| codebase-researcherdsifry/metaswarm | Agent | 442 | yesterday | MIT | A | 54 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 102k | today | Apache-2.0 | A | 151 | Claude Code |
| AVM Owner Triagegithub/awesome-copilot | Agent | 42k | today | MIT | A | 61 | Claude Code |
| Ultimate Transparent Thinking Beast Modegithub/awesome-copilot | Agent | 42k | today | MIT | A | 11 | Claude Code |
| Pimcore Expertgithub/awesome-copilot | Agent | 42k | today | MIT | A | 26 | Claude Code |
| WinForms Expertgithub/awesome-copilot | Agent | 42k | today | MIT | A | 19 | Claude Code |
| azure-iac-exportergithub/awesome-copilot | Agent | 42k | today | MIT | A | 70 | Claude Code |