Skip to content

Claude Mega Brain

OKF-powered knowledge context for Claude Code, injects your project's knowledge base at every session

Install: /plugin marketplace add guhcostan/claude-mega-brain

Works with Claude Code · 127 GitHub stars

Install

$/plugin marketplace add guhcostan/claude-mega-brain

Install command taken from the project's README or registry entry. Always review code before running it.

claude-mega-brain

Loads the knowledge. Skips the search.

100% accuracy · 0 tool calls · −66% tokens vs Obsidian+MCP

Real agentic sessions. Benchmark →


Install

/plugin marketplace add guhcostan/claude-mega-brain
/plugin install mega-brain@mega-brain

Then in any project:

/mega-brain:init

Start a new session — the knowledge base loads automatically.


The problem

Without claude-mega-brain, Claude guesses from training data:

User: What column stores the order total?

Claude (no context): Typically total_amount (DECIMAL) or amount (FLOAT)...
# Wrong — this project uses total_cents (INT64)

With claude-mega-brain, the exact schema is injected at SessionStart:

<mega-brain>
Knowledge: 4 documented concepts found in project

  docs/orders.md     [BigQuery Table] — total_cents INT64, status STRING(pending/confirmed/shipped/done)
  docs/customers.md  [BigQuery Table] — customer_id STRING, email STRING, country STRING
  docs/wau.md        [Metric]         — COUNT(DISTINCT user_id) WHERE session_date >= CURRENT_DATE-7
  docs/net_revenue.md [Metric]        — SUM(total_cents - refund_cents)/100 WHERE status='done'
</mega-brain>

User: What column stores the order total?

Claude: total_cents (INT64) — from docs/orders.md
# Correct. 0 tool calls. First turn.

Benchmark

10 questions with project-specific values unknowable from training data. Real agentic sessions — not simulated.

metric no context Obsidian+MCP CLAUDE.md (raw files) claude-mega-brain
accuracy (no tools) 50% 13% 100% 100%
accuracy (agentic) 100%† 100%† 100% 100%
tool calls avg 1.1 0.9 0.1 0
tokens avg 61,521 49,186 20,624 16,547
latency avg ms 10,267 10,986 5,494 4,384

† raw and Obsidian+MCP reach 100% agentic accuracy by using tool calls to explore the project — spending 3–4× more tokens and time. Without tools, they drop to 50% and 13%.

CLAUDE.md (raw files) matches mega-brain on accuracy but uses 25% more tokens and is 25% slower. mega-brain's compressed OKF index is smaller and faster — the gap widens as knowledge bases grow.

Full results · Reproduce


How it works

At SessionStart, a hook scans the entire project for any .md file with type: in its YAML frontmatter and injects a compact index:

<mega-brain>
Knowledge: 8 documented concepts found in project

Recent (log.md):
  2026-06-29 — added customers table

  index.md            [Index]         — Central reference for all sales data
  docs/orders.md      [BigQuery Table] — One row per completed order
  docs/customers.md   [BigQuery Table] — Customer profiles
  docs/wau.md         [Metric]         — Weekly active users
  ...
</mega-brain>

No dedicated folder needed — documents can live anywhere in the project. When Claude reads an OKF file, linked concepts surface automatically via PostToolUse.

Zero overhead when not in use — if no documented concepts are found, the hook exits in <5ms.


How it compares

Similar plugs

A Claude Code plugin that shows what's happening - context usage, active tools, running agents, and todo progress

Memori is agent-native memory infrastructure. A LLM-agnostic layer that turns agent execution and conversation into structured, persistent state for production systems. Built…

An Obsidian plugin that embeds Claude Code/Codex as an AI collaborator in your vault

PluginDev tools+61 this week

Explore related