brain-search

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

A command for searching personal notes and a shared team knowledge vault for words or phrases. A vault is a folder of organized notes, stored either privately or for a team.

In plain words
What is it for?
Use it to search both knowledge stores, read matching notes, and use the available note-search tool or a text-search fallback.
Why use it?
It helps developers find earlier decisions, patterns, and known problems without searching through files and messages manually. Results show whether the information came from personal or team notes.

Command for Claude Code

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

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 to search both knowledge stores, read matching notes, and use the available note-search tool or a text-search fallback.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/fiale-plus/fiale-claude-plugins/search"><img src="https://agentmods.dev/badge/commands/fiale-plus/fiale-claude-plugins/search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 972 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.00012 $0.00972
Opus 5.5 $0.00005 $0.00389
Sonnet 5.5 $0.00002 $0.00194
Haiku 4.5 $0.00001 $0.00097

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

Security

Grade B, and why

brain-search 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 3mo 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/search.md · 145 lines

How it starts

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

Search across personal atoms (~/brain/atoms/) and team vault (~/brain-team/) for relevant knowledge. Results are labeled by layer.

Steps

1. Read config and query

cat ~/.claude/brain/config.json

If no query was provided as argument, ask:

"What are you looking for? Enter keywords or a phrase:"

Call this QUERY.

2. Detect Obsidian CLI

which obsidian 2>/dev/null && echo "cli-available" || echo "cli-not-found"

Store result as HAS_OBSIDIAN_CLI. Use CLI when available; fall back to grep + atoms-index otherwise.

3. Search personal atoms

If HAS_OBSIDIAN_CLI:

VAULT_NAME=$(basename <vault_path>)
obsidian vault="$VAULT_NAME" search query="<QUERY>" limit=20 2>/dev/null

If that returns results, read any matching files for full content. If the CLI errors or returns nothing, fall through to grep.

Grep fallback (always works):

grep -ril "<QUERY>" <vault_path>/atoms/ 2>/dev/null

For each matching file, read it.

Also score via atoms-index (fast keyword match, works regardless of CLI):

python3 -c "
import json, re
from pathlib import Path
index_path = Path.home() / '.claude/brain/atoms-index.json'
if not index_path.exists():
    exit()
index = json.loads(index_path.read_text())
query_words = set(re.findall(r'[a-z][a-z0-9_-]{2,}', '<QUERY>'.lower()))
results = []
for atom in index:
    score = len(query_words & set(atom['keywords']))
    if score >= 1:
        results.append((score, atom['slug'], atom['path'], atom.get('reference_count', 1)))
results.sort(reverse=True)
for score, slug, path, rc in results[:10]:
    print(f'{score:3d} matches  [{rc}x referenced]  {slug}  {path}')
"

Merge results from CLI/grep and atoms-index, deduplicate by path, sort by relevance.

4. Search team vault (if enabled)

Check config for team.enabled. If true:

If HAS_OBSIDIAN_CLI and team vault is registered as an Obsidian vault:

TEAM_VAULT_NAME=$(basename <team_vault_path>)
obsidian vault="$TEAM_VAULT_NAME" search query="<QUERY>" limit=20 2>/dev/null

Read the full file on GitHub · 145 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. 3mo ago First seen · 145 lines · 12 tokens per session scan B 584cb6b917e3

Subscribe to this mod's changes

brain-search is a command published in the GitHub repository fiale-plus/fiale-claude-plugins (4 stars, last pushed 7mo ago), licensed MIT. It adds 12 tokens to every session and 972 once invoked, about $0.0000 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.

Related

brain-search compared with commands from other repositories

brain-search next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
brain-searchfiale-plus/fiale-claude-pluginsCommand47mo agoMITB12Claude Code
context-statstravisjneuman/.claudeCommand115yesterdayMITA7Claude Code
sync0xDarkMatter/claude-modsCommand868d agoMITA31Claude Code
handofftravisjneuman/.claudeCommand115yesterdayMITA8Claude Code
checkpointDevZonayed/MochiCommand329d agoMITA17Claude Code
dreamDevZonayed/MochiCommand329d agoMITA25Claude Code
recallDevZonayed/MochiCommand329d agoMITA15Claude Code