Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By RobertCoopv0.2.6In 1 marketplace
The reflex-and-memory layer beneath the model's cortex: retrieval-gated inject / remind / deny tiers, prompted agent-authored writes, offline consolidation.
You run one by typing its /name in Claude Code.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
The reflex-and-memory layer beneath the model's cortex. hindbrain is a Claude Code plugin that gives the agent persistent, retrieval-gated memory via lifecycle hooks. On the read side, before and around operations a local SQLite store is searched and results surface in three tiers: inject (full note placed in context), remind (a one-line pointer plus a fetch verb), or deny (a hazard-flagged memory blocks a consequential command). On the write side nothing is auto-extracted: observers watch for signals (a failure followed by a fix, a correction, an explicit "remember this"), queue candidates, and the Stop hook nudges the agent with pre-drafted mem save commands — the agent authors every memory, the hooks only guarantee the ask.
An offline consolidator dedupes, promotes, expires, detects contradictions, and proposes graduations to CLAUDE.md (it never writes CLAUDE.md itself). Everything fails open: a broken memory system degrades to "Claude Code without memory," never to a broken session.
fcntl locking and POSIX paths; the import is guarded, so a future port degrades to lock-free, but v1 is untested there).This repository hosts its own single-plugin marketplace (.claude-plugin/marketplace.json with source: "./"), so installation is two commands:
claude plugin marketplace add https://github.com/RobertCoop/hindbrain
claude plugin install hindbrain@hindbrain
(Or interactively: /plugin → browse the hindbrain marketplace.) The exact flow tracks the live plugin documentation (see the Substrate compatibility checklist, item V1). Once installed, hooks register from the plugin's hooks/hooks.json automatically and data lives under ${CLAUDE_PLUGIN_DATA}.
Clone this repo anywhere (example below uses /home/you/hindbrain) and register the same hooks in ~/.claude/settings.json with absolute paths:
{
"hooks": {
"SessionStart": [
{ "matcher": "startup|resume|clear|compact|fork",
"hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/session_start.py"], "timeout": 10 } ] }
],
"UserPromptSubmit": [
{ "hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/prompt_gate.py"], "timeout": 5 } ] }
],
"PreToolUse": [
{ "matcher": "Edit|Write|MultiEdit|NotebookEdit",
"hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/pretool_gate.py"], "timeout": 5 } ] },
{ "matcher": "Bash",
"hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/pretool_gate.py"], "timeout": 5 } ] }
],
"PostToolUse": [
{ "matcher": "Bash|Edit|Write|MultiEdit|Task|WebFetch|WebSearch",
"hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/observer.py"], "async": true } ] }
],
"PostToolUseFailure": [
{ "matcher": "Bash|Edit|Write|MultiEdit|Task",
"hooks": [
{ "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/failure_gate.py"], "timeout": 5 },
{ "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/observer.py"], "async": true }
] }
],
"Stop": [
{ "hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/stop_gate.py"], "timeout": 10 } ] }
],
"PreCompact": [
{ "matcher": "auto|manual",
"hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/precompact_salvage.py"], "async": true } ] }
],
"SessionEnd": [
{ "hooks": [ { "type": "command", "command": "python3",
"args": ["/home/you/hindbrain/scripts/session_end.py"], "timeout": 2 } ] }
]
}
}
Add hindbrain/bin to PATH (or symlink bin/mem into a directory on it) so the agent can run the mem CLI. Nothing in the scripts assumes a plugin install — all paths resolve through lib/paths.py.
Resolution order: $HINDBRAIN_DATA → $CLAUDE_PLUGIN_DATA (plugin install) → ~/.claude/hindbrain (settings install). Layout:
<data>/
├── hindbrain.db # SQLite store (WAL)
├── config.toml # your config; created from config.default.toml on first run
├── sessions/ # per-(session,agent) state JSON
├── drafts/ # overflow bodies
├── reports/ # consolidator reports (contradictions-, promotions-<date>.md)
├── logs/
│ ├── errors.log
│ └── metrics.jsonl
└── consolidator.lock
Plugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub robertcoop/hindbrain --plugin hindbrain