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 skills/marcodavidd020/cerebro-code-memory/cerebronpx skills add marcodavidd020/cerebro-code-memory --skill cerebrogit clone --depth 1 https://github.com/marcodavidd020/cerebro-code-memoryWhat 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.00072 | $0.00902 |
| Opus 5 | $0.00036 | $0.00451 |
| Sonnet 5 | $0.00014 | $0.00180 |
| Haiku 4.5 | $0.00007 | $0.00090 |
Grade A, and why
cerebro 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.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cerebro — reuse cached code understanding
Cerebro is an MCP server that persists what previous sessions learned about this codebase in a local SQLite brain. Querying it costs a fraction of the tokens that re-reading folders does. Prefer Cerebro over cold exploration.
When you start work on a project
- Call
cerebro_map()for the overview: file counts and the most important modules ranked by dependency centrality. This replaces listing directories. - Call
cerebro_search("<what you're looking for>")to find relevant code by meaning (semantic) + keyword — a hit resolves to the exact symbol (path:line), not just the file. Phrase it as a natural question. - Call
cerebro_get("path/to/file")to get a file's cached summary, its symbols, and its dependency edges without reading the file.
Only fall back to actually reading a file when:
cerebro_getreports no summary yet, or- the summary is flagged
⚠ STALE(the file changed since it was summarized).
As you learn (leave traces for the next session)
After you genuinely understand a file (because you read it or worked on it), call:
cerebro_record(path="path/to/file", summary="<1-3 dense sentences IN ENGLISH>")
Write the summary in English (cheaper tokens) describing what the file does and its role in the system. This is the whole point: the next chat reuses your work instead of re-deriving it.
Decisions and the why
Code reading recovers WHAT exists, never WHY. When you learn a decision, a domain rule, or a gotcha that isn't obvious from the code, record it:
cerebro_note(content="QR_MANUAL = merchant confirms payment by hand, no gateway", topic="payments")
Before re-deriving the reasoning behind some area, call cerebro_recall("payments")
(or with no query for recent decisions) — a past session may have already figured it
out. The session-start hook surfaces recent decisions automatically.
Keeping fresh
cerebro_stale()lists files changed/added/deleted since the last index and summaries that no longer match their file.cerebro_reindex()refreshes the structural index (only changed files are reprocessed). The plugin runs this automatically after edits.
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.
- 3d ago First seen · 81 lines · 72 tokens per session scan A 945c33efdc4a
cerebro is a skill published in the GitHub repository marcodavidd020/cerebro-code-memory (6 stars, last pushed 2mo ago), licensed MIT. It adds 72 tokens to every session and 902 once invoked, about $0.0004 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-31.
Other skills, from other repositories
graph-retrieval
Exposes graph-based retrieval as a tool capability via querygraph. Reads normalized graph store files, builds a query-relevant subgraph, and returns LLM-friendly semantic triples with replayable evidence metadata.
graph
Whole-codebase structural map of the codanna index as one self-contained HTML disc. Wedges per top-level module, concentric rings with hubs at the centre, hover or click a symbol to light its edge web, search, hide or highlight modules, brush a date range on the ribbon timeline (symbols dated by git blame), heatmap of…
x-ray
Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase.
knowledge-layer
High-level deployment wrapper over RepoBrain core with graph-first knowledge injection and all-file support. Exposes refreshfilesystem and askfilesystem for building and querying the knowledge graph.
agent-repo-init
Bootstraps a new multi-agent repository from the RepoBrain template via initagentrepo. Supports quick scaffold and full runtime profile setup including MCP toggle, swarm preference, sandbox type, and optional git init. LLM configuration is handled later by rb-setup.
research
Performs deep research on a topic via deepresearch. Simulates a multi-step research process and returns a comprehensive research result as a string.