Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Bootstrap the Open Project Brain Standard into the current project — ensure BRAIN.md is in the project root, resolve the brain data location with `brain brain-dir` (brainRoot-aware), scaffold the brain/ skeleton there only if it is empty (never a second local ./brain when redirected), idempotently wire CLAUDE.md / AGENTS.md, and optionally install a pre-commit hook.
.claude/skills/mindmuxai-brain-setup/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 145% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 108% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 123% | 0% |
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 initThat 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 or Codex 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.
BRAIN.md (the protocol document) is in the project rootBRAIN.md is the read/write contract that the agent reads to learn how to use the brain. It always belongs in the project root, independent of where the brain data lives.
assets/BRAIN.md → ./BRAIN.md.Do not stop here just because BRAIN.md exists — its presence says nothing about whether the brain data is set up. Always continue to step 2 to resolve and check the data location.
First, resolve where the brain data actually lives — never assume ./brain. Ask the CLI:
node <brain-page-bundle>/bin/brain.mjs brain-dir(The brain-page skill carries the CLI; in the brain.md source repo it is skills/brain-page/bin/brain.mjs, globally it is e.g. ~/.claude/skills/brain-page/bin/brain.mjs.)
brain brain-dir reads brainRoot from ./.mindmux/preferences.json when present (otherwise falls back to ./brain) and prints, on separate lines: the resolved directory, a human-readable origin, source: (brainRoot or default), exists: (true/false), and populated: (true/false — whether the location already holds a root page or any page under pages/). Read those lines instead of guessing or stat-ing by hand.
Branch on the resolved state:
populated: true → the brain already exists. Do NOT scaffold. Tell the user the brain lives at <resolved dir>. If source: brainRoot, make it explicit: "this project's brain is redirected to an external directory (`<resolved dir>`) and is managed there — leaving it untouched." Then continue to step 3 (wire) and the optional hooks (steps 4–5). Never lay down a local ./brain in this case.populated: false → scaffold the skeleton into the resolved directory (the brainRoot target when redirected, otherwise ./brain). Copy assets/brain/ → <resolved dir>/ — this brings the six root page templates (background / architecture / flow / mindmap / stack / roadmap), a generated index.md, and an empty pages/ directory. Copy each destination file only if it does not already exist (never overwrite). Never create a second local ./brain when source: brainRoot — always scaffold at the resolved path. After copying, run reindex so the index reflects the present pages: node <brain-page-bundle>/bin/brain.mjs reindex
(reindex resolves the same location, so it writes the index in the right place automatically.)
No example pages are scaffolded; the page format is documented in BRAIN.md and the brain-page skill.
brain wire (default both files)The project's agent-config files must point at BRAIN.md so agents pick up the contract. Wiring is deterministic — done by the CLI, not by hand. Do not hand-write @import lines or template paragraphs. Do not ask which agents to wire — default to both config files unless the user explicitly requests a subset.
Run (default — no --agent required):
node <brain-page-bundle>/bin/brain.mjs wireEquivalent: wire --agent all. Optional subset: --agent claude-code or comma-separated list. Supported ids: claude-code, codex, opencode, cursor, pi, all.
What the command does (so you can explain it):
./CLAUDE.md (claude-code block with @import) and ./AGENTS.md (shared block for codex / opencode / cursor / pi).<!-- BEGIN brain.md --> … <!-- END brain.md --> — that tells the agent to read ./BRAIN.md, states the session-companion rules (load brain at task start; capture decisions/constraints when they settle during coding; skip pure implementation; reverse/update when overturning; all via the brain CLI; never hand-edit), and notes the four brain skills are installed globally.@import ./BRAIN.md; Codex additionally gets native notes/history guidance with current-page reads after context rollover.Offer to install the local index + link backstop (no CI required). Only if the project is a git repository (.git/ exists) and the user agrees:
hooks/pre-commit → .git/hooks/pre-commit and make it executable (chmod +x)..git/hooks/pre-commit already exists, do not overwrite it — tell the user and show them the hook contents so they can merge it manually.The hook runs reindex → lint-links on every commit and folds any index changes back in. (There is deliberately no validator — correctness is guaranteed by the CLI being the only way to write.)
Offer a project-local snapshot of brain list-pages for Claude Code or Codex. When requested, use the CLI merge; never hand-edit hook configuration or install global hooks.
shnode <brain-page-bundle>/bin/brain.mjs install-hooks # Claude Code default node <brain-page-bundle>/bin/brain.mjs install-hooks --agent codex # Codex opt-in
Reverse with uninstall-hooks and the same agent flag. Both operations are idempotent and preserve unrelated entries. Claude uses .claude/settings.json; Codex uses .codex/hooks.json. Each gets .claude/hooks/brain-session-start or .codex/hooks/brain-session-start respectively. Foreign scripts and malformed configuration must be repaired by the user before retrying.
Codex requires CLI 0.153.4+ as the supported baseline, Node 18+, POSIX sh/awk, project trust, and review/trust through /hooks. Hooks must be enabled. Leave config.toml, global settings, and trust records untouched. Uninstall before moving the project and reinstall afterwards because the Codex command is absolute.
The script only invokes brain brain-dir and brain list-pages, respecting brainRoot. Missing/unpopulated brains and failures exit 0 silently. Codex gets a five-second timeout and an 8 KiB snapshot with whole UTF-8 rows and a full-index command when truncated; no page bodies are injected. Supported SessionStart sources are startup, resume, clear, and compact. Do not install UserPromptSubmit or Stop hooks.
Astra experimental context management is a separate opt-in via features.context_management.experimental_mode = true, followed by a new task. Check current client/plan eligibility. When native notes/history are available, retain brain page IDs and task state in notes, recover task evidence from history, and re-read current brain facts through the CLI. No hook writes notes or brain data. Experimental rollover delivery and desktop behavior require separate validation; use wired instructions and explicit CLI reads if the client does not expose a supported restoration event.
The scaffold leaves the brain empty — six root page templates plus an empty pages/. The valuable next step is to seed it with real project knowledge, and that is exactly what the brain-bootstrap skill does:
> Recommend the user run the brain-bootstrap skill next. On an existing (brownfield) project it reads the code, docs, and git log to draft the six root pages and capture the key historical decisions; on a near-empty (greenfield) project it interviews the user to seed background and friends. brain-setup does not run it automatically — initialization and knowledge-seeding are separate steps, so the user stays in control of what gets written.
Also point them at: read BRAIN.md, then use the brain-page skill to author or modify pages directly and the brain-ingest skill to digest scattered input into the brain. Every read and write goes through the brain CLI — never hand-edit a brain file.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-21 | pass→pass | 10,562 | 8,701 | -18% | 1 | 1 | 0% | 1,614 | 2,826 | +75% | 0 | 0 | — |
case-15 | fail→pass | 13,828 | 11,486 | -17% | 1 | 1 | 0% | 1,590 | 3,400 | +114% | 0 | 0 | — |
case-16 | fail→pass | 15,443 | 2,667 | -83% | 1 | 1 | 0% | 1,727 | 2,792 | +62% | 0 | 0 | — |
case-01 | fail→fail | 8,056 | 10,410 | +29% | 1 | 1 | 0% | 225 | 2,655 | +1080% | 0 | 0 | — |
case-02 | fail→fail | 5,794 | 15,515 | +168% | 1 | 1 | 0% | 205 | 2,575 | +1156% | 0 | 0 | — |
case-08 | fail→pass | 13,835 | 5,993 | -57% | 1 | 1 | 0% | 1,396 | 3,425 | +145% | 0 | 0 | — |
case-14 | fail→pass | 10,632 | 10,023 | -6% | 1 | 1 | 0% | 1,515 | 3,147 | +108% | 0 | 0 | — |
case-03 | fail→fail | 5,576 | 10,762 | +93% | 1 | 1 | 0% | 438 | 2,573 | +487% | 0 | 0 | — |
case-04 | pass→pass | 27,257 | 27,018 | -1% | 1 | 1 | 0% | 4,108 | 6,083 | +48% | 0 | 0 | — |
case-05 | fail→fail | 8,364 | 9,571 | +14% | 1 | 1 | 0% | 532 | 3,126 | +488% | 0 | 0 | — |
case-06 | pass→pass | 13,949 | 17,525 | +26% | 1 | 1 | 0% | 2,777 | 4,723 | +70% | 0 | 0 | — |
case-07 | fail→pass | 15,522 | 5,712 | -63% | 1 | 1 | 0% | 1,550 | 3,462 | +123% | 0 | 0 | — |
case-09 | pass→pass | 16,153 | 11,550 | -28% | 1 | 1 | 0% | 1,847 | 3,439 | +86% | 0 | 0 | — |
case-10 | fail→pass | 15,597 | 5,300 | -66% | 1 | 1 | 0% | 1,769 | 3,085 | +74% | 0 | 0 | — |
case-11 | fail→pass | 10,981 | 11,169 | +2% | 1 | 1 | 0% | 2,126 | 3,200 | +51% | 0 | 0 | — |
case-12 | fail→pass | 17,128 | 6,944 | -59% | 1 | 1 | 0% | 1,975 | 3,581 | +81% | 0 | 0 | — |
case-13 | fail→pass | 14,306 | 9,016 | -37% | 1 | 1 | 0% | 1,627 | 2,918 | +79% | 0 | 0 | — |
case-17 | fail→fail | 15,402 | 3,168 | -79% | 1 | 1 | 0% | 1,764 | 2,881 | +63% | 0 | 0 | — |
case-18 | fail→pass | 19,496 | 4,341 | -78% | 1 | 1 | 0% | 2,558 | 2,845 | +11% | 0 | 0 | — |
case-19 | pass→pass | 21,025 | 7,239 | -66% | 1 | 1 | 0% | 2,739 | 2,633 | -4% | 0 | 0 | — |
case-20 | fail→pass | 11,298 | 9,880 | -13% | 1 | 1 | 0% | 1,847 | 3,099 | +68% | 0 | 0 | — |
case-22 | fail→pass | 18,167 | 9,299 | -49% | 1 | 1 | 0% | 2,224 | 3,083 | +39% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +55 percentage points is the difference between those two pass rates over the 19 comparable cases.
The publisher has shipped newer versions since this run, so these numbers describe v2, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.