mybrain CLAUDE.md

mybrain CLAUDE.md is an instructions file for coding agents from robertsfeir/mybrain. It costs 1,487 tokens per session, scanned A, original, Apache-2.0.

Project instructions for a personal semantic memory server that stores and retrieves thoughts using a database and vector embeddings, which represent meaning as numbers.

In plain words
What is it for?
Understanding the mybrain-mcp codebase, finding the right source files, and running or extending the server.
Why use it?
They give the coding agent the project's purpose, technology choices, file layout, and commands, so it can make changes with the right context.

Instructions file

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.

agentmods
npx agentmods add instructions/robertsfeir/mybrain/claude-md
Clone the repo
git clone --depth 1 https://github.com/robertsfeir/mybrain

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 mybrain CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/robertsfeir/mybrain/claude-md.svg)](https://agentmods.dev/instructions/robertsfeir/mybrain/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/robertsfeir/mybrain/claude-md"><img src="https://agentmods.dev/badge/instructions/robertsfeir/mybrain/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,487 This file is loaded in full into every session.
When invoked 1,487 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01487 $0.01487
Opus 5 $0.00744 $0.00744
Sonnet 5 $0.00297 $0.00297
Haiku 4.5 $0.00149 $0.00149

Measured 5d ago against content hash 28830f63ff91, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

mybrain CLAUDE.md 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 5d 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.

CLAUDE.md · 116 lines

How it starts

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

mybrain-mcp

Project Overview

Personal semantic thought storage and retrieval MCP server with vector embeddings and ltree scoping. Implements the 8-tool atelier-brain protocol for cross-project compatibility (mybrain ADR-0001).

Tech Stack

  • Runtime: Node.js 18+ (ESM modules)
  • MCP Framework: @modelcontextprotocol/sdk 1.27.1
  • Database: PostgreSQL 12+ with pgvector (1536-dim embeddings) and ltree extensions
  • HTTP Server: Node http (Streamable HTTP transport mode)
  • Embeddings: Provider-abstracted (OpenRouter, OpenAI, GitHub Models, local Ollama)
  • Containerization: Docker (Alpine), Docker Compose

Source Layout

server.mjs              — startup orchestrator (transport + wiring only, ~250 lines)
lib/                    — all server logic
  config.mjs            — resolveConfig, buildProviderConfig, identity, enums
  db.mjs                — createPool, runMigrations
  crash-guards.mjs      — installCrashGuards (process-level signal/error handlers)
  embed.mjs             — getEmbedding, probeEmbeddingDim, startEmbedWorker
  llm-provider.mjs      — embed/chat provider adapters (openai-compat, anthropic, local)
  llm-response.mjs      — assertLlmContent (LLM response validation)
  conflict.mjs          — detectConflicts, classifyConflict, getBrainConfig
  consolidation.mjs     — startConsolidationTimer, runConsolidation
  ttl.mjs               — startTTLTimer, runTTLEnforcement
  tools.mjs             — registerTools (8 protocol tools)
  rest-api.mjs          — createRestHandler (Settings UI REST endpoints)
  static.mjs            — handleStaticFile (Settings UI asset serving)
  hydrate.mjs           — discoverSubagentFiles/discoverEvaFiles/Tier 1-3 hydration
migrations/             — auto-applied SQL migrations (idempotent, runs at startup)
scripts/                — out-of-band utilities (hydrate-telemetry.mjs)
templates/              — Docker deployment scaffolding (Dockerfile, compose.yml, schema.sql)
ui/                     — reserved for Settings UI static assets (placeholder; lib/static.mjs serves from here when populated)
tests/brain/            — node:test integration tests (require DATABASE_URL)
skills/                 — Claude Code skills (mybrain-setup, mybrain-overview)
.claude-plugin/         — plugin manifest for marketplace

Read the full file on GitHub · 116 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. 5d ago First seen · 116 lines · 1,487 tokens per session scan A 28830f63ff91

Subscribe to this mod's changes

mybrain CLAUDE.md is an instructions file published in the GitHub repository robertsfeir/mybrain (0 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 1,487 tokens to every session, about $0.0074 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 instructions, from other repositories