Claude Code hook

Claude Brain

Sync your Claude Code brain across machines — memory, skills, agents, rules, and settings with intelligent semantic merge. Git-based, auto-sync hooks.

92 stars 23 forksHooks Plugin marketplace Source

Install

Inside Claude Code
/plugin marketplace add toroleapinc/claude-brain

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/toroleapinc/claude-brain.git

From the README

claude-brain

    Sync your Claude Code brain across machines — portable, automatic, intelligent.

    🇨🇳 中文

    claude-brain is a Claude Code plugin for brain sync — sync Claude Code memory, skills, agents, rules, and settings across all your machines with semantic merge. Cross-machine, portable, zero daily effort.

  Two commands. Zero daily effort. Works forever.

The Problem

You use Claude Code on multiple machines. Your laptop has learned your coding patterns. Your desktop has custom skills. Your cloud VM has different rules. None of them talk to each other.

Every time you switch machines, you lose context. You re-teach Claude the same things. Your carefully crafted CLAUDE.md stays behind.

The Solution

Two commands. Zero daily effort. Works forever.

Why claude-brain?

No other tool does cross-machine semantic merge of Claude Code's brain state.

Key Features

- Auto-sync — hooks run on every session start/end, zero effort
- Semantic merge — LLM-powered deduplication of memory and CLAUDE.md (not just overwrite)
- N-way merge — laptop + desktop + cloud VM all converge intelligently
- Encryption — optional age encryption for brain snapshots at rest
- Team sharing — share skills, agents, and rules with teammates
- Auto-evolve — promotes stable patterns from memory to durable config
- Security-first — secrets stripped, env vars excluded, private repo enforced
- Dirt cheap — ~$0.50-2.00/month typical usage via claude -p

Quick Start

Install

Initialize (first machine)

Join (other machines)

With encryption

Done. Auto-sync handles everything from here.

Commands

What Gets Synced

Architecture

No central server. Git handles transport. Each machine merges on pull.

Merge strategy:
- Structured data (settings, keybindings, MCP) → deterministic JSON deep-merge…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Shell
License
MIT
Last updated
9 June 2026
Topics
aiai-toolsanthropicautomationbashclaudeclaude-codeclaude-code-pluginclicross-platformdeveloper-toolsdevtools

FAQ

What is Claude Brain?

Sync your Claude Code brain across machines — memory, skills, agents, rules, and settings with intelligent semantic merge. Git-based, auto-sync hooks. It is a hook for Claude Code, from toroleapinc/claude-brain on GitHub.

How do I install Claude Brain?

Run /plugin marketplace add toroleapinc/claude-brain inside Claude Code, then follow the setup in the README.

Is Claude Brain popular?

toroleapinc/claude-brain has 92 GitHub stars and 23 forks. It was last updated on 9 June 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.