claude-mega-brain

作者 guhcostan已验证

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

122
Stars
17
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/guhcostan/claude-mega-brain

快速入门

使用 claude-mega-brain 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

claude-mega-brain logo

claude-mega-brain

Loads the knowledge. Skips the search.

CI Stars Release License Claude Code

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.

Benchmark chart

metricno contextObsidian+MCPCLAUDE.md (raw files)claude-mega-brain
accuracy (no tools)50%13%100%100%
accuracy (agentic)100%†100%†100%100%
tool calls avg1.10.90.10
tokens avg61,52149,18620,62416,547
latency avg ms10,26710,9865,4944,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

toolauto-injectschema enforcementtool calls to answeraccuracy (no tools)
claude-mega-brain✓ SessionStart hookrequired (type:)0100%
CLAUDE.md + additionalDirectoriesmanual setupnone0100%*
Obsidian + MCP✗ manualnone1–313%
Notion✗ manualproprietaryN/A
Logseq✗ plugin-basednoneN/A
mem.ai✗ nonenoneN/A

* CLAUDE.md matches mega-brain accuracy but uses 25% more tokens and is 25% slower — raw file dump vs compressed structured index.


OKF Format

Any .md file in the project with type: in its YAML frontmatter is automatically picked up. No dedicated folder needed.

---
type: BigQuery Table
title: Orders
description: One row per completed customer order.
resource: https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders
tags: [sales, revenue]
timestamp: 2026-06-29T00:00:00Z
---

# Schema
| Column      | Type      | Description              |
|-------------|-----------|--------------------------|
| order_id    | STRING    | Globally unique order ID |
| customer_id | STRING    | FK → customers           |
| total_cents | INT64     | Order total in cents     |
| status      | STRING    | pending/confirmed/shipped/done |

# Joins
Joined with [customers](https://github.com/guhcostan/claude-mega-brain/blob/main/customers.md) on `customer_id`.

Reserved files

FilePurpose
index.md (with type: Index)Knowledge map — Claude reads this first
log.md (with type: Log)Append-only changelog — last 3 entries injected at session start

Common types

BigQuery Table · BigQuery Dataset · Table · Metric · API · Runbook · Concept · Service · Pipeline

Types are freeform — add your own.


Usage

Start from scratch

/mega-brain:init

Creates index.md and log.md anywhere you want. Start a new session — context injects automatically.

Migrate existing docs

/mega-brain:migrate

Scans openapi.yaml, schema.prisma, schema.sql, docs/, README sections and adds type: frontmatter to generate OKF concepts.

Add a single concept

/mega-brain:ingest

Document a specific table, metric, API, or service. Saves the file wherever makes sense for your project structure.


Installation

Claude Code

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

Local development

claude plugin install /path/to/claude-mega-brain

Config (.mega-brain.json)

Optional per-project overrides:

{
  "dir": "knowledge",
  "maxConcepts": 100,
  "priorityTypes": ["Metric", "BigQuery Table"]
}
FieldDefaultDescription
dir(none)Limit scanning to this subdirectory (relative to project root). When unset, the entire project is scanned.
maxConcepts60Max concepts in injected index
priorityTypes[]Types shown at top of index
exclude[]Additional dirs to skip when scanning

FAQ

Does it slow down every session? No. If no OKF directory exists, the hook exits in <5ms with no context injected.

Can I use it with an existing wiki or docs folder? Add type: YAML frontmatter to any Markdown file and drop it in your OKF dir. Done.

What if I have 500 concepts? Set maxConcepts in .mega-brain.json. The index stays compact; index.md holds the full map.


References


Star History

Star History Chart

License

MIT — The shortest license that works.

常见问题

What is claude-mega-brain?

claude-mega-brain is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by guhcostan. OKF-powered knowledge context for Claude Code — injects your project's knowledge base at every session. It has 122 GitHub stars.

Is claude-mega-brain safe to use?

Yes. claude-mega-brain passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-mega-brain?

Clone the repository with "git clone https://github.com/guhcostan/claude-mega-brain" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-mega-brain written in?

claude-mega-brain is primarily written in Python. It is open-source under guhcostan on GitHub, so you can review or fork the full source.

Are there alternatives to claude-mega-brain?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-mega-brain against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情