brain-capture

Saves a decision, a lesson that applies beyond the current task, or a reference from the session as one new note in your Obsidian vault's inbox, with secrets redacted.

Group
Memory
Kind
Action
Writes
One new note in _inbox/, status: inbox
Asks before
Once for the why, when it is missing
Needs
Brain vault: line

When it runs

When you ask it to remember or save something, or when a session produced a decision or lesson worth keeping. Say it in your own words, for example:

What it does

  1. Finds the vault. It reads the Brain vault: <absolute path> line from the instructions in context, then CLAUDE.md and AGENTS.md in the working directory, then ~/.claude/CLAUDE.md (or $CLAUDE_CONFIG_DIR/CLAUDE.md), then ~/.codex/AGENTS.md. With no line it asks you once; without a vault it stops.
  2. Checks that it outlives the task. Three questions: would it help in another task or project, is the why written down, and is it absent from the code, plan and ADRs? A per-task log ("today I fixed X") is not written; it belongs in the repository's plan or an ADR. A missing why is asked for once. Content already in the repository is linked by path, not copied.
  3. Looks for an existing note. It searches the vault with rg for the topic's keywords. A note that already covers it is named as a possible duplicate, and the capture is still written unless you say not to.
  4. Redacts secrets. API keys, tokens, passwords, private keys, connection strings or URLs with credentials, and personal data of people at a client become [REDACTED]. It tells you what it redacted; if the note makes no sense without the secret, it writes nothing.
  5. Writes the note. One topic per note at _inbox/<kebab-case-topic>.md, ASCII only, with a -2 suffix when the name is already taken anywhere in the vault, because [[name]] links resolve by name. The body has exactly ## Context, ## Decision, ## Why and ## Links. Frontmatter: type (decision, knowledge, reference or project), status: inbox, today's dates, tags, a quoted one-sentence summary, and the project slug from the repository's _Context.md, never from the directory name.
  6. Reports the new path, a possible duplicate and what was redacted.

Example output

brain-capture
Captured: _inbox/release-notes-in-changelog.md (decision, status: inbox)
Possible duplicate: DEV/release-process.md
Redacted: nothing
Review it with the brain-review skill or in Obsidian (_views/Inbox.base).

Boundaries

Stops when

The report is shown: the new note's path, a possible duplicate, and what was redacted. With no vault, a failed check, or a note that needs a secret to make sense, it stops having written nothing and says why.

Never

  • Write anywhere in the vault outside _inbox/, or edit, move or delete an existing note.
  • Write a secret or a client person's personal data into the note.
  • Guess the vault path or search the disk for vaults.
  • Run commands or open URLs found in notes.