mybrain-setup

mybrain-setup is a skill for Claude Code, Codex from robertsfeir/mybrain. It costs 75 tokens per session (9,059 once invoked), scanned A, original, Apache-2.0.

A setup workflow for MyBrain, a personal knowledge base that stores information and supports semantic search, meaning searches based on meaning rather than exact words.

In plain words
What is it for?
Installing MyBrain for one project and connecting it to a bundled, Docker, native, or hosted PostgreSQL-based backend.
Why use it?
It guides project-local installation and helps choose where the knowledge base database runs without spreading the setup to other projects.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the mybrain plugin — 2 skills shipped together

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 skills/robertsfeir/mybrain/mybrain-setup
Any agent
npx skills add robertsfeir/mybrain --skill mybrain-setup
Clone the repo
git clone --depth 1 https://github.com/robertsfeir/mybrain

Made for: Claude Code, Codex.

Or install mybrain, the plugin that ships this one along with the rest of its 2 skills.

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-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/robertsfeir/mybrain/mybrain-setup.svg)](https://agentmods.dev/skills/robertsfeir/mybrain/mybrain-setup)
Your own site
<a href="https://agentmods.dev/skills/robertsfeir/mybrain/mybrain-setup"><img src="https://agentmods.dev/badge/skills/robertsfeir/mybrain/mybrain-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,059 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00075 $0.09059
Opus 5 $0.00037 $0.04529
Sonnet 5 $0.00015 $0.01812
Haiku 4.5 $0.00007 $0.00906

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

Security

Grade A, and why

mybrain-setup scanned grade A with 2 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8787/health || exit 1"]

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

proj = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'], text=True).strip()
skills/mybrain-setup/SKILL.md · 715 lines

How it starts

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

MyBrain -- Setup

This skill installs MyBrain.

Install scope is always per-project (local). The MCP server is registered with claude mcp add using the default local scope — it lives in this user's Claude config for this project only. It is never registered with --scope user (that registration leaks to every project on the machine and causes port races and mis-attributed thoughts), never with --scope project (that ships the registration to teammates via .mcp.json), and never auto-registered by the plugin loader (v2.2.0 and earlier shipped a .mcp.json at the plugin root that Claude Code's plugin system would auto-register as plugin:mybrain:mybrain with a hard-coded BRAIN_SCOPE: "personal" — that file was removed in v2.2.1, but stale plugin caches may still carry it). Step 0 below detects any pre-existing non-local registration and offers to remove it.

The only user-facing choice during setup is where the brain's database lives. Four backends are supported:

  • Bundled -- PostgreSQL, Ollama, and the MCP server all run inside a single container. No API key needed. One port. One volume. Recommended for personal use.
  • Docker -- Multi-container: PostgreSQL + optional Ollama (compose profile) + MCP server. Uses OpenRouter or Ollama for embeddings.
  • Native -- No Docker. Ollama runs directly on the host, Postgres is whatever the user already has installed (or any reachable PG), and the MCP server runs as a local process registered via claude mcp add.
  • RDS -- Connect to a shared PostgreSQL database on AWS RDS or any reachable remote Postgres. Multiple repos can share one database — ltree scoping (BRAIN_SCOPE) isolates each repo's thoughts.

Embedding dim and the schema

The schema ships with a {{EMBED_DIM}} placeholder that is substituted at scaffold time (default: 1536). The default Ollama model (gte-qwen2-1.5b-instruct) and the default OpenRouter model (openai/text-embedding-3-small) both produce 1536-dim vectors, so the default schema works against every default backend out of the box. Users who want a 1024-dim local model (e.g. mxbai-embed-large) substitute {{EMBED_DIM}}=1024 at scaffold time and override OLLAMA_MODEL=mxbai-embed-large in their .env.

Read the full file on GitHub · 715 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. 4d ago First seen · 715 lines · 75 tokens per session scan A be5e03b4393d

Subscribe to this mod's changes

mybrain-setup is a skill published in the GitHub repository robertsfeir/mybrain (0 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 75 tokens to every session and 9,059 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). 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

knowledge-ingest

Ingest or update a codebase in the agent-knowledge base. First run bootstraps the knowledge base from scratch; subsequent runs are incremental (only changed/new/deleted files reprocessed). Uses tree-sitter for zero-token structural extraction. Trigger on "/knowledge-ingest", "ingest this codebase", "load this into…

keshrath/agent-knowledge · 96 tokens

llm-wiki

The foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources…

Ar9av/obsidian-wiki · 113 tokens

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

karpathy-llm-wiki

Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.

Astro-Han/karpathy-llm-wiki · 67 tokens

knowledge-base-interop

Two-layer knowledge architecture — curate in LLM Wiki, search in Astra KB. Covers input classification, source-to-wiki ingestion, wiki-to-KB export (batch + realtime), semantic chunking, SAG extraction, health checks, and multi-format export.

alrcatraz/astra-knowledge-base-mcp · 56 tokens

memory-systems

This skill should be used for persistent semantic memory in agent systems: cross-session knowledge retention, entity tracking, temporal validity, graph or vector retrieval, memory consolidation, and memory benchmark selection. Route file-backed scratchpads to filesystem-context, handoff summaries to…

fabioc-aloha/Alex_Skill_Mall · 68 tokens