brain-align

brain-align is a command for Claude Code from fiale-plus/fiale-claude-plugins. It costs 23 tokens per session (980 once invoked), scanned B, original, MIT.

An interactive command that reviews a project's .brain documents alongside recent session notes, README files, and CLAUDE.md, then suggests updates. These documents store project decisions, pitfalls, and recurring patterns.

In plain words
What is it for?
Use it when starting work on an existing project, after a major change, or during a periodic review of decisions, gotchas, and coding patterns.
Why use it?
It helps keep project knowledge current after major changes or periods of work, so useful context is not lost in old sessions.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the brain plugin — 10 commands, 3 hooks shipped together

Good fit Use it when starting work on an existing project, after a major change, or during a periodic review of decisions, gotchas, and coding patterns.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add fiale-plus/fiale-claude-plugins
Claude Code
/plugin install brain

Made for: Claude Code.

Or install brain, the plugin that ships this one along with the rest of its 10 commands, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for brain-align

README.md
[![agentmods](https://agentmods.dev/badge/commands/fiale-plus/fiale-claude-plugins/align/github.svg)](https://agentmods.dev/commands/fiale-plus/fiale-claude-plugins/align)
Your own site
<a href="https://agentmods.dev/commands/fiale-plus/fiale-claude-plugins/align"><img src="https://agentmods.dev/badge/commands/fiale-plus/fiale-claude-plugins/align/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for brain-align

Your own site · 80×15
<a href="https://agentmods.dev/commands/fiale-plus/fiale-claude-plugins/align"><img src="https://agentmods.dev/badge/commands/fiale-plus/fiale-claude-plugins/align.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 980 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.00980
Opus 5.5 $0.00009 $0.00392
Sonnet 5.5 $0.00005 $0.00196
Haiku 4.5 $0.00002 $0.00098

Measured 1mo ago against content hash 37d6f37b2c8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

brain-align 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 1mo 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.

cat ~/.claude/brain/config.json
plugins/brain/commands/align.md · 154 lines

How it starts

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

Interactively review and populate .brain/ knowledge docs for the current project directory. Useful after a big push, when starting on an existing project, or for periodic review.

Steps

1. Detect project root

pwd
git rev-parse --show-toplevel 2>/dev/null || echo "not-git"

Use git root if in a git repo, otherwise use current directory. Call this PROJECT_ROOT.

2. Read existing .brain/ docs

ls PROJECT_ROOT/.brain/ 2>/dev/null || echo "empty"
cat PROJECT_ROOT/.brain/DECISIONS.md 2>/dev/null
cat PROJECT_ROOT/.brain/GOTCHAS.md 2>/dev/null
cat PROJECT_ROOT/.brain/PATTERNS.md 2>/dev/null

3. Read recent session notes for this project

cat ~/.claude/brain/config.json

Get vault_path. Then read recent sessions:

ls VAULT_PATH/_sessions/ | sort | tail -14

Read the last 2 weeks of session notes that mention this project. Look for entries referencing the project name or path.

4. Read project context

cat PROJECT_ROOT/CLAUDE.md 2>/dev/null | head -100
cat PROJECT_ROOT/README.md 2>/dev/null | head -50

5. Analyze and suggest additions

Using your reasoning across session notes, existing .brain/ content, README, and CLAUDE.md, generate suggestions for each category:

DECISIONS.md additions — architectural choices that should be documented:

  • Technology choices with rationale
  • Design patterns chosen over alternatives
  • Tradeoffs explicitly made

GOTCHAS.md additions — blockers and solutions:

  • Environment-specific issues encountered
  • Non-obvious debugging solutions
  • Things that wasted significant time

PATTERNS.md additions — recurring conventions:

  • Naming conventions established
  • Code organization patterns
  • Workflow patterns specific to this project

Skip suggestions for things already documented. Focus on gaps.

6. Present suggestions interactively

For each suggestion, show:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[DECISIONS] — <title>
<content preview>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Add this? [y/n/e to edit]

Read the full file on GitHub · 154 lines

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. 1mo ago First seen · 154 lines · 23 tokens per session scan B 37d6f37b2c8e

Subscribe to this mod's changes

brain-align is a command published in the GitHub repository fiale-plus/fiale-claude-plugins (4 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 980 once invoked, about $0.0001 per session on Opus 5.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-31.