membrain

membrain is a skill for Claude Code, Codex from SIDDHU123M/membrain-mcp. It costs 67 tokens per session (775 once invoked), scanned A, original, MIT.

A shared long-term memory store that lets connected agents and the user save and retrieve information about projects, preferences, and past decisions.

In plain words
What is it for?
Use it to load context at the start of a task, search for relevant history, and save durable facts or decisions.
Why use it?
It reduces repeated explanations and helps work continue with context from earlier sessions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to load context at the start of a task, search for relevant history, and save durable facts or decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/siddhu123m/membrain-mcp/membrain
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SIDDHU123M/membrain-mcp --skill membrain
Clone the repo
git clone --depth 1 https://github.com/SIDDHU123M/membrain-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for membrain

README.md
[![agentmods](https://agentmods.dev/badge/skills/siddhu123m/membrain-mcp/membrain/github.svg)](https://agentmods.dev/skills/siddhu123m/membrain-mcp/membrain)
Your own site
<a href="https://agentmods.dev/skills/siddhu123m/membrain-mcp/membrain"><img src="https://agentmods.dev/badge/skills/siddhu123m/membrain-mcp/membrain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for membrain

Your own site · 80×15
<a href="https://agentmods.dev/skills/siddhu123m/membrain-mcp/membrain"><img src="https://agentmods.dev/badge/skills/siddhu123m/membrain-mcp/membrain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.00775
Opus 5 $0.00034 $0.00387
Sonnet 5 $0.00013 $0.00155
Haiku 4.5 $0.00007 $0.00077

Measured 8d ago against content hash 64f42e1736f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

membrain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/membrain/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Membrain — shared memory

Membrain is the user's self-hosted memory server. Every agent connected to it reads and writes the same store — memory another agent saved yesterday is yours to use today. The user sees and edits everything in a web UI, so write memories you'd be happy to have inspected.

When to search (do this unprompted)

At the start of any session or task, call memory_context(query?) once — it returns a compact digest of what is already known about the topic (or the most recent memories), cheaper than several searches.

Then call search_memory before answering, whenever the answer could depend on who the user is or what happened before:

  • Any question about the user, their preferences, projects, or setup.
  • Starting a task in a domain you've likely touched before ("continue the site", "fix the app").
  • Before asking the user a question — the answer may already be stored.

search_memory(query, top_k=5, tags?) is hybrid semantic + keyword with a mild recency boost; plain natural language queries work. Results carry source — who wrote it (ui = the user, mcp:<client> = an agent, import = a document). Truncated result? get_memory(id) fetches the full entry.

When to save (do this unprompted)

Call save_memory when the user states something durable:

  • Stable facts: role, stack, environment, people, constraints.
  • Preferences: style, tooling, workflow, things they told you to stop doing.
  • Decisions: chosen approaches, rejected options and why, agreed conventions.

Do not save: transient task state, secrets/credentials, anything the user asked to keep out, or facts already stored (search first — update instead of duplicating).

Writing good memories

  • One self-contained fact per memory, 1–2 sentences, understandable with zero context.
  • Bad: "he prefers the second option". Good: "For the DevLune site, prefers flat per-page pricing over percentage multipliers."
  • Add 1–3 lowercase tags for the domain (preferences, project-x, stack).

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 61 lines · 67 tokens per session scan A 64f42e1736f1

Subscribe to this mod's changes

membrain is a skill published in the GitHub repository SIDDHU123M/membrain-mcp (1 stars, last pushed 26d ago), licensed MIT. It adds 67 tokens to every session and 775 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

plur-create-engrams

Create or improve PLUR engrams from conversations, documents, decisions, observations, and explicit preferences. Use for memory extraction, engram authoring, or reviewing proposed memories, including global, scoped, pinned, retrieved, and provisional knowledge. Ordinary use of existing memories does not require this…

plur-ai/plur · 66 tokens

plur-memory

Persistent learning for AI agents. Open engram format. Your agent learns from corrections, remembers across sessions, and transfers knowledge across domains.

plur-ai/plur · 31 tokens

plur-session-end

Extract durable learnings at the end of a session. Saves corrections, preferences, and codebase patterns as engrams — nothing ephemeral, nothing sensitive.

plur-ai/plur · 35 tokens

plur-memory

Your memory stays on your machine. No cloud, no tracking, no API key. PLUR makes your OpenClaw remember — and shares that memory with every other tool you use.

plur-ai/plur · 41 tokens

skills

Your next session starts cold. No memory of what you built, what broke, what you decided. Every memory you write is a gift to that future session. The richer the memory, the less time re-learning.

jackccrawford/Geniuz · 0 tokens

perenna-memory

Use Perenna when a non-trivial task may depend on prior decisions or preferences, when durable knowledge should survive the session, or when the user asks to remember, forget, or consolidate memories. Skip self-contained tasks and facts already authoritative in the current workspace.

scarletkc/Perenna · 57 tokens