brain

brain is a command for coding agents from brainOS-HQ/brain-os. It costs 0 tokens per session (1,185 once invoked), scanned A, original, MIT.

A project-scanning command that builds a current picture of where files and project information are, what is outdated, which decisions are pending, and what to do next.

In plain words
What is it for?
Use it to get a project overview, inspect a named project area, or resume work using the saved session context.
Why use it?
It reduces the time spent searching through a project and reconstructing what happened in an earlier session.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/brainos-hq/brain-os/brain
Clone the repo
git clone --depth 1 https://github.com/brainOS-HQ/brain-os

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/brainos-hq/brain-os/brain.svg)](https://agentmods.dev/commands/brainos-hq/brain-os/brain)
Your own site
<a href="https://agentmods.dev/commands/brainos-hq/brain-os/brain"><img src="https://agentmods.dev/badge/commands/brainos-hq/brain-os/brain.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,185 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01185
Opus 5 $0.00000 $0.00593
Sonnet 5 $0.00000 $0.00237
Haiku 4.5 $0.00000 $0.00119

Measured 3d ago against content hash 9040ce062d38, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

brain scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/commands/brain.md · 131 lines

How it starts

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

Brain OS : Project Scanner

Instant project intelligence. Where things are, what's stale, what decisions are pending, where to go next.

REQUIRED FIRST READ

Before any tool call, read ~/.claude/brain-os/PROTOCOL.md. It governs tool routing for every Brain OS skill. Pulse files are stale by design; MCP tools read the live .brain/ store.

Input

Arguments: $ARGUMENTS (format: <entity-name> or --resume). If no argument, show the master overview.

Resume mode (--resume)

When the argument is --resume (or contains --resume):

  1. Detect the current project slug from the working directory.
  2. Read the bookmark file at the user's Claude project memory path for last-session-<slug>.md. If no project-specific one exists, try last-session.md.
  3. Extract the **Transcript:** path from the bookmark.
  4. Read the JSONL transcript and extract the last 15 user/assistant text exchanges (skip tool_use and tool_result blocks).
  5. Present a "Resuming from last session" block showing:
    • When the session was saved
    • The tail of the conversation (so the user can see what was discussed)
  6. THEN run the normal master overview (entity state + focus) to show current state on top of that context.

This ensures that even if /wrap wasn't run, the user gets their conversation context back plus live project state.

Primary tool sequence

With entity name:

  1. mcp__brain-os__entity_read(entity_id) : status, mode, momentum, blockers, decisions
  2. mcp__brain-os__plan_read(entity_id) : active step and progress
  3. mcp__brain-os__decision_check("scan", entity_id) : surface any alerts

Without argument (master overview):

  1. mcp__brain-os__entity_read() : all entities at once
  2. mcp__brain-os__pattern_detect() : active patterns
  3. mcp__brain-os__focus_get(max_results=3) : top priorities

Staleness rules

Calculate from each entity's last_updated:

  • Fresh: 0 to 7 days
  • Aging: 8 to 21 days
  • Stale: 22 to 45 days
  • Dormant: 45+ days

Read the full file on GitHub · 131 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. 3d ago First seen · 131 lines · 0 tokens per session scan A 9040ce062d38

Subscribe to this mod's changes

brain is a command published in the GitHub repository brainOS-HQ/brain-os (6 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,185 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.