brain-stats

brain-stats is a command for coding agents from mercurialsolo/claudectl. It costs 19 tokens per session (224 once invoked), scanned A, original, MIT.

A command that reports how claudectl's learning system handles coding-tool decisions. It shows accuracy, corrections, improvement over time, comparison with fixed rules, and unsafe approvals.

In plain words
What is it for?
Use it to inspect learning curves, tool and project accuracy, comparisons with static rules, and the rate of risky actions approved but later rejected.
Why use it?
It helps reveal whether the system is learning user preferences and whether it is making risky decisions.

Command

Part of the claude-plugin plugin — 1 skill, 7 commands, 1 agent, 1 MCP server shipped together

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/mercurialsolo/claudectl/brain-stats
Clone the repo
git clone --depth 1 https://github.com/mercurialsolo/claudectl

Or install claude-plugin, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 1 agent, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/mercurialsolo/claudectl/brain-stats.svg)](https://agentmods.dev/commands/mercurialsolo/claudectl/brain-stats)
Your own site
<a href="https://agentmods.dev/commands/mercurialsolo/claudectl/brain-stats"><img src="https://agentmods.dev/badge/commands/mercurialsolo/claudectl/brain-stats.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 224 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.00019 $0.00224
Opus 5 $0.00010 $0.00112
Sonnet 5 $0.00004 $0.00045
Haiku 4.5 $0.00002 $0.00022

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

Security

Grade A, and why

brain-stats 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 4d 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.

claude-plugin/commands/brain-stats.md · 23 lines

What it actually says

Show how well the claudectl brain is learning the user's preferences. The optional argument selects a specific metric view.

Available metrics (pass as argument, or show all if omitted):

  • learning-curve — is the correction rate declining over time? (= brain is learning)
  • accuracy — per-tool, per-risk, per-project accuracy breakdown
  • baseline — brain vs. dumb static rules classifier comparison
  • false-approve — safety metric: how often does brain approve risky actions that get rejected?

Run the appropriate command:

  • All metrics: run claudectl --brain-stats learning-curve then claudectl --brain-stats accuracy
  • Specific metric: run claudectl --brain-stats {{metric}}

Present the results highlighting:

  • Whether the brain is improving over time
  • Which tools the brain handles well vs. poorly
  • Any safety concerns (high false-approve rates)
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. 4d ago First seen · 23 lines · 19 tokens per session scan A 78737efbd655

Subscribe to this mod's changes

brain-stats is a command published in the GitHub repository mercurialsolo/claudectl (197 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 224 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-30.