/brain:ingestfrom brain
Transform a whole code repository into interlinked notes in the brAIn vault — an architecture overview plus one note per subsystem/key concept, wikilinked into the knowledge graph. Use when the user says "ingest this repo", "turn this repo into notes", "document this repo in my brain", or wants a repo mapped into their vault. Re-running updates the existing notes.
Ships in brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Produces a durable, browsable map of a codebase inside the brAIn vault: what it is, how it's shaped, and the decisions baked into it — the things a person (or a future session) needs to get oriented without re-reading the code.
All vault mechanics go through the plugin's helper CLI, scripts/brain.sh at
the plugin root (two directories above this skill's base directory):
BRAIN="<this skill's base directory>/../../scripts/brain.sh"
VAULT=$("$BRAIN" vault)
If vault fails, stop and relay its message (the fix is /brain:init).
$ARGUMENTS may name a path; otherwise use the current repo. The repo's notes
live in its area folder: AREA=$("$BRAIN" area [path]) resolves an existing
area folder by loose name match (e.g. PadelReplay/ for repo padel-replay)
or creates one. Record the current commit (git rev-parse --short HEAD) so the
notes say what state they describe.
"$BRAIN" sync.$AREA:
Overview note named after the repo (e.g. PadelReplay.md): purpose,
tech stack, high-level architecture, and a linked map of the subsystem
notes. Frontmatter:
---
tags: [repo]
path: <absolute local path>
branch: <branch>
commit: <short sha>
ingested: <YYYY-MM-DD>
---
(`"$BRAIN" ref [path]` prints `repo@branch#sha`; subsystem notes carry the
same `branch`/`commit`/`ingested` frontmatter.)
One note per major subsystem or key concept (aim for the handful that matter, not one per file): responsibility, key files with paths, how it connects to the rest, non-obvious decisions and gotchas. Wikilink notes to each other and to any existing vault notes on related topics.
Capture what the code can't say quickly: why it's built this way, invariants, sharp edges. Don't transcribe code.
"$BRAIN" search <terms> for existing notes on
related topics — techniques, architectures, tools, other repos — and
[[wikilink]] them wherever they're relevant to this repo.[[<Repo overview>]] — how it's applied there) so knowledge accumulates on
the topic side too. Extend existing notes; never duplicate their content
into the repo notes.[[links]] are fine and mark topics worth writing up later.Home.md.commit/ingested, revise what changed, keep manually added
content) — never create duplicates."$BRAIN" save "ingest <slug> @ <sha>".What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rcamf/claude-plugins --plugin brain7 skills in this plugin
/consolidatePromote a session's working notes from the brAIn vault's sessions/ area into the main knowledge graph, then archive the session folder. ONLY run when the user explicitly asks to consolidate — never automatically at session end./initSet up a new brAIn memory vault on this machine — create it from the brAIn template repo (or clone the user's existing vault) and configure the BRAIN_VAULT environment variable. Use when the user wants to create their brain/memory vault or when another brain skill reports BRAIN_VAULT is not configured./recallSearch the user's brAIn vault (their Obsidian-style markdown knowledge base synced via git, located by $BRAIN_VAULT) and answer from it. Use when the user asks "what do I know about X", "check my brain/vault/notes", or when past personal notes would answer their question.Other plugins' skills for the same job