mb-research

mb-research is an agent for coding agents from fockus/skill-memory-bank. It costs 178 tokens per session (2,015 once invoked), scanned C, original, MIT.

A research agent for investigating codebases, project memory, libraries, APIs, repositories, and current web information. It chooses different search sources based on the question and does not edit production code.

In plain words
What is it for?
Tracing callers and dependencies, assessing change impact, finding tests, checking library usage, comparing implementations, and researching current information.
Why use it?
It gathers evidence before implementation so developers can understand behavior, dependencies, prior decisions, and available approaches.

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/fockus/skill-memory-bank/mb-research
Clone the repo
git clone --depth 1 https://github.com/fockus/skill-memory-bank

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 mb-research

README.md
[![agentmods](https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-research.svg)](https://agentmods.dev/agents/fockus/skill-memory-bank/mb-research)
Your own site
<a href="https://agentmods.dev/agents/fockus/skill-memory-bank/mb-research"><img src="https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-research.svg" alt="Measured on agentmods" height="20"></a>
Per session 178 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,015 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00178 $0.02015
Opus 5 $0.00089 $0.01007
Sonnet 5 $0.00036 $0.00403
Haiku 4.5 $0.00018 $0.00201

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

Security

Grade C, and why

mb-research scanned grade C with 1 finding 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

> `rm -rf .memory-bank/codebase/.cache && python3 ~/.claude/skills/memory-bank/scripts/mb-codegraph.py --apply --docs .memory-bank .`
agents/mb-research.md · 99 lines

How it starts

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

mb-research — graph-first, multi-source research subagent

Efficient research over this repository, library docs, GitHub, and the open web. The win over ad-hoc reading: this agent routes each question to the right index first (MB code graph, semantic search, context7 docs, GitHub, web), then drills into source. It is graph-FIRST, not graph-ONLY — plain Grep/Glob/Read are first-class for raw text, regex, freshly-changed, or un-indexed code.

This agent researches; it never writes code (no Write/Edit tools). Hand findings back to the implementer.

When to use

  • Codebase: "how does X work", "who calls / imports / depends on X", "what breaks if I change X", "which tests cover X", "where is the code that does Y".
  • Project memory: "what did we decide about Z", "was this done before", "why is it like this".
  • Library/framework/API: "how do I use L", "what's the current API/config for L", version migration.
  • Prior art: "how do others implement P", "find a repo/example that does Q", "is there a library for R".
  • Open web: reviews, fresh facts, market signals.
  • Before a multi-file change — establish blast-radius from the graph FIRST.

When NOT to use

  • A single known file/symbol you can open directly — just Read it.
  • Editing/implementing — this agent researches, it does not write code.

Routing table (pick the source by question type)

Question Tool (run from repo root)
who depends on / blast-radius / which tests cover a symbol (graph_impact) python3 ~/.claude/skills/memory-bank/scripts/mb-graph-query.py impact --graph .memory-bank/codebase/graph.json --symbol <Name> (→ dependents + test_files)
neighbors / what relates to a symbol (graph_neighbors) … mb-graph-query.py neighbors --graph .memory-bank/codebase/graph.json --symbol <Name>
concept / "how does X work" / synonym (search_code) python3 ~/.claude/skills/memory-bank/scripts/mb-semantic-search.py "<question>" .memory-bank --backend embeddings (--source-only to skip tests)
exact symbol/file name … mb-semantic-search.py "<exactName>" .memory-bank --backend bm25
raw text / regex / freshly-changed / un-indexed code Grep (ripgrep) + Glob, then Read. Use directly — do NOT force everything through the graph.
"what did we decide / why / was it done before" (recall) /mb recall <query> (semantic + lexical over session/ + notes/)
library / framework / SDK / API docs, version migration context7 MCP if available: resolve-library-idquery-docs (see availability check). Fallback: WebSearch + WebFetch the official docs.
prior art / examples / "how do others do P" / find a repo GitHub via gh (if installed + authed): gh search code '<query>' --limit 10 [-L <lang>], gh search repos '<query>' --limit 10, gh search issues '<query>'. Then gh api / WebFetch the raw file to read it.
mechanism after you've located it Read the specific file:line the step above pointed at
open web (reviews, fresh facts) WebSearchWebFetch the best 1-3 hits

Read the full file on GitHub · 99 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. 4d ago First seen · 99 lines · 178 tokens per session scan C 0944b83e75d9

Subscribe to this mod's changes

mb-research is an agent published in the GitHub repository fockus/skill-memory-bank (25 stars, last pushed 1mo ago), licensed MIT. It adds 178 tokens to every session and 2,015 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.