Skip to content
Documentation
Skill

/brain-page

Operating manual for reading and writing a project's brain — every read and write goes through the bundled zero-dependency `brain` CLI; never hand-edit brain files. Read it before creating or modifying any page or root page.

From plugin
brainmd
5874 skills

Claude Code

$ npx -y skills add mindmuxai/brain.md --skill brain-page --agent claude-code

SKILL.md

brain-page.SKILL.md
name: brain-page
description: Operating manual for reading and writing a project's brain — every read and write goes through the bundled zero-dependency `brain` CLI; never hand-edit brain files. Read it before creating or modifying any page or root page.

brain-page

This skill is the operating manual for working with a project's brain under the **Open Project Brain Standard**. The protocol overview lives in the project's root `BRAIN.md`; here we expand the category taxonomy and the exact command for every operation.

The model is simple: **everything goes through the `brain` CLI.**

  • **Read = `brain` read subcommands** (`brain-dir` / `list-pages` / `read-page <id>` / `read-root <slug>`) — location-independent, no need to know where the brain lives.
  • **Write = `brain` write subcommands.** Every mutation (create / update / append / archive / tag / root-page rewrite / reindex) is correct-by-construction, so frontmatter can never be mis-shaped and a compiled_truth rewrite can never silently skip its timeline entry.

> **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.** Correctness is guaranteed by construction inside the CLI — there is no validator, and nothing at the file layer can catch or undo a bad manual edit, so a hand edit silently breaks the brain's invariants. Always reach for a `brain` subcommand instead of an editor.

Invoking the CLI

The CLI ships inside this skill bundle at `bin/brain.mjs`. It is zero-dependency Node (ESM) — run it directly:

node <this-skill-bundle>/bin/brain.mjs <subcommand> [flags]

Resolve `<this-skill-bundle>` to the directory this `SKILL.md` lives in. In the brain.md source repository itself that path is `skills/brain-page/bin/brain.mjs`; when the skill is installed globally it is wherever `setup` linked it (e.g. `~/.claude/skills/brain-page/bin/brain.mjs`). Run all commands from the **project root**.

The CLI resolves the brain directory itself: it reads `brainRoot` from `./.mindmux/preferences.json` when present (absolute or relative to the project root), otherwise falls back to `./brain`. A missing file, broken JSON, or absent field all fall back silently. Run `brain brain-dir` to see the resolved directory and its source.

Run `node <bundle>/bin/brain.mjs help` for the full flag reference.

Read operations

Define a shell function (do **not** use `BRAIN="node <bundle>/bin/brain.mjs"; $BRAIN …` — `VAR="node x"; $VAR` only word-splits in bash; zsh, macOS's default shell, treats `node /…/brain.mjs` as a single command name and fails with `exit 127`. A function is portable across bash and zsh, so keep this form):

brain() { node <bundle>/bin/brain.mjs "$@"; }
brain init            # ensure BRAIN.md, scaffold empty brain, default-wire CLAUDE.md + AGENTS.md
brain wire            # default wire both agent config files (optional --agent subset / all)
brain install-hooks   # opt-in Claude Code SessionStart snapshot (project-local .claude/settings.json)
brain uninstall-hooks # remove that SessionStart hook
brain install-hooks --agent codex   # Codex project-local hooks.json; startup/resume/compact
brain uninstall-hooks --agent codex # remove only the Codex hook
brain brain-dir       # print the resolved brain directory + its source (brainRoot / default)
brain list-pages      # list every page: id / title / category / status
brain read-page <id>  # print brain/pages/<id>.md
brain read-root <slug> # print a root page brain/<slug>.md

Session-companion discipline (while coding)

  • **Start of a task:** load relevant brain context (`list-pages` / `read-page` / `read-root`).
  • **When a decision/constraint settles:** capture it immediately via the CLI — do not wait to be asked.
  • **Pure implementation with no new decision:** do not write to the brain.
  • **When overturning a prior conclusion:** `update-truth` and/or `append-timeline --kind reversal` (or `archive-page`).
  • Never hand-edit brain files.

The six page categories

Each page's `category` must be one of:

| category | boundary (what to write) | typical compiled_truth structure | |---|---|---| | `project` | A concrete piece of work with a goal, scope, and an end — ask: “will this be done?”; dated progress belongs in the timeline | goal, scope, current status, key constraints | | `concept` | A concept, term, mechanism, or unfinished idea/question; also the deliberate home for durable knowledge that does not fit another type | definition or proposition, why it matters, boundaries and counter-examples | | `decision` | An established judgment and its reasoning (the most common) | what was decided, alternatives, rationale, blast radius | | `person` | A relevant person / role, their preferences and responsibilities | who they are, what they care about, collaboration conventions | | `organization` | A company, school, foundation, government body, standards organization, or internal team relevant to the work | what it is, relationship to this work, people/decisions/pages linked to it | | `reference` | An external resource / object of analysis worth keeping | what it is, key takeaways, links, implications for this project |

Use a `company` tag to narrow an organization that is specifically a company; it is not a required field. When in doubt, most knowledge lands in `decision` or `concept`.

Page id conventions

  • Use kebab-case for `id`, semantically clear, e.g. `markdown-over-sqlite`, `auth-flow`.
  • The `id` must **equal the filename** (`brain/pages/<id>.md`, without the extension). The CLI enforces this.
  • Once an id is referenced via `[[ ]]` it should stay stable; renaming means updating every reference and re-running `lint-links`.

Write operations (every one is a CLI subcommand)

Assume the `brain` shell function defined above (`brain() { node <bundle>/bin/brain.mjs "$@"; }`) and that you are in the project root.

Create a page

brain create-page --id <k
Read more
@mindmuxai
Ships withbrainmd

A persistent, file-based memory layer for coding agents — give Claude Code, Codex & others a project brain (durable decisions, requirements, constraints) via a zero-dependency CLI.

Stars on GitHub

Momentum

stars in total
587
Star history of mindmuxai/brain.md on GitHub, a chart by star-history.com

Other skills on brainmd.

brain-bootstrap

brain-bootstrap

Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git…

@mindmuxai@mindmuxaiInstall Skill
brain-ingest

brain-ingest

The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a…

@mindmuxai@mindmuxaiInstall Skill
brain-setup

brain-setup

Bootstrap the Open Project Brain Standard into the current project — prefer `brain init` (ensure BRAIN.md, scaffold empty brain…

@mindmuxai@mindmuxaiInstall Skill

More skills from other plugins.

context7-cli

context7-cli

Use the ctx7 CLI to fetch library documentation and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7",…

context712d64k
@upstash@upstashInstall Skill
docs-components

docs-components

Comprehensive MDX component patterns (Note, Pitfall, DeepDive, Recipes, etc.) for all documentation types. Authoritative source…

@reactjs@reactjsInstall Skill
codebase-wiki

codebase-wiki

How to work in a Codebase Wiki project (the `codebase-wiki` starter pack): an agent-authored, source-grounded wiki of the…

@inkeep@inkeepInstall Skill

Questions about brain-page.

Which coding agents can use brain-page?
brain-page installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.