cerebro

cerebro is a skill for Claude Code from marcodavidd020/cerebro-code-memory. It costs 72 tokens per session (902 once invoked), scanned A, original, MIT.

A local, cached map of a codebase that stores summaries, symbols, and dependency relationships in a SQLite database.

In plain words
What is it for?
Use it to search for relevant code, inspect cached file summaries, find symbols and dependencies, and record new understanding for later sessions.
Why use it?
It helps an agent understand a project without repeatedly reading every folder and file from scratch.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the cerebro plugin — 1 skill, 5 agents, 4 hooks, 1 MCP server shipped together

Good fit Use it to search for relevant code, inspect cached file summaries, find symbols and dependencies, and record new understanding for later sessions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marcodavidd020/cerebro-code-memory/cerebro
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.

Any agent
npx skills add marcodavidd020/cerebro-code-memory --skill cerebro
Clone the repo
git clone --depth 1 https://github.com/marcodavidd020/cerebro-code-memory

Made for: Claude Code.

Or install cerebro, the plugin that ships this one along with the rest of its 1 skill, 5 agents, 4 hooks, 1 MCP server.

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 cerebro

README.md
[![agentmods](https://agentmods.dev/badge/skills/marcodavidd020/cerebro-code-memory/cerebro/github.svg)](https://agentmods.dev/skills/marcodavidd020/cerebro-code-memory/cerebro)
Your own site
<a href="https://agentmods.dev/skills/marcodavidd020/cerebro-code-memory/cerebro"><img src="https://agentmods.dev/badge/skills/marcodavidd020/cerebro-code-memory/cerebro/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.

agentmods 80×15 button for cerebro

Your own site · 80×15
<a href="https://agentmods.dev/skills/marcodavidd020/cerebro-code-memory/cerebro"><img src="https://agentmods.dev/badge/skills/marcodavidd020/cerebro-code-memory/cerebro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 902 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00072 $0.00902
Opus 5.5 $0.00029 $0.00361
Sonnet 5.5 $0.00014 $0.00180
Haiku 4.5 $0.00007 $0.00090

Measured 3mo ago against content hash 945c33efdc4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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.

plugin/skills/cerebro/SKILL.md · 81 lines

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

  1. Call cerebro_map() for the overview: file counts and the most important modules ranked by dependency centrality. This replaces listing directories.
  2. 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.
  3. 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_get reports 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.

Read the full file on GitHub · 81 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. 3mo ago First seen · 81 lines · 72 tokens per session scan A 945c33efdc4a

Subscribe to this mod's changes

cerebro is a skill published in the GitHub repository marcodavidd020/cerebro-code-memory (6 stars, last pushed 4mo ago), licensed MIT. It adds 72 tokens to every session and 902 once invoked, about $0.0003 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-08-31.

Related

cerebro compared with skills from other repositories

cerebro next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cerebromarcodavidd020/cerebro-code-memorySkill64mo agoMITA72Claude Code
explainsysevol-ai/CodeNibSkill112todayApache-2.0A63Claude Code
setupsysevol-ai/CodeNibSkill112todayApache-2.0A16Claude Code
codesage-retrievaliliaal/codesageSkill22todayMITA45Claude Code, Codex
codemeridian-contextDriftya/code-meridianSkill52d agoMITA36Codex
human-cognitive-seedDriftya/code-meridianSkill52d agoMITA99Codex
memtrace-decision-memorysyncable-dev/memtrace-publicSkill516yesterdaynoneA137Claude Code