brain-init

brain-init is a command for Claude Code from jim4226/claude-workspace-brain. It costs 14 tokens per session (687 once invoked), scanned A, original, MIT.

An interactive command that creates a project memory file called WORKSPACE_BRAIN.md from a template and asks questions to personalize it.

In plain words
What is it for?
Use it to initialize project context in a fresh workspace and answer questions about the project type, goal, sprint focus, and active work.
Why use it?
It gives a new project a shared place to record its purpose, current work, and important context, while stopping if that file has already been customized.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: names the AskUserQuestion tool.

Good fit Use it to initialize project context in a fresh workspace and answer questions about the project type, goal, sprint focus, and active work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jim4226/claude-workspace-brain/brain-init
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.

Clone the repo
git clone --depth 1 https://github.com/jim4226/claude-workspace-brain

Made for: Claude Code.

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-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/jim4226/claude-workspace-brain/brain-init.svg)](https://agentmods.dev/commands/jim4226/claude-workspace-brain/brain-init)
Your own site
<a href="https://agentmods.dev/commands/jim4226/claude-workspace-brain/brain-init"><img src="https://agentmods.dev/badge/commands/jim4226/claude-workspace-brain/brain-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 687 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00014 $0.00687
Opus 5 $0.00007 $0.00344
Sonnet 5 $0.00003 $0.00137
Haiku 4.5 $0.00001 $0.00069

Measured 7d ago against content hash bdae69a7393b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

brain-init 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 7d 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.

template/.claude/commands/brain-init.md · 62 lines

How it starts

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

Bootstrap a workspace brain for this project. Goal: take the user from "empty template" to "useful brain" in under 60 seconds.

Step 1 — check current state

Read WORKSPACE_BRAIN.md at the project root.

  • If it doesn't exist (the installer normally places it at the project root already), fetch the template from https://raw.githubusercontent.com/jim4226/claude-workspace-brain/main/template/WORKSPACE_BRAIN.md and write it to WORKSPACE_BRAIN.md at the project root.
  • If it exists AND has already been customised (any section has non-template content), stop and report back: "Brain already initialised. Use /brain to edit a section, or /brain-grade to audit quality." Do not proceed.
  • If it exists but is still the unedited template, proceed.

Step 2 — ask the user 6 fast questions

Use AskUserQuestion (if available) or plain prompts. Keep each question to one line. Wait for the user's answer before asking the next.

  1. Project type? (web app | research / paper | ML training | CLI tool | other)
  2. One-line goal: what are we building, in one sentence?
  3. Current sprint focus: what are you trying to ship this week / cycle?
  4. One in-flight thread: name one piece of work that's currently happening, with status (in-progress / blocked / pending).
  5. One recent decision + the why: what's a judgment call you made in the last week and why? (Required - decisions without rationale rot fast.)
  6. One open question: what's still unresolved?

Step 3 — fill the template

Use the Edit tool to populate the brain:

  • ACTIVE FOCUS → answer 2 + answer 3
  • ACTIVE THREADS → one entry from answer 4
  • DECISIONS LOG → one entry from answer 5, formatted - **YYYY-MM-DD**: <decision>. Reason: <why>. (use today's date)
  • OPEN QUESTIONS → one entry from answer 6
  • Set Last sync: in the header to today's date
  • Leave SYNAPSES, KEY NUMBERS, RECENT SESSIONS with their template placeholders for now - the user can fill them as they accumulate.

Read the full file on GitHub · 62 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. 7d ago First seen · 62 lines · 14 tokens per session scan A bdae69a7393b

Subscribe to this mod's changes

brain-init is a command published in the GitHub repository jim4226/claude-workspace-brain (1 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 687 once invoked, about $0.0001 per session on Opus 5. 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.