brain-setup

A setup guide for adding the Open Project Brain Standard to a project. The standard gives a project a BRAIN.md entry point and a brain directory that stores structured project knowledge.

In plain words
What is it for?
Use it to initialize a project brain, connect it to CLAUDE.md and AGENTS.md, or optionally add pre-commit and Claude Code session-start hooks.
Why use it?
It creates the files and wiring needed before other brain tools can read or update project knowledge, while keeping those updates controlled by the brain command-line tool.

Skill for Claude CodeCodex

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

Made for: Claude Code, Codex.

Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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 $0.00060 $0.02278
Opus 5 $0.00030 $0.01139
Sonnet 5 $0.00012 $0.00456
Haiku 4.5 $0.00006 $0.00228

Measured 3d ago against content hash a6ae879c8e00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

brain-setup scanned grade B with 1 finding 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Offer a project-local SessionStart hook so Claude Code sessions start with a compact `brain list-pages` snapshot. **Never** write `~/.claude/settings.json` — a global hook would fire in projects that have no brain. Do **
skills/brain-setup/SKILL.md · 110 lines

How it starts

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

brain-setup

This skill bootstraps a project into the Open Project Brain Standard: it drops in the protocol entry point and the brain/ skeleton so the brain-page and brain-ingest skills (and the brain CLI) have something to work with. It is idempotent — safe to run again on an already-initialized project.

Preferred one-shot path: from the project root run:

node <brain-page-bundle>/bin/brain.mjs init

That command ensures BRAIN.md, scaffolds empty brain data (brainRoot-aware), and default-wires CLAUDE.md + AGENTS.md (create if missing; if present, only update/append the marked brain block — never whole-file overwrite). Use the steps below when you need the optional pre-commit hook, the optional Claude Code SessionStart hook, or are explaining the flow.

NEVER hand-edit any file under the brain directory. All reads and writes MUST go through the brain CLI. Manual edits are unsupported and illegitimate. This scaffold creates the brain once; from then on every read and write is a brain subcommand. There is no validator and nothing at the file layer can catch a bad manual edit, so a hand edit silently breaks the brain's invariants.

Run this from the target project's root. The skill bundle ships the templates under assets/ and the hook under hooks/; resolve <this-skill-bundle> to the directory this SKILL.md lives in.

Core invariant: there is exactly one brain, at the resolved location. The brain's data directory is location-independent — it lives at ./brain by default, but a MindMux-managed project redirects it via brainRoot in ./.mindmux/preferences.json (often an absolute path to an external sidecar directory). This skill MUST resolve that location before scaffolding, and MUST NOT create a second, local ./brain when a brainRoot is set — doing so produces a split brain (an empty local skeleton shadowing the real external brain). The BRAIN.md protocol document is separate: it always lives in the project root regardless of where the brain data lives.

Read the full file on GitHub · 110 lines

Files

What ships with it

11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 110 lines · 60 tokens per session scan B a6ae879c8e00

Subscribe to this mod's changes

brain-setup is a skill published in the GitHub repository mindmuxai/brain.md (522 stars, last pushed 12d ago), licensed Apache-2.0. It adds 60 tokens to every session and 2,278 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

c-03-repo-bootstrap

Bootstrap onboarding for undocumented repos or existing memory slices. Builds root overviews, route-local overview pillars, evidence packs, file cards, onboarding waves, deleted-slice cleanup, curator reviews, and handoff while keeping the orchestrator thin.

Foxfire1st/agents-remember · 54 tokens

c-12-closeout

Close out approved Agents Remember edits by preserving approval authority, mandatory strict code quality before code commit, missing-onboarding checks, external-memory refresh, memory quality, ledger alignment, and no automatic push.

Foxfire1st/agents-remember · 45 tokens

l-01-agent-lifecycles

The agent lifecycles: one lifecycle per agent type, under one roof. Routes every session by exactly three conditions (spawn-role env -> fresh role brief -> otherwise free-chat launcher), carries the minimal lifecycle frame (the six lifecycle signals every session shares), and houses the self-contained per-role…

Foxfire1st/agents-remember · 135 tokens

c-09-git-worktree-manager

Create, attach to, report on, integrate, finalize, and clean up Agents Remember worktree-backed tasks while preserving delegated/human approval gates and external-memory compatibility.

Foxfire1st/agents-remember · 42 tokens

c-05-create-or-update-onboarding-files

Create and maintain file-level onboarding and repo entity catalogs. Enforces strict 1-to-1 source mapping, governing overview links, metadata, and references, and routes package/module/source-slice create, refresh, move, or delete cases to the c-03-repo-bootstrap skill.

Foxfire1st/agents-remember · 67 tokens

c-02-memory-quality-control

Control Agents Remember memory quality with task-start drift checks, pre-code-commit missing-onboarding checks, and closeout memory quality gates.

Foxfire1st/agents-remember · 34 tokens