By guhcostan
Inject a persistent OKF project knowledge base into Claude Code sessions, with commands to navigate, create, update, and migrate Markdown documentation that auto-loads at startup.
OKF knowledge navigation. ALWAYS use this skill the moment a `<mega-brain>` block appears in session context — it means the project has documented concepts and you must consult them before answering questions about data, schemas, metrics, APIs, or systems. Also trigger when the user asks about a table, column, metric definition, service, or API endpoint and there's any chance it's documented in the project. When in doubt, read the file directly.
Create or update a single OKF concept file from raw input. Use when the user wants to document a specific table, metric, API, service, or concept in the knowledge base — even if they say "add this to the okf", "documenta essa tabela", "cria um conceito pra isso", "adiciona no knowledge base", "register this API", or pastes a schema/description and says to save it. If no OKF files exist yet, suggest /mega-brain:init first.
Initialize OKF knowledge base files in the current project. Use when the user wants to start documenting their project for claude-mega-brain, or when the user says "init mega brain", "setup the knowledge base", "cria o okf", "inicializa o mega brain", "quero usar o mega brain", "criar a estrutura do knowledge base", or asks how to get started with the plugin.
Scan the project and migrate existing documentation into OKF format. Use when the user wants to populate the knowledge base from existing docs, README, schemas, API specs, runbooks, or any structured project knowledge. Trigger on "migrate to okf", "populate the knowledge base", "scan my docs", "convert docs to okf", "importar documentação", "migrar para okf", "popular o knowledge base", "lê meus docs e cria o okf", "generate okf from existing docs", or when the user points at a docs folder and asks to "put it in the knowledge base". If no OKF files exist yet, run /mega-brain:init before migrating.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Loads the knowledge. Skips the search.
100% accuracy · 0 tool calls · −66% tokens vs Obsidian+MCP
Real agentic sessions. Benchmark →
/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.
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.
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.
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.
| tool | auto-inject | schema enforcement | tool calls to answer | accuracy (no tools) |
|---|---|---|---|---|
| claude-mega-brain | ✓ SessionStart hook | required (type:) | 0 | 100% |
| CLAUDE.md + additionalDirectories | manual setup | none | 0 | 100%* |
| Obsidian + MCP | ✗ manual | none | 1–3 | 13% |
| Notion | ✗ manual | proprietary | N/A | — |
| Logseq | ✗ plugin-based | none | N/A | — |
| mem.ai | ✗ none | none | N/A | — |
* CLAUDE.md matches mega-brain accuracy but uses 25% more tokens and is 25% slower — raw file dump vs compressed structured index.
Any .md file in the project with type: in its YAML frontmatter is automatically picked up. No dedicated folder needed.
npx claudepluginhub guhcostan/claude-mega-brain --plugin mega-brainProduct management methodology for Claude Cowork and Claude Code — discovery, PRDs, roadmapping, prioritization, and launches. 18 composable skills with subagent-powered research, review, and visual collaboration.
AI-powered knowledge base management - Capture conversation learnings, maintain topic-specific KB files, Obsidian-compatible knowledge graph, structured dynamic context loading, and institutional knowledge in CLAUDE.md
Bootstrap a wiki-first knowledge system into any project.
Local-first memory server — hybrid BM25+vector search, vault management, lint, and launchd lifecycle for project knowledge.
Optimized file search, semantic indexing, and persistent memory for Claude Code — with optional sync to a self-hosted web dashboard
Company knowledge management plugin — progressive context loading, knowledge quality engine, claude-mem integration
LLM-native personal wiki system — session-aware knowledge base for Claude Code