brain-grade

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

A command that grades a WORKSPACE_BRAIN.md file using a linter and five review areas: freshness, signal-to-noise, specificity, reasons, and section balance. A linter is a tool that checks a file against predefined rules.

In plain words
What is it for?
Run it to check the brain file, report the linter's top findings, score its sections, and propose a small set of high-value changes for approval.
Why use it?
It turns a broad quality review into concrete scores, findings, and suggested edits.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python .claude/scripts/brain_lint.py WORKSPACE_BRAIN.md.

Good fit Run it to check the brain file, report the linter's top findings, score its sections, and propose a small set of high-value changes for approval.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jim4226/claude-workspace-brain
agentmods
npx agentmods add commands/jim4226/claude-workspace-brain/brain-grade

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/jim4226/claude-workspace-brain/brain-grade/github.svg)](https://agentmods.dev/commands/jim4226/claude-workspace-brain/brain-grade)
Your own site
<a href="https://agentmods.dev/commands/jim4226/claude-workspace-brain/brain-grade"><img src="https://agentmods.dev/badge/commands/jim4226/claude-workspace-brain/brain-grade/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-grade

Your own site · 80×15
<a href="https://agentmods.dev/commands/jim4226/claude-workspace-brain/brain-grade"><img src="https://agentmods.dev/badge/commands/jim4226/claude-workspace-brain/brain-grade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 356 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.00011 $0.00356
Opus 5 $0.00005 $0.00178
Sonnet 5 $0.00002 $0.00071
Haiku 4.5 $0.00001 $0.00036

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

Security

Grade A, and why

brain-grade 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 9d 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-grade.md · 41 lines

What it actually says

You are reviewing the brain file for quality. Do this:

Step 1 — run the static linter

python .claude/scripts/brain_lint.py WORKSPACE_BRAIN.md

Report the score and the top 3 findings verbatim.

Step 2 — read the brain and grade it on five axes (0-10 each)

Then read WORKSPACE_BRAIN.md yourself and grade:

  1. Freshness — When was each section last meaningfully updated? Stale threads at the top are worse than stale entries at the bottom.
  2. Signal-to-noise — Does every line carry weight, or is there filler that future-Claude will skim past?
  3. Specificity — Are decisions and threads concrete (named files, dates, owners), or vague ("improve UX", "fix the auth thing")?
  4. Reason coverage — Do decisions explain why (not just what)? A decision without a reason rots in two weeks.
  5. Section balance — Is one section dominating? Are required sections empty? Should anything be archived?

For each axis: score 0-10, one-line justification, one concrete suggestion.

Step 3 — propose specific edits

Pick the 1-3 highest-leverage edits (entries to remove, rewrite, or move to archive). Show the exact Edit-tool calls you'd make. Wait for my approval before applying any of them.

Step 4 — overall verdict

End with one line: Brain quality: <score>/100. <One-sentence recommendation>.

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. 9d ago First seen · 41 lines · 11 tokens per session scan A 25d4152cae1d

Subscribe to this mod's changes

brain-grade is a command published in the GitHub repository jim4226/claude-workspace-brain (1 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 356 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.